MoCSI API Reference
Loading...
Searching...
No Matches
Classes | Functions
DenseMatrix.h File Reference
#include <iostream>
#include <string>
#include <valarray>
#include <vector>
#include "GenericMatrix.h"
Include dependency graph for DenseMatrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DenseMatrix< T >
 Concrete implemenatation of a matrix class representing a dense matrix. Offers basic access and element wise arithmetic functionality and mathematical matrix product. More...
 

Functions

template<typename T >
DenseMatrix< Toperator+ (const DenseMatrix< T > &dm_1, const DenseMatrix< T > &dm_2)
 Overload of the binary + operator.
 
template<typename T >
DenseMatrix< Toperator+ (const DenseMatrix< T > &dense_matrix, const T value)
 Overload of the binary + operator.
 
template<typename T >
DenseMatrix< Toperator+ (const T value, const DenseMatrix< T > &dense_matrix)
 Overload of the binary + operator. Needed for symmetry of call.
 
template<typename T >
DenseMatrix< Toperator- (const DenseMatrix< T > &dm_1, const DenseMatrix< T > &dm_2)
 Overload of the binary - operator.
 
template<typename T >
DenseMatrix< Toperator- (const DenseMatrix< T > &dense_matrix, const T value)
 Overload of the binary - operator.
 
template<typename T >
DenseMatrix< Toperator- (const T value, const DenseMatrix< T > &dense_matrix)
 Overload of the binary - operator. Needed for symmetry of call.
 
template<typename T >
DenseMatrix< Toperator* (const DenseMatrix< T > &dm_1, const DenseMatrix< T > &dm_2)
 Overload of the binary * operator. Does matrix multiplication/matrix product.
 
template<typename T >
DenseMatrix< Toperator* (const DenseMatrix< T > &dense_matrix, const T value)
 Overload of the binary * operator.
 
template<typename T >
DenseMatrix< Toperator* (const T value, const DenseMatrix< T > &dense_matrix)
 Overload of the binary * operator. Needed for symmetry of call.
 
template<typename T >
DenseMatrix< Toperator/ (const DenseMatrix< T > &dm_1, const DenseMatrix< T > &dm_2)
 Overload of the binary / operator.
 
template<typename T >
DenseMatrix< Toperator/ (const DenseMatrix< T > &dense_matrix, const T value)
 Overload of the binary / operator.
 
template<typename T >
DenseMatrix< Toperator/ (const T value, const DenseMatrix< T > &dense_matrix)
 Overload of the binary / operator.
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const DenseMatrix< T > &dense_matrix)
 Overload of the << operator.
 

Function Documentation

◆ operator*() [1/3]

template<typename T >
DenseMatrix< T > operator* ( const DenseMatrix< T > &  dense_matrix,
const T  value 
)

Overload of the binary * operator.

Parameters
dense_matrixThe matrix to multiply with the value.
valueThe value to multiply the matrix with.

◆ operator*() [2/3]

template<typename T >
DenseMatrix< T > operator* ( const DenseMatrix< T > &  dm_1,
const DenseMatrix< T > &  dm_2 
)

Overload of the binary * operator. Does matrix multiplication/matrix product.

Parameters
dm_1(const DenseMatrix<T>&): The left matrix.
dm_2(const DenseMatrix<T>&): The right matrix.

Returns: (DenseMatrix<T>) The result of the matrix multiplication.

◆ operator*() [3/3]

template<typename T >
DenseMatrix< T > operator* ( const T  value,
const DenseMatrix< T > &  dense_matrix 
)

Overload of the binary * operator. Needed for symmetry of call.

Parameters
valueThe value to multiply the matrix with.
dense_matrixThe matrix to multiply with the value.

Returns: (DenseMatrix<T>) The result of the element-wise multiplication.

◆ operator+() [1/3]

template<typename T >
DenseMatrix< T > operator+ ( const DenseMatrix< T > &  dense_matrix,
const T  value 
)

Overload of the binary + operator.

Parameters
dense_matrixThe matrix to add together.
valueThe value to add onto the matrix.

◆ operator+() [2/3]

template<typename T >
DenseMatrix< T > operator+ ( const DenseMatrix< T > &  dm_1,
const DenseMatrix< T > &  dm_2 
)

Overload of the binary + operator.

Parameters
dm_1The first matrix to add together.
dm_2The second matrix to add together.

◆ operator+() [3/3]

template<typename T >
DenseMatrix< T > operator+ ( const T  value,
const DenseMatrix< T > &  dense_matrix 
)

Overload of the binary + operator. Needed for symmetry of call.

Parameters
valueThe value to add onto the matrix.
dense_matrixThe matrix to add together.

◆ operator-() [1/3]

template<typename T >
DenseMatrix< T > operator- ( const DenseMatrix< T > &  dense_matrix,
const T  value 
)

Overload of the binary - operator.

Parameters
dense_matrixThe matrix to subtract the value from.
valueThe value to subtract from the matrix.

◆ operator-() [2/3]

template<typename T >
DenseMatrix< T > operator- ( const DenseMatrix< T > &  dm_1,
const DenseMatrix< T > &  dm_2 
)

Overload of the binary - operator.

Parameters
dm_1The first matrix to subtract from each other.
dm_2The second matrix subtract from each other.

◆ operator-() [3/3]

template<typename T >
DenseMatrix< T > operator- ( const T  value,
const DenseMatrix< T > &  dense_matrix 
)

Overload of the binary - operator. Needed for symmetry of call.

Parameters
valueThe value to subtract the matrix elements from.
dense_matrixThe matrix which is subtracted from the value.

◆ operator/() [1/3]

template<typename T >
DenseMatrix< T > operator/ ( const DenseMatrix< T > &  dense_matrix,
const T  value 
)

Overload of the binary / operator.

Parameters
dense_matrixThe matrix acting as the numerator(s).
valueThe value acting as the denominator.

◆ operator/() [2/3]

template<typename T >
DenseMatrix< T > operator/ ( const DenseMatrix< T > &  dm_1,
const DenseMatrix< T > &  dm_2 
)

Overload of the binary / operator.

Parameters
dm_1The numerator matrix.
dm_2The denominator matrix.

◆ operator/() [3/3]

template<typename T >
DenseMatrix< T > operator/ ( const T  value,
const DenseMatrix< T > &  dense_matrix 
)

Overload of the binary / operator.

Parameters
valueThe value acting as the numerator.
dense_matrixThe matrix acting as the denominator(s).

◆ operator<<()

template<typename T >
std::ostream & operator<< ( std::ostream &  out,
const DenseMatrix< T > &  dense_matrix 
)

Overload of the << operator.

Parameters
outThe outstream.
dense_matrixThe matrix to be printed.