MercuryDPM  Trunk
 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 216 of file Matrix.cc.

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

217 {
218  os << A.XX << ' ' << A.XY << ' ' << A.XZ << ' '
219  << A.YX << ' ' << A.YY << ' ' << A.YZ << ' '
220  << A.ZX << ' ' << A.ZY << ' ' << A.ZZ;
221  return os;
222 }
Mdouble XY
Definition: Matrix.h:43
Mdouble ZY
Definition: Matrix.h:43
Mdouble XZ
Definition: Matrix.h:43
Mdouble ZX
Definition: Matrix.h:43
Mdouble ZZ
Definition: Matrix.h:43
Mdouble YZ
Definition: Matrix.h:43
Mdouble YX
Definition: Matrix.h:43
Mdouble XX
all nine matrix elements
Definition: Matrix.h:43
Mdouble YY
Definition: Matrix.h:43
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 230 of file Matrix.cc.

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

231 {
232  is >> A.XX >> A.XY >> A.XZ >> A.YX >> A.YY >> A.YZ >> A.ZX >> A.ZY >> A.ZZ;
233  return is;
234 }
Mdouble XY
Definition: Matrix.h:43
Mdouble ZY
Definition: Matrix.h:43
Mdouble XZ
Definition: Matrix.h:43
Mdouble ZX
Definition: Matrix.h:43
Mdouble ZZ
Definition: Matrix.h:43
Mdouble YZ
Definition: Matrix.h:43
Mdouble YX
Definition: Matrix.h:43
Mdouble XX
all nine matrix elements
Definition: Matrix.h:43
Mdouble YY
Definition: Matrix.h:43