mirror of
https://github.com/cberner/raptorq.git
synced 2024-06-29 18:21:43 +00:00
Remove dead code
This commit is contained in:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user