-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDomain.java
More file actions
42 lines (35 loc) · 803 Bytes
/
Copy pathDomain.java
File metadata and controls
42 lines (35 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* File: Domain.java
* Creator: George Ferguson
* Created: Sun Mar 25 15:07:31 2012
* Time-stamp: <Wed Apr 3 19:34:23 EDT 2013 ferguson>
*/
import java.util.ArrayList;
import java.util.Collection;
/**
* A Domain represents an ordered set of possible Values for a Variable.
* <p>
* We use a ArrayList here since iteration is the main use for Domains
* in Bayes nets algorithms.
*/
public class Domain extends ArrayList<Object> {
public static final long serialVersionUID = 1L;
public Domain() {
super();
}
public Domain(int size) {
super(size);
}
public Domain(Object... elements) {
this();
for (Object o : elements) {
add(o);
}
}
public Domain(Collection<Object> collection) {
this();
for (Object o : collection) {
add(o);
}
}
}