maliput::math

Struct Matrix3

Source
pub struct Matrix3 { /* private fields */ }
Expand description

A 3x3 matrix. Wrapper around C++ implementation maliput::math::Matrix3.

§Example

use maliput::math::Matrix3;
use maliput::math::Vector3;

let row_1 = Vector3::new(1.0, 2.0, 3.0);
let row_2 = Vector3::new(4.0, 5.0, 6.0);
let row_3 = Vector3::new(7.0, 8.0, 9.0);
let m = Matrix3::new(row_1, row_2, row_3);

Implementations§

Source§

impl Matrix3

Source

pub fn new(row1: Vector3, row2: Vector3, row3: Vector3) -> Matrix3

Create a new Matrix3 with the given row1, row2, and row3.

Source

pub fn cofactor(&self, row: u64, col: u64) -> f64

Get the cofactor of the Matrix3 at the given row and col.

Source

pub fn cofactor_matrix(&self) -> Matrix3

Get the cofactor matrix of the Matrix3.

Source

pub fn determinant(&self) -> f64

Get the determinant of the Matrix3.

Source

pub fn is_singular(&self) -> bool

Check if the Matrix3 is singular.

Source

pub fn row(&self, index: u64) -> Vector3

Get the row at the given index.

Source

pub fn col(&self, index: u64) -> Vector3

Get the column at the given index.

Source

pub fn transpose(&self) -> Matrix3

Get the transpose of the Matrix3.

Source

pub fn adjoint(&self) -> Matrix3

Get the adjoint of the Matrix3.

Source

pub fn inverse(&self) -> Matrix3

Get the inverse of the Matrix3.

Trait Implementations§

Source§

impl Debug for Matrix3

Source§

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

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

impl Display for Matrix3

Source§

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

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

impl PartialEq for Matrix3

Source§

fn eq(&self, other: &Self) -> 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 Eq for Matrix3

Auto Trait Implementations§

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> 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> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.