MercuryDPM  Alpha
 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 130 of file MatrixSymmetric.cc.

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

131 {
132  return Vec3D(A.XX * b.X + A.XY * b.Y + A.XZ * b.Z,
133  A.XY * b.X + A.YY * b.Y + A.YZ * b.Z,
134  A.XZ * b.X + A.YZ * b.Y + A.ZZ * b.Z);
135 }
Mdouble X
the vector components
Definition: Vector.h:52
Mdouble Y
Definition: Vector.h:52
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
Mdouble Z
Definition: Vector.h:52
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 164 of file MatrixSymmetric.cc.

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

165 {
166  os << A.XX << ' ' << A.XY << ' ' << A.XZ << " " << A.YY << ' ' << A.YZ << " " << A.ZZ;
167  return os;
168 }
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 176 of file MatrixSymmetric.cc.

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

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