Lucas Perlind
f029b4beb1
Add more utility procedures to small array
2022-12-21 13:00:33 +11:00
gingerBill
035c75d6a9
Add contextless where appropriate
2022-11-11 11:23:59 +00:00
Colin Davidson
7a6fc3a93b
Add bounds check for peeks
2022-08-29 02:03:12 -07:00
Colin Davidson
83c002c197
add peeks
2022-08-29 01:53:40 -07:00
Colin Davidson
6c2e0b09ba
Add more queue helpers
2022-08-29 00:43:35 -07:00
Jeroen van Rijn
e40b3ad338
Remove unused n from PQ; add reflect.is_bit_set
2022-08-18 18:00:25 +02:00
gingerBill
79eb7b52d9
Merge pull request #1828 from JungerBoyo/patch-2
...
front() and back()
2022-06-12 16:17:39 +01:00
JungerBoyo
78e6cd0c60
front() and back()
...
based on pop_front(), pop_back()
2022-06-04 00:12:34 +02:00
JungerBoyo
ad6b3bd95f
unset function
...
unset function, clear single bits
2022-06-03 15:53:14 +02:00
sduman
9ce64916e6
Add missing result parameter names
...
This adds some missing result parameters names back to pop_front_safe.
Currently it the procedure won't compile since it's referencing missing variable names.
2022-04-28 17:08:48 -06:00
gingerBill
3a9b0a22e7
Add core:container/intrusive/list
2022-04-27 14:27:33 +01:00
hanabi1224
ded8342f3f
Reduce allocations
2022-04-19 20:46:33 +08:00
hanabi1224
4247ba67ed
Fix bugs in core:container/lru
2022-04-18 15:24:54 +08:00
gingerBill
2289b7a33d
Remove #caller_location from certain calls in core:container/small_array
2022-04-04 17:04:05 +01:00
Jeroen van Rijn
ce057ff755
[bit_array] Really fix the leak.
2022-03-06 12:29:17 +01:00
Andrea Piseri
bff3426d25
Fix leak in core:container/bit_array
...
calling `clear` on a `bit_array` no longer leaks the previous
allocation, instead it sets all bits to `false` preserving the same
backing dynamic array.
2022-03-06 10:21:46 +01:00
ap29600
697f8c7ee6
replace a branch with max in core:container/bit_array.set
2022-02-05 18:46:25 +01:00
Andrea Piseri
b6ebfe4b2c
rename iterator procedures
2022-02-05 18:11:48 +01:00
Andrea Piseri
bccbdefde9
Update interface to allow more modes of iteration
...
It's now possible to iterate over:
- all keys in the range min_value ..= max_value, with `iterate_all`
- all set keys in the bit array, with `iterate_set`
- all unset keys in the range min_value ..= max_value, with `iterate_unset`
`Bit_Array` now stores the `max_value` provided during construction, and
updates it when a key that was previously out of range is set.
2022-02-05 18:00:59 +01:00
ap29600
b54fc96b1e
rename iterator proc to next, add named return values
2022-02-04 22:39:47 +01:00
Andrea Piseri
48af78e469
add iterator to core:container/bit_array
2022-02-04 22:12:07 +01:00
gingerBill
76edfae0e0
core:container/topological_sort
2022-02-04 12:08:20 +00:00
gingerBill
35533a7baa
Update core:container/lru to support clear and take a boolean to indicate whether or not to call the on_remove procedure on clear or destroy
2022-02-02 23:38:32 +00:00
gingerBill
a04d849e30
core:container/lru
2022-02-01 15:24:37 +00:00
gingerBill
fb86c23dbd
Keep -vet happy
2022-01-25 16:41:31 +00:00
Jeroen van Rijn
515fd2a228
bit_array: Fix initial size.
2022-01-25 17:08:32 +01:00
CiD-
6cf5371d7d
fix push_back and pop_front
2022-01-14 10:17:49 -05:00
gingerBill
a60b9735a2
Add core:container/queue
2022-01-01 15:46:22 +00:00
gingerBill
43763ddfda
Correct _shift_down logic
2022-01-01 13:44:37 +00:00
gingerBill
70ed280c5a
Fix typo in priority_queue.odin and add default_swap_proc
2022-01-01 13:11:53 +00:00
gingerBill
c7ff296bef
Change the implementation of Priority_Queue to have a better interface that allows for a less and swap procedure
2021-12-30 13:42:10 +00:00
gingerBill
ed8b20da78
Add core:container/priority_queue
2021-12-29 14:38:39 +00:00
gingerBill
a66f859fb4
Minor improvements to core:container/small_array
2021-12-29 11:58:27 +00:00
gingerBill
c46e7eda1d
Add core:container/small_array
2021-12-29 11:26:22 +00:00
Jeroen van Rijn
53e30e4621
[core:container/bit_vector] Create new package.
...
A dynamic bit array, optionally allowing negative indices.
2021-12-28 15:38:12 +01:00
gingerBill
7f61a90ea1
Remove core:container contents
2021-12-28 14:05:09 +00:00
gingerBill
344abf2cb2
Make core and vendor adhere to -vet, -strict-style, and -disallow-do
2021-09-11 16:40:19 +01:00
gingerBill
251da264ed
Remove unneeded semicolons from the core library
2021-08-31 22:21:13 +01:00
gingerBill
f0437a4242
Enforce core:builtin and core:intrinsics for imports
2021-08-21 13:44:16 +01:00
streof
114efbc57c
Fix error: Cannot assign to a procedure parameter
2021-07-09 14:03:49 +02:00
streof
2c71494ad1
Fix error: Undeclared name: p
2021-07-09 13:54:27 +02:00
gingerBill
3e7aabe6d8
Change uses for parapoly records to use $ always
2021-06-14 11:43:35 +01:00
gingerBill
266b5d7d85
Fix container/map.odin
2021-06-01 09:26:01 +01:00
gingerBill
43ac6ca8f4
Add linalg.matrix_cast
2021-03-26 16:24:56 +00:00
breeo
24e7b5ea78
Add container.Priority_Queue
2021-03-25 15:50:33 +01:00
gingerBill
5faa560f82
Make container.Map have similar semantics to the built-in map type
2020-12-15 23:23:07 +00:00
Tetralux
213864a50c
Reuse container.Queue capacity when calling pop_front()
...
Currently, the Queue will never reuse it's full capacity if you call `pop_front`, even if you empty it before pushing more items.
With this change, if you empty the Queue with `pop_front`, then the offset will be set back to the start of the underlying array when you pop the last item.
Future pushes will then reuse the already-allocated--but now empty--space.
2020-10-26 00:12:31 +00:00
gingerBill
3a4f0d85a6
Fix container.Array and container.Ring
2020-10-01 17:04:56 +01:00
gingerBill
fc4fdd588e
Remove usage of do in core library
2020-09-23 17:17:14 +01:00
gingerBill
b8bebf4511
Fix typo in Small_Array procedure
2020-09-14 10:10:35 +01:00