public final class ShapeGenerator extends AbstractShapeGenerator<ShapeDescriptor,ShapeGeneratorParameter>
Guarded.EnsureThat, Guarded.Newparameters| Constructor and Description |
|---|
ShapeGenerator(ShapeGeneratorParameter parameters) |
| Modifier and Type | Method and Description |
|---|---|
ComparisonContextFactory<ShapeComparator<ShapeDescriptor>,ShapeDescriptor,? extends Serializable> |
comparisonContextFactory()
Get an unguarded context factory.
|
ShapeComparator<ShapeDescriptor> |
defaultComparison()
Default comparator.
|
Shape |
fromByteArray(byte[] desc)
Builds a descriptor from its byte array representation.
|
Shape |
generateDescriptor(Molecule mol)
Calculates the associated descriptor for the given Molecule.
|
ShapeComparator<ShapeDescriptor> |
getDefaultComparator()
Deprecated.
|
ShapeComparator<ShapeDescriptor> |
getShapeComparator(ShapeComparatorParameter params) |
boolean |
serializerIsEqualWith(DescriptorSerializer other)
Check strict equivalence of serializers.
|
equals, fromString, getBareDescriptor, getGuardObject, getParameters, hashCode, toByteArray, toString, toStringpublic ShapeGenerator(ShapeGeneratorParameter parameters)
public Shape generateDescriptor(Molecule mol)
DescriptorGeneratorNote that different descriptors/application scenarios might need different structure standardization.
Currently structure standardization is generally not in the scope of the responsibilities of
DescriptorGenerator to the possible maximal extent.
Since the returned descriptor might contain additional data (reference to input Molecule, etc) if
it is stored for later comparison it is recommended to use the bare-only representation returned by
DescriptorGenerator.getBareDescriptor(com.chemaxon.descriptors.common.Descriptor).
mol - Input moleculeDescriptorGenerator.getBareDescriptor(com.chemaxon.descriptors.common.Descriptor) on either the rich or the
bare representation.@Deprecated public ShapeComparator<ShapeDescriptor> getDefaultComparator()
DescriptorGeneratorpublic ShapeComparator<ShapeDescriptor> getShapeComparator(ShapeComparatorParameter params)
public Shape fromByteArray(byte[] desc)
DescriptorSerializerPlease note that the compatibility of this (the reconstructing) DescriptorGenerator, regarding to the
serializing generator (on which
DescriptorSerializer.toByteArray(com.chemaxon.descriptors.common.Descriptor) was called to construct the
byte array form) is not checked; compatibility must be ensured by the user application.
desc - Byte array of the descriptorpublic ComparisonContextFactory<ShapeComparator<ShapeDescriptor>,ShapeDescriptor,? extends Serializable> comparisonContextFactory()
DescriptorGeneratorbyte [] serialization based unguarded representation.
Implementations are expected to provide additional factory methods for unguarded and plain descriptor comparators for implemented metrics.
public ShapeComparator<ShapeDescriptor> defaultComparison()
DescriptorGeneratorpublic boolean serializerIsEqualWith(DescriptorSerializer other)
DescriptorSerializerother - Other serializertrue when and only when the two serializers (this and other) are the same thus
interchangeable. Implementations typically check class equivalence, guard object match and parameter match.