|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object QueryProcessor.SF.ScoringFunction.EMD.Signatures
public class Signatures
This class represents to signatures for which a distance should be calculated.
Constructor Summary | |
---|---|
Signatures(double[][] costMatrix)
Creates a new instance of Signatures |
|
Signatures(double[][] costMatrix,
double[] pDummyCostVector,
double[] qDummyCostVector)
Creates a new instance of Signatures |
|
Signatures(java.lang.Object[] pFeatures,
java.lang.Object[] qFeatures,
QueryProcessor.SF.ScoringFunction.EMD.GroundDistance groundDistance)
Creates a new instance of Signatures |
|
Signatures(java.lang.Object[] pFeatures,
java.lang.Object[] qFeatures,
QueryProcessor.SF.ScoringFunction.EMD.GroundDistance groundDistance,
java.lang.Object pDummyFeature,
java.lang.Object qDummyFeature)
Creates a new instance of Signatures |
|
Signatures(Signatures sig)
Creates a new instance of Signatures (copy constructor) |
Method Summary | |
---|---|
double |
getCost(int i,
int j)
Gets the cost-entry for the specified index (including Dummys if needed) |
int |
getPSize()
Returns the feature-count of signature P (including Dummys if needed) |
double |
getPWeight(int index)
Gets the weight for the specified feature in P (including Dummys if needed) |
double |
getPWeightSum()
Returns the linear sum of the weights of signature P (ex! |
int |
getQSize()
Returns the feature-count of signature Q (including Dummys if needed) |
double |
getQWeight(int index)
Gets the weight for the specified feature in Q (including Dummys if needed) |
double |
getQWeightSum()
Returns the linear sum of the weights of signature Q (ex! |
int |
getSimplePSize()
Returns the feature-count of signature P (no Dummys) |
int |
getSimpleQSize()
Returns the feature-count of signature Q (no Dummys) |
void |
setPWeight(int index,
double weight)
Sets the weight for the specified feature in P |
void |
setPWeights(double[] weights)
Sets the weights of all features in P |
void |
setQWeight(int index,
double weight)
Sets the weight for the specified feature in Q |
void |
setQWeights(double[] weights)
Sets the weights of all features in Q |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Signatures(Signatures sig)
sig
- The signature to clonepublic Signatures(double[][] costMatrix) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidMatrixException, QueryProcessor.SF.ScoringFunction.EMD.InvalidDummyCostException
costMatrix
- The Cost-Matrix for transporting weights from P to Q (starting at [0, 0])
InvalidMatrixException
- If the specified Matrix is invalid
InvalidDummyCostException
- If the dimensions of the dummyvectors are not matching the dimensions of the costmatrixpublic Signatures(double[][] costMatrix, double[] pDummyCostVector, double[] qDummyCostVector) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidMatrixException, QueryProcessor.SF.ScoringFunction.EMD.InvalidDummyCostException
costMatrix
- The Cost-Matrix for transporting weights from P to Q (starting at [0, 0])pDummyCostVector
- The Cost-Vector for Siganture P if requiredqDummyCostVector
- The Cost-Vector for Siganture Q if required
InvalidMatrixException
- If the specified Matrix is invalid
InvalidDummyCostException
- If the dimensions of the dummyvectors are not matching the dimensions of the costmatrixpublic Signatures(java.lang.Object[] pFeatures, java.lang.Object[] qFeatures, QueryProcessor.SF.ScoringFunction.EMD.GroundDistance groundDistance) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidFeatureException
pFeatures
- The features of signature PqFeatures
- The features of signature QgroundDistance
- The function for calculating a distance between to features of P and Q
InvalidFeatureException
- If no features are supplyedpublic Signatures(java.lang.Object[] pFeatures, java.lang.Object[] qFeatures, QueryProcessor.SF.ScoringFunction.EMD.GroundDistance groundDistance, java.lang.Object pDummyFeature, java.lang.Object qDummyFeature) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidFeatureException
pFeatures
- The features of signature PqFeatures
- The features of signature QgroundDistance
- The function for calculating a distance between to features of P and QpDummyFeature
- The Dummy-Feature of P if requred (null means zero-cost dummy-features for P)qDummyFeature
- The Dummy-Feature of Q if requred (null means zero-cost dummy-features for Q)
InvalidFeatureException
- If no features are supplyedMethod Detail |
---|
public int getPSize()
public int getSimplePSize()
public int getQSize()
public int getSimpleQSize()
public double getPWeightSum()
public double getQWeightSum()
public double getPWeight(int index) throws java.lang.IndexOutOfBoundsException
index
- The index of the feature (Starting at 1)
java.lang.IndexOutOfBoundsException
- If index is not matching the signaturepublic void setPWeight(int index, double weight) throws java.lang.IndexOutOfBoundsException
index
- The index of the feature (Starting at 1)weight
- The weight
java.lang.IndexOutOfBoundsException
- If index is not matching the signaturepublic void setPWeights(double[] weights) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidWeightsVectorException
weights
- The weights vector
InvalidWeightsVectorException
- If index is not matching the signaturepublic double getQWeight(int index) throws java.lang.IndexOutOfBoundsException
index
- The index of the feature (Starting at 1)
java.lang.IndexOutOfBoundsException
- If index is not matching the signaturepublic void setQWeight(int index, double weight) throws java.lang.IndexOutOfBoundsException
index
- The index of the feature (Starting at 1)weight
- The weight
java.lang.IndexOutOfBoundsException
- If index is not matching the signaturepublic void setQWeights(double[] weights) throws QueryProcessor.SF.ScoringFunction.EMD.InvalidWeightsVectorException
weights
- The weights vector
InvalidWeightsVectorException
- If index is not matching the signaturepublic double getCost(int i, int j) throws java.lang.IndexOutOfBoundsException
i
- (Starting at 1)j
- (Starting at 1)
java.lang.IndexOutOfBoundsException
- If index is not matching the signature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |