jklustor-overlap-0.0.2-20140619012940 (ChemAxon)


com.chemaxon.overlap.bruteforce
Class Dissimilarities

Object
  extended by com.chemaxon.overlap.bruteforce.Dissimilarities
Direct Known Subclasses:
UnguardedPagedOverlap.SearchMostSimilars, UnguardedPagedOverlap.SearchPage

 class Dissimilarities
extends Object

Multiple dissimilarity result values.

This class represents multiple dissimilarity result values with associated IDs. The values can be interpreted as best values for multiple queries or top-n best values for a single query.


Field Summary
protected  double[] dissimArray
          Dissimilarity values for the IDs;
protected  int[] idArray
          Represented target IDs.
 
Constructor Summary
Dissimilarities(int size)
          Initialize with invalid values.
 
Method Summary
(package private)  double[] getDissimArray()
          Best dissimilarities array.
(package private)  int[] getIdArray()
          Best IDs array.
 void insertSorted(double dissim, int id)
          Merge another ID/dissimilarity value into sorted.
(package private)  void mergeDistinct(Dissimilarities another)
          Merge another instance with.
 void mergeSorted(Dissimilarities another)
          Merge another instance.
 void mergeSorted(Dissimilarities another, int shiftAnotherIds)
          Merge another instance.
 ImmutableList<SimilarityResultNode> toList()
          Create list representation.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idArray

protected final int[] idArray
Represented target IDs.


dissimArray

protected final double[] dissimArray
Dissimilarity values for the IDs;

Constructor Detail

Dissimilarities

Dissimilarities(int size)
Initialize with invalid values.

Parameters:
size - Number of queries stored.
Method Detail

getIdArray

int[] getIdArray()
Best IDs array.

Returns:
Best IDs array

getDissimArray

double[] getDissimArray()
Best dissimilarities array.

Returns:
Best dissimilarities array

mergeDistinct

void mergeDistinct(Dissimilarities another)
Merge another instance with.

Merged instance is left intact; this will be updated according to the best dissimilarity values for each index position.

Both array must have the same size.

Parameters:
another - Another instance to merge

insertSorted

public void insertSorted(double dissim,
                         int id)
Merge another ID/dissimilarity value into sorted.

Parameters:
dissim - Dissimilarity value to merge
id - Associated ID

mergeSorted

public void mergeSorted(Dissimilarities another)
Merge another instance.

Merged instance is left intact; this will be updated.

Size of this instance is not changed; this instance will contain best dissimilarities of the union of the two merged instances.

Parameters:
another - Another instance to merge

mergeSorted

public void mergeSorted(Dissimilarities another,
                        int shiftAnotherIds)
Merge another instance.

Merged instance is left intact; this will be updated.

Size of this instance is not changed; this instance will contain best dissimilarities of the union of the two merged instances.

Parameters:
another - Another instance to merge
shiftAnotherIds - Add value to IDs from another array

toList

public ImmutableList<SimilarityResultNode> toList()
Create list representation.

Returns:
list representation

jklustor-overlap-0.0.2-20140619012940 (ChemAxon)