forked from M-Labs/nalgebra
'fix error's
This commit is contained in:
parent
b9483ab545
commit
0eb1f5c125
@ -212,7 +212,7 @@ impl<T> CooMatrix<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Clear all triplets from the matrix.
|
/// Clear all triplets from the matrix.
|
||||||
pub fn clear_triplets(&mut self, i: usize, j: usize, v: T)
|
pub fn clear_triplets(&mut self)
|
||||||
where
|
where
|
||||||
T: PartialEq,
|
T: PartialEq,
|
||||||
{
|
{
|
||||||
|
@ -238,7 +238,7 @@ fn coo_clear_triplets_valid_entries() {
|
|||||||
vec![(0, 0, &1), (0, 0, &2), (2, 2, &3)]
|
vec![(0, 0, &1), (0, 0, &2), (2, 2, &3)]
|
||||||
);
|
);
|
||||||
coo.clear_triplets();
|
coo.clear_triplets();
|
||||||
assert_eq(coo.triplet_iter.collect::<Vec<_>>(), vec![]);
|
assert_eq!(coo.triplet_iter().collect::<Vec<_>>(), vec![]);
|
||||||
// making sure everyhting works after clearing
|
// making sure everyhting works after clearing
|
||||||
coo.push(0, 0, 1);
|
coo.push(0, 0, 1);
|
||||||
coo.push(0, 0, 2);
|
coo.push(0, 0, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user