Class SepsetMap
- All Implemented Interfaces:
TetradSerializable
,Serializable
Stores a map from pairs of nodes to separating sets--that is, for each unordered pair of nodes {node1, node2} in a graph, stores a set of nodes conditional on which node1 and node2 are independent (where the nodes are considered as variables) or stores null if the pair was not judged to be independent. (Note that if a sepset is non-null and empty, that should mean that the compared nodes were found to be independent conditional on the empty set, whereas if a sepset is null, that should mean that no set was found yet conditional on which the compared nodes are independent. So at the end of the search, a null sepset carries different information from an empty sepset.)> 0
We cast the variable-like objects to Node to allow them either to be variables explicitly or else to be graph nodes that in some model could be considered as variables. This allows us to use d-separation as a graphical indicator of what independence in models ideally should be.> 0
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds all entries in the given sepset map to the current one.boolean
Returns the parents of the node x.Retrieves the sepset previously set for {a, b}, or null if no such set was previously set.double
Looks up the p-value for {x, y}static SepsetMap
Generates a simple exemplar of this class to test serialization.void
Sets the sepset for {x, y} to be z.void
set
(Node x, LinkedHashSet<Node> z) Sets the parents of x to the (ordered) set z.int
size()
Returns the number of {x, y} in the key set of the map.toString()
Returns a string representation of this sepset map.
-
Constructor Details
-
SepsetMap
public SepsetMap()Constructor. -
SepsetMap
Copy constructor.- Parameters:
map
- A given sepset map.
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
SepsetMap
object
-
set
Sets the sepset for {x, y} to be z. Note that {x, y} is unordered. -
get
Retrieves the sepset previously set for {a, b}, or null if no such set was previously set. -
getPValue
Looks up the p-value for {x, y} -
set
Sets the parents of x to the (ordered) set z.- Parameters:
x
- aNode
objectz
- aLinkedHashSet
object
-
get
Returns the parents of the node x. -
equals
Checks equality of this to another sepset map.
-
size
public int size()Returns the number of {x, y} in the key set of the map.- Returns:
- a int
-
toString
Returns a string representation of this sepset map. -
addAll
Adds all entries in the given sepset map to the current one.- Parameters:
newSepsets
- aSepsetMap
object
-