SG++
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

sgpp::combigrid::FloatArrayVector::FloatArrayVector ( std::vector< FloatScalarVector > const &  values)
inlineexplicit
sgpp::combigrid::FloatArrayVector::FloatArrayVector ( FloatScalarVector  value)
inlineexplicit
sgpp::combigrid::FloatArrayVector::FloatArrayVector ( std::shared_ptr< TreeStorage< FloatScalarVector >>  storage)
inlineexplicit
sgpp::combigrid::FloatArrayVector::FloatArrayVector ( )
inline

Referenced by one(), and zero().

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

Member Function Documentation

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

References size().

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().

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

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

References size().

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

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

double sgpp::combigrid::FloatArrayVector::norm ( ) const
inline
static FloatArrayVector sgpp::combigrid::FloatArrayVector::one ( )
inlinestatic

References FloatArrayVector().

FloatArrayVector& sgpp::combigrid::FloatArrayVector::operator= ( FloatArrayVector const &  other)
inline
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().

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

This operator is unsafe because it does no range checking.

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

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

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

References size().

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

References FloatArrayVector().


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