Skip to main content

Matrix3

Struct Matrix3 

Source
pub struct Matrix3<T: PhysicsQuantity> { /* private fields */ }

Implementations§

Source§

impl<T: PhysicsQuantity> Matrix3<T>

Source

pub fn new(data: [[T; 3]; 3]) -> Self

Source

pub fn zero() -> Self

Source

pub fn from_f64(data: [[f64; 3]; 3]) -> Self

Source

pub fn data(&self) -> [[T; 3]; 3]

Source

pub fn to_raw(&self) -> Matrix3<f64>

👎Deprecated since 0.2.9:

please use as_f64() instead

Source

pub fn as_f64(&self) -> Matrix3<f64>

Source

pub fn from_raw(raw: Matrix3<f64>) -> Self

👎Deprecated since 0.2.9:

please use from instead

Source

pub fn from_rows(rows: &[Vector3<T>; 3]) -> Self

Source

pub fn from_columns(columns: &[Vector3<T>; 3]) -> Self

Source

pub fn get_column(&self, col: usize) -> Vector3<T>

Source

pub fn set_column(&mut self, col: usize, vec: Vector3<T>)

Source

pub fn get_row(&self, row: usize) -> Vector3<T>

Source

pub fn set_row(&mut self, row: usize, vec: Vector3<T>)

Source

pub fn transpose(&self) -> Matrix3<T>

Source

pub fn frobenius_norm(&self) -> T

Source

pub fn optimize(&mut self)

Source

pub fn abs(&self) -> Self

Source

pub fn to_ndarray(&self) -> Array2<T>

Source

