COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
Cosmos::Math::Matrices Namespace Reference

Classes

class  Matrix
 

Functions

Matrix operator* (const double scale, const Matrix &m)
 Reverse scalar product. More...
 
Matrix eye (double scale)
 Scaled Identity ::Matrix. More...
 
Matrix operator* (const double scale, Matrix &v)
 

Function Documentation

Matrix Cosmos::Math::Matrices::operator* ( const double  scale,
const Matrix m 
)

Reverse scalar product.

Calculate the scalar product with the provided scale.

Parameters
scaleScale to multiply by.
Returns
Scale times this.
1739  {
1740  return m * scale;
1741  }
Matrix Cosmos::Math::Matrices::eye ( double  scale)

Scaled Identity ::Matrix.

::Matrix with diagonal elements set to one and all others set to zero

Returns
Identity matrix
2026  {
2027  Matrix mat;
2028  mat[0][0] = scale;
2029  mat[1][1] = scale;
2030  mat[2][2] = scale;
2031 
2032  return mat;
2033  }
Matrix Cosmos::Math::Matrices::operator* ( const double  scale,
Matrix v 
)