SG++-Doxygen-Documentation
sgpp::combigrid::FloatArrayVector Class Reference

This class models a vector of scalars supporting operations such as addition, scalar multiplication and componentwise muliplication. More...

#include <FloatArrayVector.hpp>

Public Member Functions

void add (FloatArrayVector const &other)
 
FloatScalarVectorat (size_t i)
 Returns a reference to the i-th FloatScalarVector stored. More...
 
void componentwiseMult (FloatArrayVector const &other)
 
 FloatArrayVector (std::vector< FloatScalarVector > const &values)
 
 FloatArrayVector (FloatScalarVector value)
 
 FloatArrayVector (std::shared_ptr< TreeStorage< FloatScalarVector >> storage)
 
 FloatArrayVector ()
 
 FloatArrayVector (FloatArrayVector const &other)
 
FloatScalarVector get (size_t i) const
 This function can be called from python because it does not return a reference. More...
 
std::vector< FloatScalarVector > const & getValues () const
 
double norm () const
 
FloatArrayVectoroperator= (FloatArrayVector const &other)
 
FloatScalarVectoroperator[] (size_t i)
 Returns a reference to the i-th FloatScalarVector stored. More...
 
FloatScalarVector const & operator[] (size_t i) const
 This operator is unsafe because it does no range checking. More...
 
void scalarMult (double const &factor)
 
size_t size () const
 
void sub (FloatArrayVector const &other)
 

Static Public Member Functions

static FloatArrayVector one ()
 
static FloatArrayVector zero ()
 

Detailed Description

This class models a vector of scalars supporting operations such as addition, scalar multiplication and componentwise muliplication.

It is intended to have the same interface as FloatScalarVector. Thus, one can use the same code for single-evaluation and multi-evaluation, where the mode is controlled by passing FloatArrayVector or FloatScalarVector as a template parameter. It contains multiple values resulting for example from Interpolation with multiple evaluation points. If an operation on two FloatArrayVector elements with different number of elements is executed, the last element of the vector with less elements is repeated until both of them have the same size. This allows e.g. for a zero vector (with one element) which can adjust to vectors of arbitrary size.

Constructor & Destructor Documentation

◆ FloatArrayVector() [1/5]

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( std::vector< FloatScalarVector > const &  values)
inlineexplicit

◆ FloatArrayVector() [2/5]

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( FloatScalarVector  value)
inlineexplicit

◆ FloatArrayVector() [3/5]

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( std::shared_ptr< TreeStorage< FloatScalarVector >>  storage)
inlineexplicit

◆ FloatArrayVector() [4/5]

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( )
inline

Referenced by one(), and zero().

◆ FloatArrayVector() [5/5]

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( FloatArrayVector const &  other)
inline

Member Function Documentation

◆ add()

void sgpp::combigrid::FloatArrayVector::add ( FloatArrayVector const &  other)
inline

References python.statsfileInfo::i, and size().

◆ at()

FloatScalarVector& sgpp::combigrid::FloatArrayVector::at ( size_t  i)
inline

Returns a reference to the i-th FloatScalarVector stored.

If there are fewer elements stored, the number of elements is extended via ensureMinimumSize().

References python.statsfileInfo::i.

Referenced by sgpp::combigrid::PolynomialScalarProductEvaluator::initializeBounds().

◆ componentwiseMult()

void sgpp::combigrid::FloatArrayVector::componentwiseMult ( FloatArrayVector const &  other)
inline

References python.statsfileInfo::i, and size().

◆ get()

FloatScalarVector sgpp::combigrid::FloatArrayVector::get ( size_t  i) const
inline

This function can be called from python because it does not return a reference.

It does not do range checking

References python.statsfileInfo::i.

Referenced by sgpp::combigrid::BSplineInterpolationCoefficientEvaluator::setGridPoints().

◆ getValues()

◆ norm()

double sgpp::combigrid::FloatArrayVector::norm ( ) const
inline

◆ one()

static FloatArrayVector sgpp::combigrid::FloatArrayVector::one ( )
inlinestatic

References FloatArrayVector().

◆ operator=()

FloatArrayVector& sgpp::combigrid::FloatArrayVector::operator= ( FloatArrayVector const &  other)
inline

◆ operator[]() [1/2]

FloatScalarVector& sgpp::combigrid::FloatArrayVector::operator[] ( size_t  i)
inline

Returns a reference to the i-th FloatScalarVector stored.

If there are fewer elements stored, the number of elements is extended via ensureMinimumSize().

References python.statsfileInfo::i.

◆ operator[]() [2/2]

FloatScalarVector const& sgpp::combigrid::FloatArrayVector::operator[] ( size_t  i) const
inline

This operator is unsafe because it does no range checking.

References python.statsfileInfo::i.

◆ scalarMult()

void sgpp::combigrid::FloatArrayVector::scalarMult ( double const &  factor)
inline

◆ size()

size_t sgpp::combigrid::FloatArrayVector::size ( ) const
inline

Referenced by add(), componentwiseMult(), and sub().

◆ sub()

void sgpp::combigrid::FloatArrayVector::sub ( FloatArrayVector const &  other)
inline

References python.statsfileInfo::i, and size().

◆ zero()

static FloatArrayVector sgpp::combigrid::FloatArrayVector::zero ( )
inlinestatic

References FloatArrayVector().


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