Hi,
How do I get out of this horrible situation? I need to remove a col for a matrix until the last one. This should be very very easy. In rust and this library its not. How do I resolve it?
move occurs because X
has type na::Matrix<f64, na::Dynamic, na::Dynamic, na::VecStorage<f64, na::Dynamic, na::Dynamic>>
, which does not implement the Copy
trait
Why is this happening with this library? I Tried the place Copy on every derive. Why? Is rather unreal.
Thanks
let X = &X.clone();
| ^ value borrowed here after move
let mut X = DMatrix::from_iterator(
rows,
cols,
temp
.iter()
.cloned(),
);
let mut remaining_cols:usize = 0;
let mut done = false; // mut done: bool
while !done {
let X = &X.clone();
X.remove_column(0);
remaining_cols = X.ncols();
//done=true;
if remaining_cols == 1{
done=true;
}
}