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 TypeMethodDescriptionint
compareTo
(@NotNull ScoredGraph o) Returns a compare value for this scored graph compared ot the given scored graph.boolean
Returns true if the scoreed graph and this scored graph are equal.getGraph()
Returns the graph.double
getScore()
Returns the score.int
hashCode()
Return s the hashcode of the score.static ScoredGraph
Returns a serializable instance of this class.
-
Constructor Details
-
ScoredGraph
-
-
Method Details
-
serializableInstance
Returns a serializable instance of this class.- Returns:
- A serializable instance of this class.
-
getGraph
-
getScore
public double getScore()Returns the score.- Returns:
- The score.
-
hashCode
-
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:
compareTo
in 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.
-