pub struct RandomizedConfig {
pub rank: usize,
pub oversamples: usize,
pub sketch: Sketch,
pub normalizer: Normalizer,
pub mean_center: bool,
pub seed: Option<u64>,
}Expand description
Configuration for svd_with.
Replaces 1.x’s eight positional arguments, two of which were bare bools that the
crate’s own call sites commented incorrectly.
Fields§
§rank: usizeNumber of singular triplets wanted.
oversamples: usizeExtra sketch columns; improves accuracy at linear cost.
sketch: Sketch§normalizer: Normalizer§mean_center: boolSubtract column means without materialising the centered matrix.
seed: Option<u64>Fixed seed; None draws from the OS.
1.x accepted Option<u64> but substituted 0 for None, so “random” was in
fact a fixed sketch on every call.
Implementations§
Source§impl RandomizedConfig
impl RandomizedConfig
pub fn new(rank: usize) -> Self
pub fn oversamples(self, n: usize) -> Self
pub fn power_iterations(self, n: usize) -> Self
pub fn block_krylov(self, blocks: usize) -> Self
pub fn normalizer(self, n: Normalizer) -> Self
pub fn mean_center(self, yes: bool) -> Self
pub fn seed(self, seed: u64) -> Self
Trait Implementations§
Source§impl Clone for RandomizedConfig
impl Clone for RandomizedConfig
Source§fn clone(&self) -> RandomizedConfig
fn clone(&self) -> RandomizedConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RandomizedConfig
impl RefUnwindSafe for RandomizedConfig
impl Send for RandomizedConfig
impl Sync for RandomizedConfig
impl Unpin for RandomizedConfig
impl UnsafeUnpin for RandomizedConfig
impl UnwindSafe for RandomizedConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more