84 MatrixArray(
size_t numRows,
size_t numCols = 1,
size_t numPages = 1);
90 explicit MatrixArray(
const std::valarray<T>& values);
102 explicit MatrixArray(
const std::vector<T>& values);
110 MatrixArray(
size_t numRows,
size_t numCols,
const std::valarray<T>& values);
118 MatrixArray(
size_t numRows,
size_t numCols, std::valarray<T>&& values);
127 MatrixArray(
size_t numRows,
size_t numCols,
size_t numPages,
const std::valarray<T>& values);
136 MatrixArray(
size_t numRows,
size_t numCols,
size_t numPages, std::valarray<T>&& values);
227 template <
bool EnableBool =
true,
228 typename = std::enable_if_t<(std::is_same_v<T, std::complex<double>> && EnableBool)>>
292 m_values * std::valarray<T>(rhs, m_numRows * m_numCols * m_numPages));
299 AssertEqualDims(rhs);
307 AssertEqualDims(rhs);
315 return MatrixArray<T>(m_numRows, m_numCols, m_numPages, -m_values);
MatrixArray class inherits ValArray class and provides additional interfaces to ValArray which enable...
MatrixArray< T > HermitianTranspose() const
Function that performs the Hermitian transpose of this MatrixArray and returns a new matrix that is t...
MatrixArray operator*(const T &rhs) const
Element-wise multiplication with a scalar value.
MatrixArray operator-() const
unary operator- definition for MatrixArray<T>.
MatrixArray Determinant() const
This operator calculates a vector o determinants, one for each page.
static MatrixArray< T > IdentityMatrix(const size_t size, const size_t pages=1)
Function produces an identity MatrixArray with the specified size.
static MatrixArray< T > JoinPages(const std::vector< MatrixArray< T > > &pages)
Function joins multiple pages into a single MatrixArray.
MatrixArray Transpose() const
This operator interprets the 3D array as an array of matrices, and performs a linear algebra operatio...
MatrixArray< T > MakeNCopies(size_t nCopies) const
Function that copies the current 1-page matrix into a new matrix with n copies of the original matrix...
MatrixArray operator-(const MatrixArray< T > &rhs) const
binary operator- definition for MatrixArray<T>.
MatrixArray< T > ExtractPage(size_t page) const
Function extracts a page from a MatrixArray.
MatrixArray MultiplyByLeftAndRightMatrix(const MatrixArray< T > &lMatrix, const MatrixArray< T > &rMatrix) const
Multiply each matrix in the array by the left and the right matrix.
MatrixArray FrobeniusNorm() const
This operator calculates a vector of Frobenius norm, one for each page.
MatrixArray operator+(const MatrixArray< T > &rhs) const
operator+ definition for MatrixArray<T>.
ValArray is a class to efficiently store 3D array.
T * GetPagePtr(size_t pageIndex)
Get a data pointer to a specific 2D array for use in linear algebra libraries.
void AssertEqualDims(const ValArray< T > &rhs) const
Function that asserts if the dimensions of lhs and rhs ValArray are not equal and prints a message wi...
size_t m_numCols
The size of the second dimension, i.e., the number of columns of each 2D array.
std::valarray< T > m_values
The data values.
size_t m_numRows
The size of the first dimension, i.e., the number of rows of each 2D array.
bool EqualDims(const ValArray< T > &rhs) const
Checks whether rhs and lhs ValArray objects have the same dimensions.
size_t m_numPages
The size of the third dimension, i.e., the number of 2D arrays.
Every class exported by the ns3 library is enclosed in the ns3 namespace.