Michael Neumann
881bb16f65
Use FixedBitSet#ones() iterator
...
Improves performance by about 5%
2019-04-07 12:18:56 +02:00
Michael Neumann
841fc0c4da
Use FixedBitSet#ones() iterator and rename function again
...
Improves performance by about 10%.
2019-04-07 12:08:38 +02:00
Michael Neumann
aa33d76281
Rename function
2019-04-07 12:00:00 +02:00
Michael Neumann
bf353be676
Invert logic in Coverage "matrix"
...
The idea here is to use FixedBitSet#ones() iterator in the next commit.
2019-04-07 11:55:18 +02:00
Michael Neumann
417ccc2c9f
Run benchmark with N=50
...
N=100 takes too long (~350 seconds) when running with criterion.rs and I
don't know how to limit the number of samples taken (100).
2019-04-07 11:48:22 +02:00
Michael Neumann
8adec9a9ee
Coverage: rename {rows, columns} -> covered_{rows, columns}
2019-04-07 11:23:17 +02:00
Michael Neumann
16bc0a7cbd
Refactor Coverage
2019-04-07 11:19:54 +02:00
Michael Neumann
44847c04e1
Breaking API - Return Vec<Position> from solve_assignment()
...
Also simplify some test cases.
2019-04-07 11:02:57 +02:00
Michael Neumann
9ec92b7bff
Refactor - breaking changes to API
...
* Rename col -> column in parameters and method names.
* Replace (usize, usize) by struct Position. This makes it more explicit
what the row and column index is.
* Make MarkMatrix a trait and provide two implementation
MarkMatrixByteArray and MarkMatrixBitArray.
* Add solve_assignment_generic which can be used with an alternative
MarkMatrix implementation
2019-04-07 10:35:52 +02:00
Michael Neumann
0a9551aaf1
Upgrade ndarray version
2019-04-06 22:53:44 +02:00
Michael Neumann
9be159c4fd
Use criterion for benchmarks
...
We no longer need nightly rust to run benchmarks (or tests).
2019-04-06 20:36:00 +02:00
Michael Neumann
c1b4498a65
Rust rustfmt
2019-04-06 20:10:57 +02:00
Michael Neumann
9ef1acacd8
Use WeightNum into separate module
2019-04-06 20:10:41 +02:00
Michael Neumann
2824a1123f
Changes for Cargo edition 2018
2019-04-06 20:05:22 +02:00
Michael Neumann
d52fb6c257
And avoid line breaks within the string
2018-02-05 10:13:45 +01:00
Michael Neumann
5ed0b6b394
Slightly shorten the description
2018-02-05 10:12:59 +01:00
Michael Neumann
812942832b
Release version 0.4.0
2018-01-30 15:17:12 +01:00
Michael Neumann
73910f7dde
Return Error enum instead of static str
2018-01-30 15:16:47 +01:00
Michael Neumann
c7dd965658
Get rid of panics. Return Result instead
2018-01-30 15:12:51 +01:00
Michael Neumann
46599ee62a
Reformat source code using "cargo fmt"
2018-01-30 15:09:27 +01:00
Michael Neumann
75f19c85cd
Document time complexity O(n^3) of the algorithm
2018-01-30 15:03:03 +01:00
Michael Neumann
4e6ba86258
Merge pull request #6 from mjkillough/disallowed
...
Support for disallowed assignments.
2018-01-30 14:51:37 +01:00
Michael Neumann
fcdd4e4b79
Merge pull request #5 from Antti/switch-to-ndarray
...
Switch to ndarray crate for the SquareMatrix
2018-01-30 12:41:41 +01:00
Michael Killough
d3e2c23415
Support for disallowed assignments.
...
Add support for disallowed assignments, and include a check to avoid
attempting to solve unsolvable matrices (where a row only has disallowed
values).
For now only allow `f32`/`f64`, as we can use `INFINITY` to encode a
disallowed assignment.
This is a re-implementation of most of bmc/munkres#20 , but is missing
the changes to `step6`, which attempt to detect when we're not making
progress. I couldn't implement this without regressing performance and I
am not sure they add much given we're checking `is_solvable()` before
attempting to solve.
2017-11-07 12:21:19 +00:00
Andrii Dmytrenko
ad0d85a2c4
Remove square_matrix module
2017-11-07 11:26:00 +00:00
Michael Neumann
9596e3eef1
Merge pull request #4 from olleolleolle/patch-1
...
README: Use SVG for shiny badge
2017-10-25 16:57:42 +02:00
Andrii Dmytrenko
092818ab88
Use ndarray to implement SquareMatrix
2017-10-16 16:34:14 +01:00
Olle Jonsson
9a52140c0c
README: Use SVG for shiny badge
...
- [ci skip]
2017-08-22 16:06:53 +02:00
Michael Neumann
b34aa6b2eb
Remove unstable feature zero_one (Zero trait)
...
This allows this library to be build with a stable Rust release.
2016-07-16 13:40:13 +02:00
Michael Neumann
5f90104607
Update version to 0.2.0
2016-02-27 22:48:09 +01:00
Michael Neumann
9e72192398
Slightly improve performance by reusing path
2016-02-27 22:43:08 +01:00
Michael Neumann
ba128c0c93
Add is_zero() to trait WeightNum
2016-02-27 22:36:04 +01:00
Michael Neumann
ed7c417013
Remove benchmarks with 1000 or 2000. It's too slow
2016-02-27 22:30:53 +01:00
Michael Neumann
7ab7269164
Some minor changes
2016-02-27 22:30:06 +01:00
Michael Neumann
92b390ce88
Add some more test cases which detected the bug fix in
...
51c5b7638f
2016-02-27 20:46:35 +01:00
Michael Neumann
7feb1fcdaf
unmark() need not be public.
2016-02-27 20:45:46 +01:00
Michael Neumann
a3a79cc599
Add some more debug assertions
2016-02-27 20:45:11 +01:00
Michael Neumann
51c5b7638f
BUG FIX! If we cover a row and column, we have to leave the column
...
loop.
This degrades performance by a LOT!
2016-02-27 20:44:02 +01:00
Michael Neumann
75a5f20802
Add test case for WeightMatrix
2016-02-27 19:30:33 +01:00
Michael Neumann
999470f6ed
Add test cases for SquareMatrix
2016-02-27 19:21:08 +01:00
Michael Neumann
1e3068fc29
Version 0.1.0
2015-12-21 15:48:24 +01:00
Michael Neumann
1abfbf5ada
Add todo itemAdd todo itemAdd todo itemAdd todo itemAdd todo itemAdd todo itemAdd todo itemAdd todo item
2015-11-29 17:31:11 +01:00
Michael Neumann
f47fb4eb32
Use associated type
2015-11-29 17:18:55 +01:00
Michael Neumann
482bf47cd0
Introduce trait Weights
2015-11-29 17:14:50 +01:00
Michael Neumann
b69aa2c942
rustfmt
2015-11-29 16:31:58 +01:00
Michael Neumann
57dbd9c7b4
rustfmt
2015-11-29 16:31:50 +01:00
Michael Neumann
2eb5f8994f
Move WeightMatrix into it's own module
2015-11-29 16:30:27 +01:00
Michael Neumann
98b367d434
Use more compact representation of Mark
2015-11-29 16:24:36 +01:00
Michael Neumann
883165b0d5
Refactor
2015-11-29 16:18:19 +01:00
Michael Neumann
5b5849cd40
Operating directly on bit-representation is not much faster.
2015-11-29 16:10:34 +01:00