chemaxon.sss.screen
Class HashCode

java.lang.Object
  extended by chemaxon.sss.screen.HashCode

public final class HashCode
extends java.lang.Object

Hash code generator for molecules. Explicit hydrogens are not considered.
NOTE: this class is not thread safe for the sake of efficiency, multiple threads should use multiple instances.

Since:
JChem 3.0
Author:
Szilard Dorant

Field Summary
static int DEFAULT_RECURSION_LEVEL
           
 
Constructor Summary
HashCode()
          Creates a new instance of HashCode
 
Method Summary
 int getHashCode(Molecule mol)
          Gets hash code with default recursion level.
 int getHashCode(Molecule mol, int recursion)
          Gets the hash code.
 int getHashCode(Molecule mol, int[] fp)
          Gets hash code with default recursion level.
 int getHashCode(Molecule mol, int[] fp, int recursion)
          Gets the hash code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RECURSION_LEVEL

public static final int DEFAULT_RECURSION_LEVEL
See Also:
Constant Field Values
Constructor Detail

HashCode

public HashCode()
Creates a new instance of HashCode

Method Detail

getHashCode

public int getHashCode(Molecule mol)
Gets hash code with default recursion level.

Parameters:
mol - the molecule
Returns:
the hash code
See Also:
DEFAULT_RECURSION_LEVEL, getHashCode(chemaxon.struc.Molecule, int)

getHashCode

public int getHashCode(Molecule mol,
                       int recursion)
Gets the hash code.

Parameters:
mol - the molecule
recursion - the maximum level of recursion. Increase for better diversity, decrease for speed. Specify 1 or more.
Returns:
the hash code
See Also:
DEFAULT_RECURSION_LEVEL

getHashCode

public int getHashCode(Molecule mol,
                       int[] fp)
Gets hash code with default recursion level.

Parameters:
mol - the molecule
fp - the fingerprints in integers
Returns:
the hash code
See Also:
DEFAULT_RECURSION_LEVEL, getHashCode(chemaxon.struc.Molecule, int[], int)

getHashCode

public int getHashCode(Molecule mol,
                       int[] fp,
                       int recursion)
Gets the hash code.

Parameters:
mol - the molecule
fp - the fingerprints in integers
recursion - the maximum level of recursion. Increase for better diversity, decrease fro speed. Specify 1 or more.
Returns:
the hash code
See Also:
DEFAULT_RECURSION_LEVEL