Matrix.cc File Reference
#include "Matrix.h"
#include "ExtendedMath.h"

Functions

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

Function Documentation

◆ operator<<()

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
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 }
@ A
Definition: StatisticsVector.h:42

◆ operator>>()

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.
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 }