#[non_exhaustive]pub struct TriangularSolveOptions {
pub side: Side,
pub uplo: Uplo,
pub op: MatOp,
pub diag: Diag,
}Expand description
Options for a triangular solve.
The defaults (Left, Lower, None, NonUnit) solve a x = b with the
lower triangle of a.
§Examples
use tenferro_linalg::{Diag, MatOp, Side, TriangularSolveOptions, Uplo};
let options = TriangularSolveOptions::default()
.side(Side::Right)
.uplo(Uplo::Upper)
.op(MatOp::Transpose)
.diag(Diag::Unit);
assert_eq!(options.side, Side::Right);
assert_eq!(options.uplo, Uplo::Upper);
assert_eq!(options.op, MatOp::Transpose);
assert_eq!(options.diag, Diag::Unit);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.side: SideWhich side the matrix acts from.
uplo: UploWhich triangle of the matrix is referenced.
op: MatOpTransformation applied to the matrix. MatOp::Adjoint on a complex
matrix returns Unsupported.
diag: DiagWhether the diagonal is implicitly one.
Implementations§
Source§impl TriangularSolveOptions
impl TriangularSolveOptions
Sourcepub fn side(self, side: Side) -> Self
pub fn side(self, side: Side) -> Self
Return options with the requested side.
§Examples
use tenferro_linalg::{Side, TriangularSolveOptions};
assert_eq!(TriangularSolveOptions::default().side(Side::Right).side, Side::Right);Sourcepub fn uplo(self, uplo: Uplo) -> Self
pub fn uplo(self, uplo: Uplo) -> Self
Return options with the requested triangle.
§Examples
use tenferro_linalg::{TriangularSolveOptions, Uplo};
assert_eq!(TriangularSolveOptions::default().uplo(Uplo::Upper).uplo, Uplo::Upper);Trait Implementations§
Source§impl Clone for TriangularSolveOptions
impl Clone for TriangularSolveOptions
impl Copy for TriangularSolveOptions
Source§impl Debug for TriangularSolveOptions
impl Debug for TriangularSolveOptions
Source§impl Default for TriangularSolveOptions
impl Default for TriangularSolveOptions
Source§impl PartialEq for TriangularSolveOptions
impl PartialEq for TriangularSolveOptions
impl StructuralPartialEq for TriangularSolveOptions
Auto Trait Implementations§
impl Freeze for TriangularSolveOptions
impl RefUnwindSafe for TriangularSolveOptions
impl Send for TriangularSolveOptions
impl Sync for TriangularSolveOptions
impl Unpin for TriangularSolveOptions
impl UnsafeUnpin for TriangularSolveOptions
impl UnwindSafe for TriangularSolveOptions
Blanket Implementations§
impl<T> Boilerplate for T
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,
impl<T, U> Imply<T> for U
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