jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.clustering.common
Class MolInputBuilder

Object
  extended by com.chemaxon.clustering.common.MolInputBuilder

@Beta
public class MolInputBuilder
extends Object

Convenience class to compose input from molecules to a clustering algorithm.

Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Author:
Gabor Imre

Constructor Summary
MolInputBuilder()
          Construct an empty builder.
MolInputBuilder(Collection<? extends chemaxon.struc.Molecule> mols)
          Construct a builder with stored structures.
 
Method Summary
 int addMolecule(chemaxon.struc.Molecule m)
          Add a new structure.
 int addMolecules(Collection<? extends chemaxon.struc.Molecule> mols)
          Add multiple structures.
<D extends Descriptor>
MolInput<D>
build(DescriptorGenerator<D> gen, DescriptorComparator<D> comp)
          Build immutable input descriptor.
 int size()
          Added structure count.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MolInputBuilder

public MolInputBuilder()
Construct an empty builder.


MolInputBuilder

public MolInputBuilder(Collection<? extends chemaxon.struc.Molecule> mols)
Construct a builder with stored structures.

Parameters:
mols - Structures to store
Method Detail

addMolecule

public int addMolecule(chemaxon.struc.Molecule m)
Add a new structure.

Parameters:
m - Structure to be added
Returns:
ID of the structure

addMolecules

public int addMolecules(Collection<? extends chemaxon.struc.Molecule> mols)
Add multiple structures.

Parameters:
mols - Structures to be added
Returns:
ID of the first structure to be added

build

public <D extends Descriptor> MolInput<D> build(DescriptorGenerator<D> gen,
                                                DescriptorComparator<D> comp)
Build immutable input descriptor.

Type Parameters:
D - Used descriptor
Parameters:
gen - Generator to use
comp - Comparator to use
Returns:
Immutable input descriptor

size

public int size()
Added structure count.

Returns:
Number of structures already added.

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)