Bhargav Srinivasan
84406d98e4
removing redundant assert
2020-09-22 05:12:21 -07:00
Bhargav Srinivasan
778bb4b324
return not found error correctly
2020-09-22 03:50:28 -07:00
Bhargav Srinivasan
983830a4ae
replace linearSearch with mem.indexOfScalar, return not found error, factor out siftUp from addUnchecked, use compareFn to decide siftUp/siftDown
2020-09-22 03:46:13 -07:00
Bhargav Srinivasan
a5140cc902
implemented efficient heapreplace
2020-09-22 02:12:35 -07:00
Bhargav Srinivasan
1345f87f4e
items are not sorted, using linear search
2020-09-22 01:50:22 -07:00
Bhargav Srinivasan
69f0fc513a
sorry, local compiler using different version of zig
2020-09-22 01:36:41 -07:00
Bhargav Srinivasan
f083ea88d8
using binary search function from std.sort
2020-09-22 01:05:33 -07:00
Bhargav Srinivasan
26de64be13
adding a function to update the priority of an element
2020-09-21 23:09:22 -07:00
Literally Void
78baa16da0
Fix issue #6303 : iterating empty PriorityQueue crashes
2020-09-10 12:00:53 +03:00
Andrew Kelley
4a69b11e74
add license header to all std lib files
...
add SPDX license identifier
copyright ownership is zig contributors
2020-08-20 16:07:04 -04:00
joachimschmidt557
0ae1157e45
std.mem.dupe is deprecated, move all references in std
...
Replaced all occurences of std.mem.dupe in stdlib with
Allocator.dupe/std.mem.dupeZ -> Allocator.dupeZ
2020-07-04 21:40:06 +03:00
Vexu
76681e6b96
Make PriorityQueue.Iterator public
...
The `iterator` function was already public but these seem to have been forgotten.
2020-05-13 18:38:03 +03:00
Benjamin Feng
b077f3ab7d
Promoted "leak_count_allocator" to the main testing.allocator
2020-01-29 22:22:00 -06:00
Benjamin Feng
aa9caf5064
Create leak_count_allocator
2020-01-29 14:37:01 -06:00
Benjamin Feng
4d134a01f5
Move debug.global_allocator to testing.allocator
2020-01-29 12:21:29 -06:00
Nathan Michaels
38ce7f64e3
Add removeIndex function to PriorityQueue ( #4070 )
...
It's awkward to use, but lets me cancel events in an event queue.
Co-authored-by: Dmitry Atamanov <data-man@users.noreply.github.com>
2020-01-08 13:55:47 -05:00
Andrew Kelley
8b2622cdd5
std.fmt.format: tuple parameter instead of var args
2019-12-08 22:53:51 -05:00
Andrew Kelley
bf3ac66150
remove type coercion from array values to references
...
* Implements #3768 . This is a sweeping breaking change that requires
many (trivial) edits to Zig source code. Array values no longer
coerced to slices; however one may use `&` to obtain a reference to
an array value, which may then be coerced to a slice.
* Adds `IrInstruction::dump`, for debugging purposes. It's useful to
call to inspect the instruction when debugging Zig IR.
* Fixes bugs with result location semantics. See the new behavior test
cases, and compile error test cases.
* Fixes bugs with `@typeInfo` not properly resolving const values.
* Behavior tests are passing but std lib tests are not yet. There
is more work to do before merging this branch.
2019-11-27 03:37:50 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as
2019-11-08 15:57:24 -05:00
Nathan Michaels
1f0bcefe4a
Document PriorityQueue.
2019-10-30 01:05:00 -04:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
...
that's all this commit does. further commits will fix cli flags and
such.
see #2221
2019-09-25 23:35:41 -04:00