neo: Complete the documentation of neo.nit.
[nit.git] / lib / perfect_hashing.nit
index 9ac59f3..1a74641 100644 (file)
@@ -24,19 +24,17 @@ class Perfecthashing
        # Union of interval for implementing perfect numbering
        # Represents the interval of free identifiers
        # A null value represents the upper bound of identifier
-       private var interval: List[Couple[nullable Int, nullable Int]]
+       private var interval = new List[Couple[nullable Int, nullable Int]]
 
        # An array used as a temporary Hashtable for 
        # checking there is no collision between identifiers
-       private var tempht: Array[nullable Int]
+       private var tempht = new Array[nullable Int]
 
        # Initialize the structure of free identifiers
        init
        do
                # By default, all identifiers are available
-               interval = new List[Couple[nullable Int, nullable Int]]
-               interval.push(new Couple[nullable Int, nullable Int](0, null))
-               tempht = new Array[nullable Int]
+               interval.push(new Couple[nullable Int, nullable Int](1, null))
        end
        
        # Returns a mask composed by discriminants bits