Package edu.cmu.tetrad.search.score
Class ScoredGraph
java.lang.Object
edu.cmu.tetrad.search.score.ScoredGraph
- All Implemented Interfaces:
TetradSerializable,Serializable,Comparable<ScoredGraph>
Stores a graph with a score for the graph. The equals, hashcode, and compare methods are overridden so that it will
be easy to put these stored graphs into sets and lists.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(@NotNull ScoredGraph o) Returns a compare value for this scored graph compared ot the given scored graph.booleanReturns true if the scoreed graph and this scored graph are equal.getGraph()Returns the graph.doublegetScore()Returns the score.inthashCode()Return s the hashcode of the score.static ScoredGraphReturns a serializable instance of this class.
-
Constructor Details
-
ScoredGraph
Constructs a scored graph.- Parameters:
graph- The graph.score- The score.
-
-
Method Details
-
serializableInstance
Returns a serializable instance of this class.- Returns:
- A serializable instance of this class.
-
getGraph
Returns the graph.- Returns:
- The graph.
-
getScore
public double getScore()Returns the score.- Returns:
- The score.
-
hashCode
public int hashCode()Return s the hashcode of the score. -
equals
Returns true if the scoreed graph and this scored graph are equal.- Parameters:
o- The other scored graph.- Returns:
- True if the score and graph are equal.
-
compareTo
Returns a compare value for this scored graph compared ot the given scored graph.- Specified by:
compareToin interfaceComparable<ScoredGraph>- Parameters:
o- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-