public class ScaledShortsFvCoparisonContextFactory extends Object implements FloatVectorComparisonContextFactory
ScaledBytesFloatVectorDescriptorImpl
.Guarded.EnsureThat, Guarded.New
FloatVectorMetricFactory.ToLinenote<C>
Constructor and Description |
---|
ScaledShortsFvCoparisonContextFactory(LinearScaler scaler,
int length,
DescriptorSerializer<FloatVectorDescriptor> serializer)
Instantiate.
|
public ScaledShortsFvCoparisonContextFactory(LinearScaler scaler, int length, DescriptorSerializer<FloatVectorDescriptor> serializer)
scaler
- Scaler to expose for unguarded comparatorslength
- Dimensionalityserializer
- Descriptor serializer; also source of guard objectpublic Class<? extends MetricFactory> metricFactoryClass()
ComparisonContextFactory
Description
annotation.metricFactoryClass
in interface ComparisonContextFactory<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>
public ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable> defaultComparison()
MetricFactory
defaultComparison
in interface MetricFactory<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>>
public ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable> forFloatMetrics(FloatVectorMetrics metric)
FloatVectorMetricFactory
forFloatMetrics
in interface FloatVectorMetricFactory<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>>
metric
- binary metricpublic ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable> forTverskyCoefficients(double coeffQuery, double coeffTarget)
FloatVectorMetricFactory
forTverskyCoefficients
in interface FloatVectorMetricFactory<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>>
coeffQuery
- Query side coefficientcoeffTarget
- Target side coefficientpublic ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable> forTversky(TverskyParameters parameters)
FloatVectorMetricFactory
forTversky
in interface FloatVectorMetricFactory<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>>
parameters
- parameters for the comparatorpublic Object getGuardObject()
Guarded
This method is intended to use only for ensuring the compatibility of manipulated objects.
Implementations might use the associated DescriptorGenerator
or DescriptorParameters
reference as
the guard object, however it is a non recommended practice to use this method to access the associated generator
to perform further operations on it.
getGuardObject
in interface Guarded
null
.public DescriptorSerializer<FloatVectorDescriptor> descriptorSerializer()
ComparisonContextFactory
descriptorSerializer
in interface ComparisonContextFactory<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>
public Linenote<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>> comparisonLinenote()
MetricFactory
comparisonLinenote
in interface MetricFactory<ComparisonContext<DescriptorComparator<FloatVectorDescriptor>,FloatVectorDescriptor,Serializable>>