class Rivet::Matrix

Rivet::Matrix

General ( N )-dimensional mathematical matrix object. More…

#include <MatrixN.hh>

Protected Types

Name
using Eigen::Matrix< double, N, N >EMatrix

Public Functions

Name
Matrix< N >mkZero()
Matrix< N >mkDiag(Vector< N > diag)
Matrix< N >mkIdentity()
Matrix()
Matrix(const Matrix< N > & other)
Matrix &set(const size_t i, const size_t j, const double value)
doubleget(const size_t i, const size_t j) const
Vector< N >getRow(const size_t row) const
Matrix< N > &setRow(const size_t row, const Vector< N > & r)
Vector< N >getColumn(const size_t col) const
Matrix< N > &setColumn(const size_t col, const Vector< N > & c)
Matrix< N >transpose() const
Matrix< N >inverse() const
Calculate inverse.
doubledet() const
Calculate determinant.
doubletrace() const
Calculate trace.
Matrix< N >operator-() const
Negate.
constexpr size_tsize() const
Get dimensionality.
boolisZero(double tolerance =1E-5) const
Index-wise check for nullness, allowing for numerical precision.
boolisEqual(Matrix< N > other) const
Check for index-wise equality, allowing for numerical precision.
boolisSymm() const
Check for symmetry under transposition.
boolisDiag() const
Check that all off-diagonal elements are zero, allowing for numerical precision.
booloperator==(const Matrix< N > & a) const
booloperator!=(const Matrix< N > & a) const
Matrix< N > &operator*=(const Matrix< N > & m)
Matrix< N > &operator*=(const double a)
Matrix< N > &operator/=(const double a)
Matrix< N > &operator+=(const Matrix< N > & m)
Matrix< N > &operator-=(const Matrix< N > & m)

Friends

Name
Matrix< M >add(const Matrix< M > & , const Matrix< M > & )
Matrix< M >multiply(const double , const Matrix< M > & )
Matrix< M >multiply(const Matrix< M > & , const Matrix< M > & )
Vector< M >multiply(const Matrix< M > & , const Vector< M > & )
Matrix< M >divide(const Matrix< M > & , const double )

Detailed Description

template <size_t N>
class Rivet::Matrix;

General ( N )-dimensional mathematical matrix object.

Protected Types Documentation

using EMatrix

using Rivet::Matrix< N >::EMatrix =  Eigen::Matrix<double,N,N>;

Public Functions Documentation

function mkZero

static inline Matrix< N > mkZero()

function mkDiag

static inline Matrix< N > mkDiag(
    Vector< N > diag
)

function mkIdentity

static inline Matrix< N > mkIdentity()

function Matrix

inline Matrix()

function Matrix

inline Matrix(
    const Matrix< N > & other
)

function set

inline Matrix & set(
    const size_t i,
    const size_t j,
    const double value
)

function get

inline double get(
    const size_t i,
    const size_t j
) const

function getRow

inline Vector< N > getRow(
    const size_t row
) const

function setRow

inline Matrix< N > & setRow(
    const size_t row,
    const Vector< N > & r
)

function getColumn

inline Vector< N > getColumn(
    const size_t col
) const

function setColumn

inline Matrix< N > & setColumn(
    const size_t col,
    const Vector< N > & c
)

function transpose

inline Matrix< N > transpose() const

function inverse

inline Matrix< N > inverse() const

Calculate inverse.

function det

inline double det() const

Calculate determinant.

function trace

inline double trace() const

Calculate trace.

function operator-

inline Matrix< N > operator-() const

Negate.

function size

inline constexpr size_t size() const

Get dimensionality.

function isZero

inline bool isZero(
    double tolerance =1E-5
) const

Index-wise check for nullness, allowing for numerical precision.

function isEqual

inline bool isEqual(
    Matrix< N > other
) const

Check for index-wise equality, allowing for numerical precision.

function isSymm

inline bool isSymm() const

Check for symmetry under transposition.

function isDiag

inline bool isDiag() const

Check that all off-diagonal elements are zero, allowing for numerical precision.

function operator==

inline bool operator==(
    const Matrix< N > & a
) const

function operator!=

inline bool operator!=(
    const Matrix< N > & a
) const

function operator*=

inline Matrix< N > & operator*=(
    const Matrix< N > & m
)

function operator*=

inline Matrix< N > & operator*=(
    const double a
)

function operator/=

inline Matrix< N > & operator/=(
    const double a
)

function operator+=

inline Matrix< N > & operator+=(
    const Matrix< N > & m
)

function operator-=

inline Matrix< N > & operator-=(
    const Matrix< N > & m
)

Friends

friend add

friend Matrix< M > add(
    const Matrix< M > & ,

    const Matrix< M > & 
);

friend multiply

friend Matrix< M > multiply(
    const double ,

    const Matrix< M > & 
);

friend multiply

friend Matrix< M > multiply(
    const Matrix< M > & ,

    const Matrix< M > & 
);

friend multiply

friend Vector< M > multiply(
    const Matrix< M > & ,

    const Vector< M > & 
);

friend divide

friend Matrix< M > divide(
    const Matrix< M > & ,

    const double 
);

Updated on 2022-08-07 at 20:17:17 +0100