Class SolutionCompleteGraph
- java.lang.Object
-
- com.actelion.research.util.graph.complete.AMemorizedObject
-
- com.actelion.research.util.graph.complete.SolutionCompleteGraph
-
- All Implemented Interfaces:
java.lang.Comparable<SolutionCompleteGraph>
- Direct Known Subclasses:
ModelSolutionSimilarity
public class SolutionCompleteGraph extends AMemorizedObject implements java.lang.Comparable<SolutionCompleteGraph>
SolutionCompleteGraphCopyright: Actelion Ltd., Inc. All Rights Reserved This software is the proprietary information of Actelion Pharmaceuticals, Ltd. Use is subject to license terms.
- Version:
- 1.0 Oct 1, 2012 MvK: Start implementation
- Author:
- Modest von Korff
-
-
Constructor Summary
Constructors Constructor Description SolutionCompleteGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(byte indexNodeQuery, byte indexNodeBase)
Adds a pair of nodes to this solution.int
compareTo(SolutionCompleteGraph s)
void
copyIntoThis(AMemorizedObject a)
Has to be a deep copyboolean
equals(java.lang.Object obj)
byte
getIndexBaseFromHeap(int indexOnHeapBase)
byte
getIndexCorrespondingBaseNode(int indexQueryNode)
byte
getIndexQueryFromHeap(int indexOnHeapQuery)
int
getNodesQuery()
double
getSimilarity()
int
getSizeHeap()
byte[]
getSolution()
The index is the index of the node in the query molecule.int
hashCode()
void
reset()
void
setNodesQuery(int nodes)
Only needed for the toString() method.void
setSimilarity(double similarity)
java.lang.String
toString()
-
Methods inherited from class com.actelion.research.util.graph.complete.AMemorizedObject
getPositionInContainer, setPositionInContainer
-
-
-
-
Method Detail
-
add
public void add(byte indexNodeQuery, byte indexNodeBase)
Adds a pair of nodes to this solution.- Parameters:
indexNodeBase
- index of the base node in the complete base graph.indexNodeQuery
- index of the query node in the complete query graph.
-
compareTo
public int compareTo(SolutionCompleteGraph s)
- Specified by:
compareTo
in interfacejava.lang.Comparable<SolutionCompleteGraph>
-
getSizeHeap
public int getSizeHeap()
-
getIndexBaseFromHeap
public byte getIndexBaseFromHeap(int indexOnHeapBase)
-
getIndexQueryFromHeap
public byte getIndexQueryFromHeap(int indexOnHeapQuery)
-
getIndexCorrespondingBaseNode
public byte getIndexCorrespondingBaseNode(int indexQueryNode)
-
getSolution
public byte[] getSolution()
The index is the index of the node in the query molecule. The value at 'index' is the index of the node in the base molecule.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
copyIntoThis
public void copyIntoThis(AMemorizedObject a)
Description copied from class:AMemorizedObject
Has to be a deep copy- Specified by:
copyIntoThis
in classAMemorizedObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
reset
public void reset()
- Specified by:
reset
in classAMemorizedObject
-
getSimilarity
public double getSimilarity()
-
setSimilarity
public void setSimilarity(double similarity)
-
setNodesQuery
public void setNodesQuery(int nodes)
Only needed for the toString() method.- Parameters:
nodes
-
-
getNodesQuery
public int getNodesQuery()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-