Struct gramschmidt::ModifiedGramSchmidt
[−]
[src]
pub struct ModifiedGramSchmidt { /* fields omitted */ }
Methods
impl ModifiedGramSchmidt
[src]
pub fn from_matrix<S>(a: &ArrayBase<S, Ix2>) -> Self where
S: Data<Elem = f64>,
[src]
S: Data<Elem = f64>,
Reserves the memory for a QR decomposition via a modified Gram Schmidt orthogonalization using the dimensions of a sample matrix.
The resulting object can be used to orthogonalize matrices of the same dimensions.
Example
extern crate gramschmidt; extern crate ndarray; extern crate ndarray_rand; extern crate rand; use gramschmidt::ModifiedGramSchmidt; use ndarray::Array2; use ndarray_rand::RandomExt; use rand::distributions::Normal; let matrix = Array2::random((10,10), Normal::new(0.0, 1.0)); let mut cgs = ModifiedGramSchmidt::from_matrix(&matrix);
pub fn from_shape<T>(shape: T, fortran_order: bool) -> Self where
T: IntoDimension<Dim = Ix2>,
[src]
T: IntoDimension<Dim = Ix2>,
Reserves the memory for a QR decomposition via a modified Gram Schmidt orthogonalization using a shape.
The resulting object can be used to orthogonalize matrices of the same dimensions.
Example
extern crate gramschmidt; use gramschmidt::ModifiedGramSchmidt; let fortran_order = false; let mut cgs = ModifiedGramSchmidt::from_shape((10,10), fortran_order);
pub fn compute<S>(&mut self, a: &ArrayBase<S, Ix2>) where
S: Data<Elem = f64>,
[src]
S: Data<Elem = f64>,
Computes a QR decomposition using the modified Gram Schmidt orthonormalization of the
matrix a
.
The input matrix a
has to have exactly the same dimension and memory layout as was
previously configured. Panics otherwise.
extern crate gramschmidt; extern crate ndarray; extern crate ndarray_rand; extern crate rand; use gramschmidt::ModifiedGramSchmidt; use ndarray::Array2; use ndarray_rand::RandomExt; use rand::distributions::Normal; let matrix = Array2::random((10,10), Normal::new(0.0, 1.0)); let mut cgs = ModifiedGramSchmidt::from_matrix(&matrix);
pub fn q(&self) -> &Array2<f64>
[src]
Return a reference to the matrix q.
pub fn r(&self) -> &Array2<f64>
[src]
Return a reference to the matrix q.
Trait Implementations
impl Clone for ModifiedGramSchmidt
[src]
fn clone(&self) -> ModifiedGramSchmidt
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more