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

Go to the source code of this file.

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

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

Definition at line 132 of file MatrixSymmetric.cc.

References Vec3D::X, MatrixSymmetric3D::XX, MatrixSymmetric3D::XY, MatrixSymmetric3D::XZ, Vec3D::Y, MatrixSymmetric3D::YY, MatrixSymmetric3D::YZ, Vec3D::Z, and MatrixSymmetric3D::ZZ.

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 }
Mdouble X
the vector components
Definition: Vector.h:65
Mdouble Y
Definition: Vector.h:65
Definition: Vector.h:49
Mdouble Z
Definition: Vector.h:65
Mdouble XX
The six distinctive matrix elements.
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

Definition at line 166 of file MatrixSymmetric.cc.

References MatrixSymmetric3D::XX, MatrixSymmetric3D::XY, MatrixSymmetric3D::XZ, MatrixSymmetric3D::YY, MatrixSymmetric3D::YZ, and MatrixSymmetric3D::ZZ.

167 {
168  os << A.XX << ' ' << A.XY << ' ' << A.XZ << " " << A.YY << ' ' << A.YZ << " " << A.ZZ;
169  return os;
170 }
Mdouble XX
The six distinctive matrix elements.
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

Definition at line 178 of file MatrixSymmetric.cc.

References MatrixSymmetric3D::XX, MatrixSymmetric3D::XY, MatrixSymmetric3D::XZ, MatrixSymmetric3D::YY, MatrixSymmetric3D::YZ, and MatrixSymmetric3D::ZZ.

179 {
180  is >> A.XX >> A.XY >> A.XZ >> A.YY >> A.YZ >> A.ZZ;
181  return is;
182 }
Mdouble XX
The six distinctive matrix elements.