Remove dead code

This commit is contained in:
Christopher Berner 2019-04-08 19:56:33 -07:00
parent 44f529214c
commit c1b3be12c5

@ -2,7 +2,6 @@ use crate::octet::Octet;
use crate::octets::{add_assign, mulassign_scalar, count_ones_and_nonzeros};
use crate::octets::fused_addassign_mul_scalar;
use crate::util::get_both_indices;
use std::ops::Mul;
use std::cmp::min;
pub struct KeyIter {
@ -289,33 +288,6 @@ impl OctetMatrix for DenseOctetMatrix {
}
}
impl<'a, 'b> Mul<&'b DenseOctetMatrix> for &'a DenseOctetMatrix {
type Output = DenseOctetMatrix;
fn mul(self, rhs: &'b DenseOctetMatrix) -> DenseOctetMatrix {
assert_eq!(self.width, rhs.height);
let mut result = DenseOctetMatrix::new(self.height, rhs.width, 0);
for row in 0..self.height {
for i in 0..self.width {
let scalar = self.get(row, i);
if scalar == Octet::zero() {
continue;
}
if scalar == Octet::one() {
add_assign(&mut result.elements[row], &rhs.elements[i]);
} else {
fused_addassign_mul_scalar(
&mut result.elements[row],
&rhs.elements[i],
&scalar,
);
}
}
}
result
}
}
#[derive(Clone, Debug, PartialEq)]
struct SparseVec<T: Clone> {
// Kept sorted by the usize (key)