TODO
This commit is contained in:
parent
3e3960583b
commit
ab92139e1e
10
src/lib.rs
10
src/lib.rs
@ -9,6 +9,13 @@
|
|||||||
/// https://github.com/bmc/munkres/blob/master/munkres.py
|
/// https://github.com/bmc/munkres/blob/master/munkres.py
|
||||||
/// which is Copyright (c) 2008 Brian M. Clapper.
|
/// which is Copyright (c) 2008 Brian M. Clapper.
|
||||||
|
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// * Use bitarrays for Coverage.
|
||||||
|
// * Implement SquareMatrix. Get rid of nalgebra.
|
||||||
|
// * Reuse path Vec in step5
|
||||||
|
// * Cleanup
|
||||||
|
|
||||||
extern crate nalgebra as na;
|
extern crate nalgebra as na;
|
||||||
|
|
||||||
use na::{DMat, BaseNum};
|
use na::{DMat, BaseNum};
|
||||||
@ -16,8 +23,6 @@ use std::ops::{Add, Neg, Sub};
|
|||||||
use std::num::Zero;
|
use std::num::Zero;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
||||||
// XXX: optimize: Use bool array. Use only one array with 2*n entries.
|
|
||||||
//
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Coverage {
|
struct Coverage {
|
||||||
n: usize,
|
n: usize,
|
||||||
@ -131,7 +136,6 @@ impl<T> WeightMatrix<T> where T: BaseNum + Ord + Eq + Sub<Output=T> + Copy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Find the first uncovered element with value 0 `find_a_zero`
|
/// Find the first uncovered element with value 0 `find_a_zero`
|
||||||
fn find_uncovered_zero(&self, cov: &Coverage) -> Option<(usize, usize)> {
|
fn find_uncovered_zero(&self, cov: &Coverage) -> Option<(usize, usize)> {
|
||||||
let n = self.n();
|
let n = self.n();
|
||||||
|
Loading…
Reference in New Issue
Block a user