pelib
2.0.0
|
#include <Vector.hpp>
Public Member Functions | |
Vector (const std::string name, const VectorType values) | |
Vector (const Vector< Key, Value > *vector) | |
virtual Vector * | clone () 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 |
Models an algebraic vector of data
Definition at line 39 of file Vector.hpp.
pelib::Vector< Key, Value >::Vector | ( | const std::string | name, |
const VectorType | values | ||
) | [inline] |
Constructor
name | name associated to this vector |
values | Values held in the vector associated to an ordered set of indexes |
Definition at line 48 of file Vector.hpp.
pelib::Vector< Key, Value >::Vector | ( | const Vector< Key, Value > * | vector | ) | [inline] |
Copy constructor
Definition at line 54 of file Vector.hpp.
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.
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.
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.
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.
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.
VectorType pelib::Vector< Key, Value >::values [protected] |
Definition at line 114 of file Vector.hpp.