revision: v0.14
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)

## ◆ 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] A the matrix [in] b the 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 }

References A, Vec3D::X, Vec3D::Y, and Vec3D::Z.

## ◆ operator<<()

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

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

Parameters
 [in,out] os output stream [in] A the 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 }

References A.

## ◆ operator>>()

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

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

Parameters
 [in,out] is input stream, [out] A the 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 }

References A.

Vec3D::X
Mdouble X
the vector components
Definition: Vector.h:65
Vec3D
Definition: Vector.h:50
A
@ A
Definition: StatisticsVector.h:42
Vec3D::Y
Mdouble Y
Definition: Vector.h:65
Vec3D::Z
Mdouble Z
Definition: Vector.h:65