|
template<typename Integer , typename = typename std::enable_if< std::is_integral<Integer>::value, Integer>::type> |
| Matrix (const Integer size) |
| Constructor.
|
|
template<typename Integer , typename = typename std::enable_if< std::is_integral<Integer>::value, Integer>::type> |
| Matrix (const Integer rows, const Integer cols) |
| Constructor.
|
|
std::pair< size_t, size_t > | size () const |
| Get the matrix shape.
|
|
template<typename Integer , typename = typename std::enable_if< std::is_integral<Integer>::value, Integer>::type> |
std::vector< T > & | operator[] (const Integer index) |
| returns the address of the element at ith place (here ith row of the matrix)
|
|
Matrix | slice (const size_t row_start, const size_t row_end=MAX_SIZE, const size_t col_start=MAX_SIZE, const size_t col_end=MAX_SIZE) const |
| Creates a new matrix and returns a part of it.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, Number>::type> |
void | h_stack (const Matrix< Number > &other) |
| Horizontally stack the matrix (one after the other)
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, Number>::type> |
void | v_stack (const Matrix< Number > &other) |
| Horizontally stack the matrix (current matrix above the other)
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | operator+ (const Matrix< Number > &other) const |
| Add two matrices and returns a new matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix & | operator+= (const Matrix< Number > &other) const |
| Add another matrices to current matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | operator- (const Matrix< Number > &other) const |
| Subtract two matrices and returns a new matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix & | operator-= (const Matrix< Number > &other) const |
| Subtract another matrices to current matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | operator* (const Matrix< Number > &other) const |
| Multiply two matrices and returns a new matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | operator* (const Number other) const |
| Multiply matrix with a number and returns a new matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix & | operator*= (const Number other) const |
| Multiply a number to current matrix.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | naive_multiplication (const Matrix< Number > &other) const |
| Naive multiplication performed on this.
|
|
template<typename Number , typename = typename std::enable_if< std::is_integral<Number>::value || std::is_floating_point<Number>::value, bool>::type> |
Matrix | strassens_multiplication (const Matrix< Number > &other) const |
| Strassens method of multiplying two matrices References: https://en.wikipedia.org/wiki/Strassen_algorithm.
|
|
bool | operator== (const Matrix< T > &other) const |
| Compares two matrices if each of them are equal or not.
|
|
template<typename T, typename = typename std::enable_if< std::is_integral<T>::value || std::is_floating_point<T>::value, bool>::type>
class divide_and_conquer::strassens_multiplication::Matrix< T, typename >
Matrix class.
Definition at line 40 of file strassen_matrix_multiplication.cpp.