MatrixBase

template<typename Derived>
class MatrixBase

Base class for all types in the HighFM library. This class uses the CRTP to access the methods of the derived class.

Template Parameters:

Derived – The derived class (e.g., Vector, Matrix or CSRMatrix).

Public Types

using traits = typename internal::type_traits<Derived>

Type traits of the MatrixBase.

Public Functions

MatrixBase() = default

Default Constructor.

virtual ~MatrixBase() = default

Default Destructor.

index_t rows() const noexcept
Returns:

The number of rows in the container.

index_t cols() const noexcept
Returns:

The number of columns in the container.

index_t size() const noexcept
Returns:

The number of elements in the container.

Derived &derived()
Returns:

A reference to the derived object to access its methods.

const Derived &derived() const
Returns:

A const reference to the derived object to access its methods.

template<typename E>
Derived &operator=(internal::MatExpr<E> &&expr)

Evaluates the expression and assign the result to this container. For example,

Matrix<float> A, B, R;
...
R = A + B

Parameters:

expr[in] expression with one or more operations