|
using | type = MatrixBase< Container, ValueType, Properties... > |
| The traits associated with the particular container.
|
|
using | traits = ContainerTraits< Container, ValueType, Properties... > |
| The type of the indices held by the container.
|
|
using | size_type = typename traits::size_type |
|
enum | |
|
enum | |
|
using | value_type = ValueType |
| The type of values held by the container.
|
|
using | const_value_type = typename std::add_const< ValueType >::type |
| The const type of values held by the container.
|
|
using | non_const_value_type = typename std::remove_const< ValueType >::type |
| The non-const type of values held by the container.
|
|
using | index_type = IndexType |
| The type of indices held by the container.
|
|
using | size_type = size_t |
| The size type of the container.
|
|
using | non_const_index_type = typename std::remove_const< IndexType >::type |
| The non-const type of indices held by the container.
|
|
using | array_layout = ArrayLayout |
| The storage layout of data held by the container.
|
|
using | backend = Backend |
| The backend out of which algorithms will be dispatched from.
|
|
using | execution_space = ExecutionSpace |
| The space in which member functions will be executed in.
|
|
using | memory_space = MemorySpace |
| The space in which data will be stored in.
|
|
using | device_type = Morpheus::Device< execution_space, memory_space, backend > |
| A device aware of the execution, memory spaces and backend.
|
|
using | memory_traits = MemoryTraits |
| Represents the user's intended access behaviour.
|
|
using | host_mirror_backend = typename Morpheus::HostMirror< backend >::backend |
| The host equivalent backend.
|
|
using | type = Container< value_type, index_type, array_layout, backend, memory_traits > |
| The complete type of the container.
|
|
using | HostMirror = Container< non_const_value_type, non_const_index_type, array_layout, Morpheus::Device< typename host_mirror_backend::execution_space, typename host_mirror_backend::memory_space, typename host_mirror_backend::backend >, typename Kokkos::MemoryManaged > |
| The host mirror equivalent for the container. More...
|
|
using | pointer = typename std::add_pointer< type >::type |
| The pointer type of the container.
|
|
using | const_pointer = typename std::add_pointer< typename std::add_const< type >::type >::type |
| The const pointer type of the container.
|
|
using | reference = typename std::add_lvalue_reference< type >::type |
| The reference type of the container.
|
|
using | const_reference = typename std::add_lvalue_reference< typename std::add_const< type >::type >::type |
| The const reference type of the container.
|
|
|
| MatrixBase () |
| Default constructor. More...
|
|
| MatrixBase (size_type rows, size_type cols, size_type entries=0) |
| Construct a MatrixBase object with shape (num_rows, num_cols) and number of non-zeros equal to num_entries. More...
|
|
void | resize (size_type rows, size_type cols, size_type entries) |
| Resizes MatrixBase with shape of (num_rows, num_cols) and sets number of non-zero entries to num_entries. More...
|
|
size_type | nrows () const |
| Number of rows of the matrix. More...
|
|
size_type | ncols () const |
| Number of columns of the matrix. More...
|
|
size_type | nnnz () const |
| Number of non-zeros of the matrix. More...
|
|
void | set_nrows (const size_type rows) |
| Set the number of rows of the matrix. More...
|
|
void | set_ncols (const size_type cols) |
| Set the number of columns of the matrix. More...
|
|
void | set_nnnz (const size_type nnz) |
| Set the number of non-zeros of the matrix. More...
|
|
MatrixStructure | structure () const |
| The specialized structure of the matrix e.g Symmetric. More...
|
|
MatrixOptions | options () const |
| Information about specific characteristics of the matrix e.g has short rows. More...
|
|
void | set_structure (MatrixStructure op) |
| Set the structure of the matrix. More...
|
|
void | set_options (MatrixOptions op) |
| Set the characteristics of the matrix. More...
|
|
template<template< class, class... > class Container, class
ValueType, class... Properties>
class Morpheus::MatrixBase< Container, ValueType, Properties >
Base class used to derive new matrices.
- Template Parameters
-
Container | Type of the new container we are deriving. |
ValueType | Type of values to store |
Properties | Optional properties to modify the behaviour of the container. Sensible defaults are selected based on the configuration. Please refer to impl/Morpheus_ContainerTraits.hpp to find out more about the valid properties. |
- Overview
- The MatrixBase class is used to organize common information that is often found across the different matrix types/formats. Examples of such information is the shape of the matrix, a specific structure might have (e.g Symmetric) or any specific properties such as it has short rows.
- Example
- The example below shows how to define a new matrix class that will inherit from MatrixBase.
#include <Morpheus_Core.hpp>
template <
class ValueType,
class... Properties>
class NewMatrix :
public MatrixBase<NewMatrix, ValueType, Properties...>{
}
Base class used to derive new matrices.
Definition: Morpheus_MatrixBase.hpp:70
A wrapper that checks if the provided type is a scalar type.
Definition: Morpheus_TypeTraits.hpp:85