pub fn from_ndarray(array: ArrayView2<'_, T>) -> Result<Self, String>

Source§

impl<T: PhysicsQuantity> Matrix3<T>

Source

pub fn dot<U, V>(&self, vec: &Vector3<U>) -> Vector3<V>
where T: Mul<U, Output = V>, U: PhysicsQuantity, V: PhysicsQuantity + Add<Output = V>,

Source§

impl<T, U, V: PhysicsQuantity> Matrix3<T>
where T: PhysicsQuantity + Mul<Output = U> + Mul<U, Output = V>, U: Add<Output = U> + Sub<Output = U> + Mul<T, Output = V>,

Source

pub fn det(&self) -> V

Source§

impl<T, U, V, R> Matrix3<T>
where T: PhysicsQuantity + Mul<T, Output = U> + Mul<U, Output = V>, U: PhysicsQuantity + Mul<T, Output = V> + Div<V, Output = R>, V: PhysicsQuantity, R: PhysicsQuantity,

Source

pub fn inverse(&self) -> Option<Matrix3<R>>

Source§

impl<T> Matrix3<T>
where T: PhysicsQuantity + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Div<T, Output = T>,

Source

pub fn solve(&self, rhs: &Vector3<T>) -> Option<Vector3<T>>

Source§

impl Matrix3<f64>

Source

pub fn qr_eigen( &self, max_iterations: usize, tol: f64, ) -> Vec<(f64, Vector3<f64>)>

Source

pub fn qr_decomposition(&self) -> (Matrix3<f64>, Matrix3<f64>)

Source

pub fn identity() -> Self

Trait Implementations§

Source§

impl<T: PhysicsQuantity> Add for Matrix3<T>

Source§

type Output = Matrix3<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl<T: PhysicsQuantity> AddAssign for Matrix3<T>

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl<T: Clone + PhysicsQuantity> Clone for Matrix3<T>

Source§

fn clone(&self) -> Matrix3<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + PhysicsQuantity> Debug for Matrix3<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: PhysicsQuantity> Index<(usize, usize)> for Matrix3<T>

Source§

type Output = T

The returned type after indexing.
Source§

fn index(&self, index: (usize, usize)) -> &T

Performs the indexing (container[index]) operation. Read more
Source§

impl<T: PhysicsQuantity> IndexMut<(usize, usize)> for Matrix3<T>

Source§

fn index_mut(&mut self, index: (usize, usize)) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Mul<Matrix3<f64>> for Acceleration

Source§

type Output = Matrix3<Acceleration>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Angle

Source§

type Output = Matrix3<Angle>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for AngularAcceleration

Source§

type Output = Matrix3<AngularAcceleration>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for AngularVelocity

Source§

type Output = Matrix3<AngularVelocity>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Area

Source§

type Output = Matrix3<Area>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for AreaOfMoment

Source§

type Output = Matrix3<AreaOfMoment>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Charge

Source§

type Output = Matrix3<Charge>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Compliance

Source§

type Output = Matrix3<Compliance>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Density

Source§

type Output = Matrix3<Density>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Distance

Source§

type Output = Matrix3<Distance>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Force

Source§

type Output = Matrix3<Force>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForceArea

Source§

type Output = Matrix3<ForceArea>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForceDistance

Source§

type Output = Matrix3<ForceDistance>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForcePerDistancePowerFour

Source§

type Output = Matrix3<ForcePerDistancePowerFour>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForcePerVolume

Source§

type Output = Matrix3<ForcePerVolume>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForceStress

Source§

type Output = Matrix3<ForceStress>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for ForceVolume

Source§

type Output = Matrix3<ForceVolume>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for InverseArea

Source§

type Output = Matrix3<InverseArea>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for InverseDistance

Source§

type Output = Matrix3<InverseDistance>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for InverseStress

Source§

type Output = Matrix3<InverseStress>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Mass

Source§

type Output = Matrix3<Mass>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for MassDivTimeSquaredVolume

Source§

type Output = Matrix3<MassDivTimeSquaredVolume>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for MassPerDistance

Source§

type Output = Matrix3<MassPerDistance>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for RotationalStiffness

Source§

type Output = Matrix3<RotationalStiffness>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Stiffness

Source§

type Output = Matrix3<Stiffness>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Strain

Source§

type Output = Matrix3<Strain>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Stress

Source§

type Output = Matrix3<Stress>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for StressSquared

Source§

type Output = Matrix3<StressSquared>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Time

Source§

type Output = Matrix3<Time>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Velocity

Source§

type Output = Matrix3<Velocity>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for VelocitySquared

Source§

type Output = Matrix3<VelocitySquared>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Voltage

Source§

type Output = Matrix3<Voltage>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix3<f64>> for Volume

Source§

type Output = Matrix3<Volume>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3<f64>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U, V> Mul<Matrix3x2<U>> for Matrix3<T>
where T: PhysicsQuantity + Mul<U, Output = V>, U: PhysicsQuantity, V: PhysicsQuantity + Add<Output = V>,

Source§

type Output = Matrix3x2<V>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix3x2<U>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T, U, V> Mul<U> for Matrix3<T>
where T: PhysicsQuantity + Mul<U, Output = V>, U: PhysicsQuantity, V: PhysicsQuantity,

Source§

type Output = Matrix3<V>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: U) -> Matrix3<V>

Performs the * operation. Read more
Source§

impl Mul for Matrix3<f64>

Source§

type Output = Matrix3<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix3<f64>) -> Matrix3<f64>

Performs the * operation. Read more
Source§

impl<T> Neg for Matrix3<T>
where T: PhysicsQuantity + Neg<Output = T>,

Source§

type Output = Matrix3<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: PartialEq + PhysicsQuantity> PartialEq for Matrix3<T>

Source§

fn eq(&self, other: &Matrix3<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PhysicsQuantity> Sub for Matrix3<T>

Source§

type Output = Matrix3<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
Source§

impl<T: PhysicsQuantity> SubAssign for Matrix3<T>

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl<T: Copy + PhysicsQuantity> Copy for Matrix3<T>

Source§

impl<T: PhysicsQuantity> StructuralPartialEq for Matrix3<T>

Auto Trait Implementations§

§

impl<T> Freeze for Matrix3<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Matrix3<T>
where T: RefUnwindSafe,

§

impl<T> Send for Matrix3<T>
where T: Send,

§

impl<T> Sync for Matrix3<T>
where T: Sync,

§

impl<T> Unpin for Matrix3<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Matrix3<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for Matrix3<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.