Index: doc/theses/thierry_delisle_PhD/code/snzi.hpp
===================================================================
--- doc/theses/thierry_delisle_PhD/code/snzi.hpp	(revision 8f4f3e011b82e24cb29298d4c287f628022b4126)
+++ doc/theses/thierry_delisle_PhD/code/snzi.hpp	(revision 3bf812bc9893e42830e8a2f1b408a45f288b4262)
@@ -11,13 +11,13 @@
 	std::unique_ptr<snzi_t::node[]> nodes;
 
-	snzi_t(unsigned depth);
+	snzi_t(unsigned depth, unsigned base = 2);
 
 	void arrive(int idx) {
-		idx &= mask;
+		idx %= mask;
 		nodes[idx].arrive();
 	}
 
 	void depart(int idx) {
-		idx &= mask;
+		idx %= mask;
 		nodes[idx].depart();
 	}
@@ -145,12 +145,12 @@
 };
 
-snzi_t::snzi_t(unsigned depth)
-	: mask((1 << depth) - 1)
-	, root( ((1 << depth) * 2) - 2)
+snzi_t::snzi_t(unsigned depth, unsigned base)
+	: mask( std::pow(base, depth) )
+	, root( ((std::pow(base, depth + 1) - 1) / (base -1)) - 1 )
 	, nodes(new node[ root + 1 ]())
 {
-	int width = (1 << depth);
+	int width = std::pow(base, depth);
 	for(int i = 0; i < root; i++) {
-		nodes[i].parent = &nodes[(i / 2) + width ];
+		nodes[i].parent = &nodes[(i / base) + width ];
 	}
 }
