NEML2 2.1.0
Loading...
Searching...
No Matches

Sparse representation of a vector consisting of a list of tensors and their layout. More...

Detailed Description

Sparse representation of a vector consisting of a list of tensors and their layout.

#include <SparseVector.h>

Public Member Functions

 SparseVector ()=default
 SparseVector (AxisLayout)
 SparseVector (AxisLayout, std::vector< Tensor >)
TensorOptions options () const
 Tensor options.
SparseVector group (std::size_t) const
 Contiguous view of the sparse vector.
AssembledVector assemble () const
 Assemble the tensors for each variable group.

Public Attributes

std::vector< Tensortensors
 List of tensors.
AxisLayout layout
 Layout of the tensors.

Constructor & Destructor Documentation

◆ SparseVector() [1/3]

SparseVector ( )
default

◆ SparseVector() [2/3]

SparseVector ( AxisLayout )

◆ SparseVector() [3/3]

SparseVector ( AxisLayout ,
std::vector< Tensor >  )

Member Function Documentation

◆ assemble()

AssembledVector assemble ( ) const

Assemble the tensors for each variable group.

◆ group()

SparseVector group ( std::size_t ) const

Contiguous view of the sparse vector.

◆ options()

TensorOptions options ( ) const

Tensor options.

Member Data Documentation

◆ layout

AxisLayout layout

Layout of the tensors.

◆ tensors

std::vector<Tensor> tensors

List of tensors.