lsst.sphgeom  20.0.0+1
Public Member Functions | List of all members
lsst::sphgeom::Matrix3d Class Reference

A 3x3 matrix with real entries stored in double precision. More...

#include <Matrix3d.h>

Public Member Functions

 Matrix3d ()
 This constructor creates a zero matrix.
 
 Matrix3d (double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
 
 Matrix3d (Vector3d const &v)
 
 Matrix3d (double s)
 This constructor returns the identity matrix scaled by s.
 
bool operator== (Matrix3d const &m) const
 
bool operator!= (Matrix3d const &m) const
 
Vector3d getRow (int r) const
 getRow returns the r-th matrix row. Bounds are not checked.
 
Vector3d const & getColumn (int c) const
 getColumn returns the c-th matrix column. Bounds are not checked.
 
double operator() (int r, int c) const
 
double inner (Matrix3d const &m) const
 inner returns the Frobenius inner product of this matrix with m.
 
double getSquaredNorm () const
 
double getNorm () const
 getNorm returns the L2 (Frobenius) norm of this matrix.
 
Vector3d operator* (Vector3d const &v) const
 
Matrix3d operator* (Matrix3d const &m) const
 
Matrix3d operator+ (Matrix3d const &m) const
 The addition operator returns the sum of this matrix and m.
 
Matrix3d operator- (Matrix3d const &m) const
 The subtraction operator returns the difference between this matrix and m.
 
Matrix3d cwiseProduct (Matrix3d const &m) const
 cwiseProduct returns the component-wise product of this matrix and m.
 
Matrix3d transpose () const
 transpose returns the transpose of this matrix.
 
Matrix3d inverse () const
 inverse returns the inverse of this matrix.
 

Detailed Description

A 3x3 matrix with real entries stored in double precision.

Constructor & Destructor Documentation

◆ Matrix3d() [1/2]

lsst::sphgeom::Matrix3d::Matrix3d ( double  m00,
double  m01,
double  m02,
double  m10,
double  m11,
double  m12,
double  m20,
double  m21,
double  m22 
)
inline

This constructor creates a matrix from its components, where mij specifies the component for row i and column j.

◆ Matrix3d() [2/2]

lsst::sphgeom::Matrix3d::Matrix3d ( Vector3d const &  v)
inlineexplicit

This constructor creates a diagonal matrix with diagonal components set to the components of v.

Member Function Documentation

◆ getSquaredNorm()

double lsst::sphgeom::Matrix3d::getSquaredNorm ( ) const
inline

getSquaredNorm returns the Frobenius inner product of this matrix with itself.

◆ operator()()

double lsst::sphgeom::Matrix3d::operator() ( int  r,
int  c 
) const
inline

The function call operator returns the scalar at row r and column c. Bounds are not checked.

◆ operator*() [1/2]

Matrix3d lsst::sphgeom::Matrix3d::operator* ( Matrix3d const &  m) const
inline

The multiplication operator returns the product of this matrix with matrix m.

◆ operator*() [2/2]

Vector3d lsst::sphgeom::Matrix3d::operator* ( Vector3d const &  v) const
inline

The multiplication operator returns the product of this matrix with vector v.


The documentation for this class was generated from the following file: