net.obsearch.index.perm
Class PermProjection

java.lang.Object
  extended by net.obsearch.index.perm.PermProjection
All Implemented Interfaces:
Comparable<PermProjection>, Projection<PermProjection,CompactPerm>

public class PermProjection
extends Object
implements Projection<PermProjection,CompactPerm>


Constructor Summary
PermProjection(CompactPerm addr, int distance)
           
 
Method Summary
 int compareTo(PermProjection o)
           
 PermProjection distance(CompactPerm b)
          Calculate the distance of this projection and the given compact representation.
 byte[] getAddress()
           
 CompactPerm getCompactRepresentation()
           
 int getDistance()
           
 void set(int i, short pivot)
           
 int sfrDistance(CompactPerm b)
           
static byte[] shortToBytes(short[] addr)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermProjection

public PermProjection(CompactPerm addr,
                      int distance)
Method Detail

getAddress

public byte[] getAddress()
Specified by:
getAddress in interface Projection<PermProjection,CompactPerm>

shortToBytes

public static byte[] shortToBytes(short[] addr)

getCompactRepresentation

public CompactPerm getCompactRepresentation()
Specified by:
getCompactRepresentation in interface Projection<PermProjection,CompactPerm>

compareTo

public int compareTo(PermProjection o)
Specified by:
compareTo in interface Comparable<PermProjection>

getDistance

public int getDistance()

distance

public PermProjection distance(CompactPerm b)
Description copied from interface: Projection
Calculate the distance of this projection and the given compact representation.

Specified by:
distance in interface Projection<PermProjection,CompactPerm>
Returns:

sfrDistance

public int sfrDistance(CompactPerm b)

toString

public String toString()
Overrides:
toString in class Object

set

public void set(int i,
                short pivot)


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.