1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00
This commit is contained in:
Justin Lin
2022-03-12 16:30:01 +08:00
parent 6df459370e
commit ed01eebf16
4 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ function _dedup(elems, leng, buckets, eq, hash, bucket_numbers) =
n_buckets
]
)
_dedup_add(n_buckets_lt[len(n_buckets_lt) - 1], [end, elems[end]], eq, hash, bucket_numbers);
_dedup_add(n_buckets_lt[end - 1], [end, elems[end]], eq, hash, bucket_numbers);
function _dedup_add(buckets, i_elem, eq, hash, bucket_numbers) =

View File

@@ -4,4 +4,4 @@ function _shuffle(lt, indices, leng) =
let(end = len(lt) - 1)
end == 0 ? lt :
let(cum = [for(i = 0, s = swap(lt, i, indices[i]); i < end; i = i + 1, s = swap(s, i, indices[i])) s])
swap(cum[len(cum) - 1], end, indices[end]);
swap(cum[end - 1], end, indices[end]);

View File

@@ -10,4 +10,4 @@ function _hashmap(kv_lt, leng, buckets, b_numbers, eq, hash) =
n_buckets
]
)
_hashmap_put(n_buckets_lt[len(n_buckets_lt) - 1], b_numbers, kv_lt[end][0], kv_lt[end][1], eq, hash);
_hashmap_put(n_buckets_lt[end - 1], b_numbers, kv_lt[end][0], kv_lt[end][1], eq, hash);

View File

@@ -10,6 +10,6 @@ function _hashset(lt, leng, buckets, b_numbers, eq, hash) =
n_buckets
]
)
_hashset_add(n_buckets_lt[len(n_buckets_lt) - 1], b_numbers, lt[end], eq, hash);
_hashset_add(n_buckets_lt[end - 1], b_numbers, lt[end], eq, hash);