95 MatrixArray<T>(
size_t numRows,
size_t numCols = 1,
size_t numPages = 1);
121 MatrixArray<T>(
size_t numRows,
size_t numCols,
const std::valarray<T>& values);
129 MatrixArray<T>(
size_t numRows,
size_t numCols, std::valarray<T>&& values);
138 MatrixArray<T>(
size_t numRows,
size_t numCols,
size_t numPages,
const std::valarray<T>& values);
147 MatrixArray<T>(
size_t numRows,
size_t numCols,
size_t numPages, std::valarray<T>&& values);
245 template <
bool EnableBool =
true,
246 typename =
typename std::enable_if<(std::is_same<T, std::complex<double>>::value &&
277 m_values * std::valarray<T>(rhs, m_numRows * m_numCols * m_numPages));
284 AssertEqualDims(rhs);
292 AssertEqualDims(rhs);
300 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 > & operator=(const MatrixArray< T > &)=default
Copy assignment operator.
MatrixArray< T > & operator=(MatrixArray< T > &&)=default
Move assignment operator.
MatrixArray< T > HermitianTranspose() const
Function that performs the Hermitian transpose of this MatrixArray and returns a new matrix that is t...
MatrixArray< T > operator*(const T &rhs) const
Element-wise multiplication with a scalar value.
MatrixArray< T > operator-() const
unary operator- definition for MatrixArray<T>.
MatrixArray< T > Transpose() const
This operator interprets the 3D array as an array of matrices, and performs a linear algebra operatio...
MatrixArray< T > MultiplyByLeftAndRightMatrix(const MatrixArray< T > &lMatrix, const MatrixArray< T > &rMatrix) const
Multiply each matrix in the array by the left and the right matrix.
MatrixArray< T > 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.