MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Matrix.cc File Reference
#include "Matrix.h"
#include "ExtendedMath.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const Matrix3D &A)
 
std::istream & operator>> (std::istream &is, Matrix3D &A)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Matrix3D A 
)

Adds all elements of a matrix to an ostream

Parameters
[out]osoutput stream
[in]A3D matrix
Returns
output stream with matrix elements added

Definition at line 178 of file Matrix.cc.

References Matrix3D::XX, Matrix3D::XY, Matrix3D::XZ, Matrix3D::YX, Matrix3D::YY, Matrix3D::YZ, Matrix3D::ZX, Matrix3D::ZY, and Matrix3D::ZZ.

179 {
180  os << A.XX << ' ' << A.XY << ' ' << A.XZ << ' '
181  << A.YX << ' ' << A.YY << ' ' << A.YZ << ' '
182  << A.ZX << ' ' << A.ZY << ' ' << A.ZZ;
183  return os;
184 }
Mdouble XY
Definition: Matrix.h:42
Mdouble ZY
Definition: Matrix.h:42
Mdouble XZ
Definition: Matrix.h:42
Mdouble ZX
Definition: Matrix.h:42
Mdouble ZZ
Definition: Matrix.h:42
Mdouble YZ
Definition: Matrix.h:42
Mdouble YX
Definition: Matrix.h:42
Mdouble XX
all nine matrix elements
Definition: Matrix.h:42
Mdouble YY
Definition: Matrix.h:42
std::istream& operator>> ( std::istream &  is,
Matrix3D A 
)

Reads the elements of a matrix from an istream

Parameters
[in,out]isinput stream
[out]A3D matrix
Returns
is input stream after the read operation.

Definition at line 192 of file Matrix.cc.

References Matrix3D::XX, Matrix3D::XY, Matrix3D::XZ, Matrix3D::YX, Matrix3D::YY, Matrix3D::YZ, Matrix3D::ZX, Matrix3D::ZY, and Matrix3D::ZZ.

193 {
194  is >> A.XX >> A.XY >> A.XZ >> A.YX >> A.YY >> A.YZ >> A.ZX >> A.ZY >> A.ZZ;
195  return is;
196 }
Mdouble XY
Definition: Matrix.h:42
Mdouble ZY
Definition: Matrix.h:42
Mdouble XZ
Definition: Matrix.h:42
Mdouble ZX
Definition: Matrix.h:42
Mdouble ZZ
Definition: Matrix.h:42
Mdouble YZ
Definition: Matrix.h:42
Mdouble YX
Definition: Matrix.h:42
Mdouble XX
all nine matrix elements
Definition: Matrix.h:42
Mdouble YY
Definition: Matrix.h:42