Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

Three-by-three matrix. More...

#include <mat3d.hpp>

Public Member Functions

 Mat3D ()
 Constructor for zero matrix. More...
 
 Mat3D (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33)
 Constructor for matrix with preset elements. More...
 
 ~Mat3D ()
 Destructor. More...
 
double & operator() (int i)
 Indexing for matrix. More...
 
const double & operator() (int i) const
 Indexing for constant matrix. More...
 
double & operator() (int i, int j)
 Indexing for matrix. More...
 
const double & operator() (int i, int j) const
 Indexing for matrix. More...
 
double determinant (void) const
 Return determinant of matrix. More...
 
Mat3D inverse (void) const
 Return inverse matrix. More...
 
Mat3D inverse (double det) const
 Return inverse matrix. More...
 
Vec3D operator* (const Vec3D &x) const
 Matrix-vector multiplication. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Mat3D &m)
 Outputting to stream. More...
 

Detailed Description

Three-by-three matrix.

Dense three-by-three matrix. Matrix data in row first order:

| 0 1 2 |
A = | 3 4 5 |
| 6 7 8 |

Constructor & Destructor Documentation

◆ Mat3D() [1/2]

Mat3D::Mat3D ( )

Constructor for zero matrix.

◆ Mat3D() [2/2]

Mat3D::Mat3D ( double  a11,
double  a12,
double  a13,
double  a21,
double  a22,
double  a23,
double  a31,
double  a32,
double  a33 
)

Constructor for matrix with preset elements.

◆ ~Mat3D()

Mat3D::~Mat3D ( )
inline

Destructor.

Member Function Documentation

◆ determinant()

double Mat3D::determinant ( void  ) const

Return determinant of matrix.

◆ inverse() [1/2]

Mat3D Mat3D::inverse ( double  det) const

Return inverse matrix.

Calculate inverse matrix. Use pre-calculated determinant det.

◆ inverse() [2/2]

Mat3D Mat3D::inverse ( void  ) const

Return inverse matrix.

Throws an error if determinant is zero. For more thorough checking (determinant close to zero, for example), see the other form of inverse().

◆ operator()() [1/4]

double& Mat3D::operator() ( int  i)
inline

Indexing for matrix.

Returns a reference to i element, where i is the index in row-first order. No checking performed - not a safe function.

◆ operator()() [2/4]

const double& Mat3D::operator() ( int  i) const
inline

Indexing for constant matrix.

Returns a reference to i element, where i is the index in row-first order. No checking performed - not a safe function.

◆ operator()() [3/4]

double& Mat3D::operator() ( int  i,
int  j 
)
inline

Indexing for matrix.

Returns a reference to (i,j) element, where i is the row and j is the column number. No checking performed - not a safe function.

◆ operator()() [4/4]

const double& Mat3D::operator() ( int  i,
int  j 
) const
inline

Indexing for matrix.

Returns a reference to (i,j) element, where i is the row and j is the column number. No checking performed - not a safe function.

◆ operator*()

Vec3D Mat3D::operator* ( const Vec3D x) const

Matrix-vector multiplication.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Mat3D m 
)
friend

Outputting to stream.


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


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.