it.unimi.dsi.sux4j.util
Class ShiftAddXorSignedStringMap

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<java.lang.CharSequence>
      extended by it.unimi.dsi.sux4j.util.ShiftAddXorSignedStringMap
All Implemented Interfaces:
Function<java.lang.CharSequence,java.lang.Long>, Object2LongFunction<java.lang.CharSequence>, StringMap<java.lang.CharSequence>, java.io.Serializable

Deprecated. Moved to the DSI utilities.

@Deprecated
public class ShiftAddXorSignedStringMap
extends AbstractObject2LongFunction<java.lang.CharSequence>
implements StringMap<java.lang.CharSequence>, java.io.Serializable

A string map based on a minimal perfect hash signed using Shift-Add-Xor hashes.

See Also:
Serialized Form

Field Summary
protected  Object2LongFunction<java.lang.CharSequence> hash
          Deprecated. The underlying map.
protected  long mask
          Deprecated. The mask to get only width nonzero bits.
protected  int shift
          Deprecated. The left shift to get only width nonzero bits.
protected  LongBigList signatures
          Deprecated. Signatures.
protected  int width
          Deprecated. The width in bits of each signature.
 
Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
defRetValue
 
Constructor Summary
ShiftAddXorSignedStringMap(java.util.Iterator<? extends java.lang.CharSequence> iterator, Object2LongFunction<java.lang.CharSequence> map)
          Deprecated. Creates a new shift-add-xor signed string map using a given hash map and 32-bit signatures.
ShiftAddXorSignedStringMap(java.util.Iterator<? extends java.lang.CharSequence> iterator, Object2LongFunction<java.lang.CharSequence> map, int signatureWidth)
          Deprecated. Creates a new shift-add-xor signed string map using a given hash map.
 
Method Summary
 boolean containsKey(java.lang.Object o)
          Deprecated.  
 java.lang.Long get(java.lang.Object o)
          Deprecated.  
 long getLong(java.lang.Object o)
          Deprecated.  
 ObjectList<java.lang.CharSequence> list()
          Deprecated.  
static void main(java.lang.String[] arg)
          Deprecated.  
 int size()
          Deprecated.  
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction
clear, defaultReturnValue, defaultReturnValue, put, put, remove, removeLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction
defaultReturnValue, defaultReturnValue, put, removeLong
 
Methods inherited from interface it.unimi.dsi.fastutil.Function
clear, put, remove
 

Field Detail

hash

protected final Object2LongFunction<java.lang.CharSequence> hash
Deprecated. 
The underlying map.


signatures

protected final LongBigList signatures
Deprecated. 
Signatures.


width

protected final int width
Deprecated. 
The width in bits of each signature.


shift

protected final int shift
Deprecated. 
The left shift to get only width nonzero bits.


mask

protected final long mask
Deprecated. 
The mask to get only width nonzero bits.

Constructor Detail

ShiftAddXorSignedStringMap

public ShiftAddXorSignedStringMap(java.util.Iterator<? extends java.lang.CharSequence> iterator,
                                  Object2LongFunction<java.lang.CharSequence> map)
Deprecated. 
Creates a new shift-add-xor signed string map using a given hash map and 32-bit signatures.

Parameters:
iterator - an iterator enumerating a set of strings.
map - a minimal perfect hash for the strings enumerated by iterator; it must support size() and have default return value -1.

ShiftAddXorSignedStringMap

public ShiftAddXorSignedStringMap(java.util.Iterator<? extends java.lang.CharSequence> iterator,
                                  Object2LongFunction<java.lang.CharSequence> map,
                                  int signatureWidth)
Deprecated. 
Creates a new shift-add-xor signed string map using a given hash map.

Parameters:
iterator - an iterator enumerating a set of strings.
map - a minimal perfect hash for the strings enumerated by iterator; it must support size() and have default return value -1.
signatureWidth - the width, in bits, of the signature of each string.
Method Detail

getLong

public long getLong(java.lang.Object o)
Deprecated. 
Specified by:
getLong in interface Object2LongFunction<java.lang.CharSequence>

get

public java.lang.Long get(java.lang.Object o)
Deprecated. 
Specified by:
get in interface Function<java.lang.CharSequence,java.lang.Long>
Overrides:
get in class AbstractObject2LongFunction<java.lang.CharSequence>

containsKey

public boolean containsKey(java.lang.Object o)
Deprecated. 
Specified by:
containsKey in interface Function<java.lang.CharSequence,java.lang.Long>

size

public int size()
Deprecated. 
Specified by:
size in interface Function<java.lang.CharSequence,java.lang.Long>

list

public ObjectList<java.lang.CharSequence> list()
Deprecated. 
Specified by:
list in interface StringMap<java.lang.CharSequence>

main

public static void main(java.lang.String[] arg)
                 throws java.lang.NoSuchMethodException,
                        java.io.IOException,
                        JSAPException
Deprecated. 
Throws:
java.lang.NoSuchMethodException
java.io.IOException
JSAPException