Trait ndarray_linalg::solve::Solve [−][src]
An interface for solving systems of linear equations.
There are three groups of methods:
solve*
(normal) methods solveA * x = b
forx
.solve_t*
(transpose) methods solveA^T * x = b
forx
.solve_h*
(Hermitian conjugate) methods solveA^H * x = b
forx
.
Within each group, there are three methods that handle ownership differently:
*
methods take a reference tob
and returnx
as a new array.*_into
methods take ownership ofb
, store the result in it, and return it.*_inplace
methods take a mutable reference tob
and store the result in that array.
If you plan to solve many equations with the same A
matrix but different
b
vectors, it’s faster to factor the A
matrix once using the
Factorize
trait, and then solve using the LUFactorized
struct.
Required methods
fn solve_inplace<'a, S: DataMut<Elem = A>>(
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
[src]
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
Solves a system of linear equations A * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_t_inplace<'a, S: DataMut<Elem = A>>(
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
[src]
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
Solves a system of linear equations A^T * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_h_inplace<'a, S: DataMut<Elem = A>>(
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
[src]
&self,
b: &'a mut ArrayBase<S, Ix1>
) -> Result<&'a mut ArrayBase<S, Ix1>>
Solves a system of linear equations A^H * x = b
where A
is self
, b
is the argument, and x
is the successful result.
Provided methods
fn solve<S: Data<Elem = A>>(&self, b: &ArrayBase<S, Ix1>) -> Result<Array1<A>>
[src]
Solves a system of linear equations A * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_into<S: DataMut<Elem = A>>(
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
[src]
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
Solves a system of linear equations A * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_t<S: Data<Elem = A>>(&self, b: &ArrayBase<S, Ix1>) -> Result<Array1<A>>
[src]
Solves a system of linear equations A^T * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_t_into<S: DataMut<Elem = A>>(
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
[src]
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
Solves a system of linear equations A^T * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_h<S: Data<Elem = A>>(&self, b: &ArrayBase<S, Ix1>) -> Result<Array1<A>>
[src]
Solves a system of linear equations A^H * x = b
where A
is self
, b
is the argument, and x
is the successful result.
fn solve_h_into<S: DataMut<Elem = A>>(
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
[src]
&self,
b: ArrayBase<S, Ix1>
) -> Result<ArrayBase<S, Ix1>>
Solves a system of linear equations A^H * x = b
where A
is self
, b
is the argument, and x
is the successful result.
Implementations on Foreign Types
impl<A, S> Solve<A> for ArrayBase<S, Ix2> where
A: Scalar + Lapack,
S: Data<Elem = A>,
[src]
A: Scalar + Lapack,
S: Data<Elem = A>,
fn solve_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
fn solve_t_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
fn solve_h_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
Implementors
impl<A, S> Solve<A> for LUFactorized<S> where
A: Scalar + Lapack,
S: Data<Elem = A> + RawDataClone,
[src]
A: Scalar + Lapack,
S: Data<Elem = A> + RawDataClone,
fn solve_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
fn solve_t_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
fn solve_h_inplace<'a, Sb>(
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,
[src]
&self,
rhs: &'a mut ArrayBase<Sb, Ix1>
) -> Result<&'a mut ArrayBase<Sb, Ix1>> where
Sb: DataMut<Elem = A>,