net.obsearch.index.ghs
Class SketchProjection
java.lang.Object
net.obsearch.index.ghs.SketchProjection
- All Implemented Interfaces:
- Comparable<SketchProjection>, Projection<SketchProjection,CBitVector>
public final class SketchProjection
- extends Object
- implements Projection<SketchProjection,CBitVector>
SketchProjection
public SketchProjection(byte[] ordering,
CBitVector sketch,
int distance,
double[] lowerBounds)
toString
public String toString()
- Overrides:
toString
in class Object
setDistance
public void setDistance(int distance)
setSketch
public void setSketch(CBitVector sketch)
getDistance
public int getDistance()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
compareTo
public int compareTo(SketchProjection o)
- Specified by:
compareTo
in interface Comparable<SketchProjection>
getCompactRepresentation
public CBitVector getCompactRepresentation()
- Specified by:
getCompactRepresentation
in interface Projection<SketchProjection,CBitVector>
getSketch
public CBitVector getSketch()
getAddress
public byte[] getAddress()
- Specified by:
getAddress
in interface Projection<SketchProjection,CBitVector>
distance
public SketchProjection distance(CBitVector b)
- Calculate the distance between the given bitvector and this sketch projection
Return a sketch projection with the quality measurements based on the data found in this object.
- Specified by:
distance
in interface Projection<SketchProjection,CBitVector>
- Parameters:
b
-
- Returns:
hamming
public int hamming(CBitVector b)
Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.