Skip to content

Commit 5e3f5a2

Browse files
committed
Hashing ok without expansion (which may break)
Has been crashing ubuntu on my old Dell laptop:(
1 parent d08ad0b commit 5e3f5a2

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

src/algorithms/controllers/HashingInsertion.js

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -199,42 +199,14 @@ export default {
199199
chunker.add(
200200
IBookmarks.CheckTableFull,
201201
(vis, total) => {
202-
vis.array.showKth({fullCheck: "Table is rather full " + total + "/" + table.length
202+
vis.array.showKth({fullCheck: "Table is quite full " + total + "/" + table.length
203203
+ rightarrow + "Expanding table..."});
204204
},
205205
[total]
206206
);
207207
[table, indexArr, valueArr, nullArr] = expandAndReinsert(table, 1)
208208
}
209-
/*
210-
if (limit()) {
211-
chunker.add(
212-
IBookmarks.CheckTableFull,
213-
(vis, total) => {
214-
vis.array.showKth({fullCheck: "Table is too full " + total + "/" + table.length + " \u{2192} " // rightarrow
215-
+ ((params.expand) ? "Expanding table..." : "Stopping...")});
216-
},
217-
[total]
218-
)
219-
//XXX expand table here; return whatever is needed to carry on
220-
[table, indexArr, valueArr, nullArr] = expandAndReinsert(table, 1);
221-
return FULL_SIGNAL;
222-
}
223-
*/
224-
// Chunker for when the table is not full
225-
// Proceed time:)
226-
/*
227-
else {
228-
chunker.add(
229-
IBookmarks.CheckTableFull,
230-
(vis, total) => {
231-
newCycle(vis, table.length, key, ALGORITHM_NAME); // New insert cycle
232-
vis.array.showKth({fullCheck: "Table has enough space " + total + "/" + table.length });
233-
},
234-
[total]
235-
)
236-
}
237-
*/
209+
// Proceed time:) - Enough space (now) to insert element
238210

239211
insertions++; // Increment insertions
240212
total++; // Increment total

0 commit comments

Comments
 (0)