feat: adds elastic net

This commit is contained in:
Volodymyr Orlov
2020-12-11 18:55:07 -08:00
parent 2650416235
commit 78673b597f
8 changed files with 647 additions and 237 deletions
+14
View File
@@ -176,6 +176,20 @@ impl<T: RealNumber> BaseVector<T> for Vec<T> {
result.dedup();
result
}
fn copy_from(&mut self, other: &Self) {
if self.len() != other.len() {
panic!(
"Can't copy vector of length {} into a vector of length {}.",
self.len(),
other.len()
);
}
for i in 0..self.len() {
self[i] = other[i];
}
}
}
/// Column-major, dense matrix. See [Simple Dense Matrix](../index.html).