D
- Represented descriptor type@Beta public class MolInputImpl<D extends Descriptor> extends Object implements MolInput
Constructor and Description |
---|
MolInputImpl(List<? extends Molecule> mols,
DescriptorGenerator<D> gen,
DescriptorComparator<D> comp)
Construct over Molecules.
|
Modifier and Type | Method and Description |
---|---|
double |
dissimilarity(int targetIndex,
int queryIndex)
Dissimilarity/distance between an ordered pair of input items.
|
MetricMetadata |
getMetricMetadata()
Metadata about the underlying metric.
|
Molecule |
getMolecule(int index)
Retrieve a structure.
|
int |
size()
Item count to be considered.
|
public MolInputImpl(List<? extends Molecule> mols, DescriptorGenerator<D> gen, DescriptorComparator<D> comp)
mols
- Molecules to representgen
- Descriptor generatorcomp
- Associated comparatorpublic int size()
DissimilarityInput
size
in interface DissimilarityInput
public double dissimilarity(int targetIndex, int queryIndex)
DissimilarityInput
Please note that the represented input is not necessarily a metric space; only the satisfactions of
criteria described by the results of DissimilarityInput.getMetricMetadata()
is guaranteed.
Note that parameter naming discriminates query and target indexes to be consistent with the usage of non symmetric underlying comparison metrics.
dissimilarity
in interface DissimilarityInput
targetIndex
- Index of first item to be comparedqueryIndex
- Index of second item to be comparedpublic MetricMetadata getMetricMetadata()
DissimilarityInput
getMetricMetadata
in interface DissimilarityInput
public Molecule getMolecule(int index)
getMolecule
in interface MolInput
index
- Structure index