jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap
Class SimilarityResultsImpl

Object
  extended by com.chemaxon.overlap.SimilarityResultsImpl
All Implemented Interfaces:
SimilarityResults, Serializable

@Beta
public final class SimilarityResultsImpl
extends Object
implements SimilarityResults

Arrays of primitives backed implementation of SimilarityResults.

Author:
Gabor Imre
See Also:
Serialized Form

Constructor Summary
SimilarityResultsImpl(int[] queries, int[] targets, double[] dissimilarities)
          Construct.
 
Method Summary
 double getDissimilarity(int index)
          Dissimilarity.
 int getQuery(int index)
          ID of stored query.
 int getTarget(int index)
          ID of the stored target.
 int size()
          Number of stored triplets.
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimilarityResultsImpl

public SimilarityResultsImpl(int[] queries,
                             int[] targets,
                             double[] dissimilarities)
Construct.

Parameters:
queries - Queries to store
targets - Targets to store
dissimilarities - Dissimilarities to store
Throws:
IllegalArgumentException - when array sizes mismatch or dissimilarities array contains NaN or INF value
Method Detail

size

public int size()
Description copied from interface: SimilarityResults
Number of stored triplets.

Specified by:
size in interface SimilarityResults
Returns:
Number of stored triplets

getQuery

public int getQuery(int index)
Description copied from interface: SimilarityResults
ID of stored query.

Specified by:
getQuery in interface SimilarityResults
Parameters:
index - Index
Returns:
Query ID for the given index

getTarget

public int getTarget(int index)
Description copied from interface: SimilarityResults
ID of the stored target.

Specified by:
getTarget in interface SimilarityResults
Parameters:
index - Index
Returns:
Target ID for the given index

getDissimilarity

public double getDissimilarity(int index)
Description copied from interface: SimilarityResults
Dissimilarity.

Specified by:
getDissimilarity in interface SimilarityResults
Parameters:
index - Index
Returns:
Associated dissimilarity for the given index

toString

public String toString()
Overrides:
toString in class Object

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)