nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: App.nit Data Store
[nit.git]
/
lib
/
perfect_hashing.nit
diff --git
a/lib/perfect_hashing.nit
b/lib/perfect_hashing.nit
index
9ac59f3
..
1a74641
100644
(file)
--- a/
lib/perfect_hashing.nit
+++ b/
lib/perfect_hashing.nit
@@
-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
# 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
# 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
# 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
end
# Returns a mask composed by discriminants bits