Package edu.cmu.tetrad.search
Class Ling.StoredGraphs
java.lang.Object
edu.cmu.tetrad.search.Ling.StoredGraphs
- All Implemented Interfaces:
GraphGroup
- Enclosing class:
Ling
This small class is used to store graph permutations. It contains basic methods for adding and accessing graphs.
It is likely that this class will move elesewhere once the role of algorithm that produce multiple graphs is better defined.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
A method for adding graph data to the class.void
Gives a method for adding classes to the class.void
Allows for the adding of shinking information to its corresponding graph.getData
(int d) getGraph
(int g) Gets a graph at a specific indexint
Gets the number of graphs stored by the class.boolean
isStable
(int s)
-
Constructor Details
-
StoredGraphs
public StoredGraphs()
-
-
Method Details
-
getNumGraphs
public int getNumGraphs()Gets the number of graphs stored by the class.- Specified by:
getNumGraphs
in interfaceGraphGroup
- Returns:
- Returns the number of graphs stored in the class
-
getGraph
Description copied from interface:GraphGroup
Gets a graph at a specific index- Specified by:
getGraph
in interfaceGraphGroup
- Parameters:
g
- The index of the graph to be returned- Returns:
- Returns a Graph
-
getData
- Parameters:
d
- The index of the graph for which the DataSet is being returned- Returns:
- Returns a DataSet
-
isStable
public boolean isStable(int s) - Parameters:
s
- The index of the graph at which to return the boolean stability information for the permutation- Returns:
- Returns the shriknig variable value for a specific graph.
-
addGraph
Gives a method for adding classes to the class.- Specified by:
addGraph
in interfaceGraphGroup
- Parameters:
g
- The graph to add
-
addData
A method for adding graph data to the class.- Parameters:
d
- The graph to add
-
addStable
Allows for the adding of shinking information to its corresponding graph. This should be used at the same time as addGraph() if it is to be used. Otherwise, add a method to add data at a specific index.- Parameters:
s
- The stability value to set for a graph.
-