diff --git a/src/lib.rs b/src/lib.rs index 575106a..6ba2e27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -88,12 +88,12 @@ impl Coverage { } #[derive(Debug)] -struct WeightMatrix { +pub struct WeightMatrix { c: SquareMatrix } impl WeightMatrix where T: BaseNum + Ord + Eq + Sub + Copy { - fn from_row_vec(n: usize, data: Vec) -> WeightMatrix { + pub fn from_row_vec(n: usize, data: Vec) -> WeightMatrix { WeightMatrix{c: SquareMatrix::from_row_vec(n, data)} } @@ -470,7 +470,7 @@ where T: BaseNum + Ord + Neg + Eq + Copy + Neg { return Step::Step4(None); } -fn compute(weights: &mut WeightMatrix) -> Vec<(usize,usize)> +pub fn solve_assignment(weights: &mut WeightMatrix) -> Vec<(usize,usize)> where T: BaseNum + Ord + Neg + Eq + Copy { let n = weights.n();