uk.ac.ic.doc.automed.util.hashing
Class OrderPreservedHashing

java.lang.Object
  extended by uk.ac.ic.doc.automed.util.hashing.OrderPreservedHashing
All Implemented Interfaces:
StringHash

public class OrderPreservedHashing
extends java.lang.Object
implements StringHash

OrderPreservedHashing.java Hashes a string but preserves the order, i.e. s1 op s2 => h(s1> op h(s2) where op = {<, <=, =, >, >=, !=}

Version:
1.0 Department of Computing, Imperial College
Author:
Duc M Le dmle@doc.ic.ac.uk

Constructor Summary
OrderPreservedHashing()
          Creates a new instance of StructurePreservedHashing
 
Method Summary
 java.lang.String getName()
          Unique name of this hash
 int hash(java.lang.String s, int numBits)
          Hash a
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderPreservedHashing

public OrderPreservedHashing()
Creates a new instance of StructurePreservedHashing

Method Detail

hash

public int hash(java.lang.String s,
                int numBits)
Hash a

Specified by:
hash in interface StringHash

getName

public java.lang.String getName()
Unique name of this hash

Specified by:
getName in interface StringHash