pelib  2.0.0
pelib::Vector< Key, Value > Class Template Reference

#include <Vector.hpp>

Inheritance diagram for pelib::Vector< Key, Value >:
[legend]

List of all members.

Public Member Functions

 Vector (const std::string name, const VectorType values)
 Vector (const Vector< Key, Value > *vector)
virtual Vectorclone () const
virtual const std::map< Key,
Value > & 
getValues () const
virtual const Value & find (Key key) const
virtual size_t getSize () const
void merge (const AlgebraData *ptr)

Protected Attributes

VectorType values

Detailed Description

template<class Key, class Value>
class pelib::Vector< Key, Value >

Models an algebraic vector of data

Definition at line 39 of file Vector.hpp.


Constructor & Destructor Documentation

template<class Key, class Value>
pelib::Vector< Key, Value >::Vector ( const std::string  name,
const VectorType  values 
) [inline]

Constructor

Parameters:
namename associated to this vector
valuesValues held in the vector associated to an ordered set of indexes

Definition at line 48 of file Vector.hpp.

template<class Key, class Value>
pelib::Vector< Key, Value >::Vector ( const Vector< Key, Value > *  vector) [inline]

Copy constructor

Definition at line 54 of file Vector.hpp.


Member Function Documentation

template<class Key, class Value>
virtual Vector* pelib::Vector< Key, Value >::clone ( ) const [inline, virtual]

Returns a pointer to a copy of this Vector

Implements pelib::AlgebraData.

Definition at line 62 of file Vector.hpp.

template<class Key, class Value>
virtual const Value& pelib::Vector< Key, Value >::find ( Key  key) const [inline, virtual]

Returns a single value in the Vector thanks to the key associated to the value

Definition at line 78 of file Vector.hpp.

template<class Key, class Value>
virtual size_t pelib::Vector< Key, Value >::getSize ( ) const [inline, virtual]

Returns the number of elements stored in the Vector

Definition at line 86 of file Vector.hpp.

template<class Key, class Value>
virtual const std::map<Key, Value>& pelib::Vector< Key, Value >::getValues ( ) const [inline, virtual]

Returns all values held in this Vector, associated to their key

Definition at line 70 of file Vector.hpp.

template<class Key, class Value>
void pelib::Vector< Key, Value >::merge ( const AlgebraData ) [inline, virtual]

Merge data in this instance and instance given as argument, or replace it if merging is not possible

Implements pelib::AlgebraData.

Definition at line 92 of file Vector.hpp.


Member Data Documentation

template<class Key, class Value>
VectorType pelib::Vector< Key, Value >::values [protected]

Definition at line 114 of file Vector.hpp.


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