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

Functions

Vec3D operator* (const MatrixSymmetric3D &A, const Vec3D &b)
 
std::ostream & operator<< (std::ostream &os, const MatrixSymmetric3D &A)
 
std::istream & operator>> (std::istream &is, MatrixSymmetric3D &A)
 

Function Documentation

◆ operator*()

Vec3D operator* ( const MatrixSymmetric3D A,
const Vec3D b 
)

Multiplication of a symmetric 3D matrix with a vector (global operator, friend of this class)

Parameters
[in]Athe matrix
[in]bthe vector
Returns
The multiplication result
133 {
134  return Vec3D(A.XX * b.X + A.XY * b.Y + A.XZ * b.Z,
135  A.XY * b.X + A.YY * b.Y + A.YZ * b.Z,
136  A.XZ * b.X + A.YZ * b.Y + A.ZZ * b.Z);
137 }
@ A
Definition: StatisticsVector.h:42
Definition: Vector.h:51
Mdouble Y
Definition: Vector.h:66
Mdouble Z
Definition: Vector.h:66
Mdouble X
the vector components
Definition: Vector.h:66

◆ operator<<()

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

Adds all elements of a symmetric 3D matrix to an ostream

Parameters
[in,out]osoutput stream
[in]Athe matrix
Returns
(reference to) output stream with matrix elements added
167 {
168  os << A.XX << ' ' << A.XY << ' ' << A.XZ << " " << A.YY << ' ' << A.YZ << " " << A.ZZ;
169  return os;
170 }

◆ operator>>()

std::istream& operator>> ( std::istream &  is,
MatrixSymmetric3D A 
)

Reads the elements of a symmetric 3D matrix from an istream

Parameters
[in,out]isinput stream,
[out]Athe matrix
Returns
(reference to) input stream from with matrix elements were read
179 {
180  is >> A.XX >> A.XY >> A.XZ >> A.YY >> A.YZ >> A.ZZ;
181  return is;
182 }