Allium  0.1.0
allium::LocalVector< N > Class Template Reference

Implements a (mathematical) vector in the mathematical sense, which is stored locally, i.e., not distributed across different processors. More...

#include <local_vector.hpp>

Inheritance diagram for allium::LocalVector< N >:
Collaboration diagram for allium::LocalVector< N >:

Public Types

using Number = N
 
using Real = real_part_t< Number >
 
using EigenVector = Eigen::Matrix< N, Eigen::Dynamic, 1 >
 
- Public Types inherited from allium::VectorTrait< LocalVector< N >, N >
using Number = N
 
using Real = real_part_t< Number >
 
- Public Types inherited from allium::CrtpTrait< Derived >
using DerivedType = Derived
 

Public Member Functions

 LocalVector (size_t rows)
 
 LocalVector (std::initializer_list< N > entries)
 
 LocalVector (const EigenVector &v)
 
LocalVector & operator+= (const LocalVector &rhs)
 
LocalVector & operator*= (Number rhs)
 
Number dot (const LocalVector &rhs) const
 
Number & operator[] (size_t i_element)
 
Number operator[] (size_t i_element) const
 
size_t rows () const
 
size_t nrows () const
 
const EigenVector & native () const
 
- Public Member Functions inherited from allium::VectorTrait< LocalVector< N >, N >
LocalVector< N > & operator-= (const Other &other)
 
LocalVector< N > & operator/= (Number divisor)
 
LocalVector< N > operator+ (const Other &rhs) const
 
LocalVector< N > operator- (const Other &rhs) const
 
LocalVector< N > operator* (Number factor) const
 
LocalVector< N > operator/ (Number divisor) const
 

Static Public Member Functions

static LocalVector constant (size_t rows, Number x)
 

Detailed Description

template<typename N>
class allium::LocalVector< N >

Implements a (mathematical) vector in the mathematical sense, which is stored locally, i.e., not distributed across different processors.

Member Function Documentation

◆ constant()

template<typename N >
static LocalVector allium::LocalVector< N >::constant ( size_t  rows,
Number  x 
)
inlinestatic

Return a vector whose entries are all equal.

Parameters
[in]xThe value of the entries.

◆ rows()

template<typename N >
size_t allium::LocalVector< N >::rows ( ) const
inline

The length of the vector.


The documentation for this class was generated from the following file: