ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleBase::Matrix3 Class Reference

3x3 matrix and related mathamatical operations More...

#include <matrix3.h>

Collaboration diagram for ModuleBase::Matrix3:

Public Member Functions

 Matrix3 ()
 Construct a new Matrix 3 object to Identity matrix.
 Matrix3 (const double &r11, const double &r12, const double &r13, const double &r21, const double &r22, const double &r23, const double &r31, const double &r32, const double &r33)
 Construct a new Matrix 3 object.
void Identity (void)
 Set a 3x3 matrix to identity matrix.
void Zero (void)
 Set all elements of a 3x3 matrix to zero.
double Det (void) const
 Calculate the determinant of a 3x3 matrix.
Matrix3 Transpose (void) const
 Transpose a 3x3 matrix.
Matrix3 Inverse (void) const
 Inverse a 3x3 matrix.
Matrix3 & operator= (const Matrix3 &m)
 Overload operator "=" for 3x3 matrices For example, assign mb = ma.
Matrix3 & operator+= (const Matrix3 &m)
 Overload operator "+=" for 3x3 matrices For example, mb += ma.
Matrix3 & operator-= (const Matrix3 &m)
 Overload operator "-=" for 3x3 matrices For example, mb -= ma.
Matrix3 & operator*= (const double &s)
 Overload operator "*=" for 3x3 matrix and a scalar For example, mb *= 3.0.
Matrix3 & operator/= (const double &s)
 Overload operator "/=" for 3x3 matrix and a scalar For example, mb /= 3.0.
void print (void) const
 Print a 3x3 matrix on screening.
ModuleBase::matrix to_matrix (void) const
 Change the form of a 3x3 matrix from that of class Matrix3 to that of class matrix.

Public Attributes

double e11
 element e_ij: i_row, j_column
double e12
double e13
double e21
double e22
double e23
double e31
double e32
double e33

Detailed Description

3x3 matrix and related mathamatical operations

Constructor & Destructor Documentation

◆ Matrix3() [1/2]

ModuleBase::Matrix3::Matrix3 ( )
inline

Construct a new Matrix 3 object to Identity matrix.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Matrix3() [2/2]

ModuleBase::Matrix3::Matrix3 ( const double & r11,
const double & r12,
const double & r13,
const double & r21,
const double & r22,
const double & r23,
const double & r31,
const double & r32,
const double & r33 )

Construct a new Matrix 3 object.

Parameters
r11element r_ij: i_row, j_column
r12
r13
r21
r22
r23
r31
r32
r33

Member Function Documentation

◆ Det()

double ModuleBase::Matrix3::Det ( void ) const

Calculate the determinant of a 3x3 matrix.

Returns
double
Here is the caller graph for this function:

◆ Identity()

void ModuleBase::Matrix3::Identity ( void )

Set a 3x3 matrix to identity matrix.

Here is the caller graph for this function:

◆ Inverse()

Matrix3 ModuleBase::Matrix3::Inverse ( void ) const

Inverse a 3x3 matrix.

Returns
Matrix3
Here is the call graph for this function:

◆ operator*=()

Matrix3 & ModuleBase::Matrix3::operator*= ( const double & s)

Overload operator "*=" for 3x3 matrix and a scalar For example, mb *= 3.0.

Parameters
sThe scalar
Returns
Matrix3&
Here is the call graph for this function:

◆ operator+=()

Matrix3 & ModuleBase::Matrix3::operator+= ( const Matrix3 & m)

Overload operator "+=" for 3x3 matrices For example, mb += ma.

Parameters
m
Returns
Matrix3&
Here is the call graph for this function:

◆ operator-=()

Matrix3 & ModuleBase::Matrix3::operator-= ( const Matrix3 & m)

Overload operator "-=" for 3x3 matrices For example, mb -= ma.

Parameters
m
Returns
Matrix3&
Here is the call graph for this function:

◆ operator/=()

Matrix3 & ModuleBase::Matrix3::operator/= ( const double & s)

Overload operator "/=" for 3x3 matrix and a scalar For example, mb /= 3.0.

Parameters
sThe scalar
Returns
Matrix3&
Here is the call graph for this function:

◆ operator=()

Matrix3 & ModuleBase::Matrix3::operator= ( const Matrix3 & m)

Overload operator "=" for 3x3 matrices For example, assign mb = ma.

Parameters
m
Returns
Matrix3&
Here is the call graph for this function:

◆ print()

void ModuleBase::Matrix3::print ( void ) const

Print a 3x3 matrix on screening.

Here is the caller graph for this function:

◆ to_matrix()

ModuleBase::matrix ModuleBase::Matrix3::to_matrix ( void ) const

Change the form of a 3x3 matrix from that of class Matrix3 to that of class matrix.

Returns
ModuleBase::matrix
Here is the caller graph for this function:

◆ Transpose()

Matrix3 ModuleBase::Matrix3::Transpose ( void ) const

Transpose a 3x3 matrix.

Returns
Matrix3
Here is the call graph for this function:

◆ Zero()

void ModuleBase::Matrix3::Zero ( void )

Set all elements of a 3x3 matrix to zero.

Here is the caller graph for this function:

Member Data Documentation

◆ e11

double ModuleBase::Matrix3::e11

element e_ij: i_row, j_column

◆ e12

double ModuleBase::Matrix3::e12

◆ e13

double ModuleBase::Matrix3::e13

◆ e21

double ModuleBase::Matrix3::e21

◆ e22

double ModuleBase::Matrix3::e22

◆ e23

double ModuleBase::Matrix3::e23

◆ e31

double ModuleBase::Matrix3::e31

◆ e32

double ModuleBase::Matrix3::e32

◆ e33

double ModuleBase::Matrix3::e33

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