class FloatArrayStore Access and manipulate an indexed storage of float vectors
More...
#include <FloatArrayStore.h>
class FloatArrayStore Access and manipulate an indexed storage of float vectors
- Author
- Jorgen Beck Hansen
Definition at line 34 of file FloatArrayStore.h.
◆ Buffer
◆ BufferMap
◆ lessp
◆ map_citr
◆ FloatArrayStore() [1/2]
| FloatArrayStore::FloatArrayStore |
( |
| ) |
|
|
inline |
constructors, optionally with a tag
Definition at line 97 of file FloatArrayStore.h.
97:
m_tag(
"Undefined") { }
std::string m_tag
The tag std::string.
◆ FloatArrayStore() [2/2]
| FloatArrayStore::FloatArrayStore |
( |
const std::string & | tag | ) |
|
|
inline |
◆ ~FloatArrayStore()
| FloatArrayStore::~FloatArrayStore |
( |
| ) |
|
|
inlinevirtual |
◆ begin()
begin/end iterators
Definition at line 157 of file FloatArrayStore.h.
BufferMap m_bufmap
The std::map.
◆ buffer()
| const Buffer & FloatArrayStore::buffer |
( |
| ) |
const |
|
inline |
return stored vector
Definition at line 83 of file FloatArrayStore.h.
Buffer m_buf
The std::vector<float> stored in each second element.
◆ cbegin()
◆ cend()
◆ cleanUp()
| void FloatArrayStore::cleanUp |
( |
| ) |
|
remove data with no index pointing to it
Definition at line 9 of file FloatArrayStore.cxx.
9 {
10 std::multimap<int,Identifier> indexmap;
11
14 indexmap.insert(std::pair<int,Identifier>(std::abs(itr->second),itr->first));
15 std::vector< std::vector<float> >
tmp(
m_buf);
21 Identifier shared_id;
22 std::multimap<int,Identifier>::iterator
pos;
23 for ( pos=indexmap.lower_bound(i); pos!=indexmap.upper_bound(i); ++pos){
24 if (first){
26 shared_id=
pos->second;
27 this->
push_back(shared_id,tmp[std::abs(i)]);
28 } else
30 }
31 }
32}
void share(const Identifier &ident, const Identifier &referenceIdent)
makes index ident share data with referenceIdent
BufferMap::const_iterator map_citr
void push_back(const Identifier &ident, const std::vector< float > &value)
makes new indices
void dbg() const
print method
◆ clear()
| void FloatArrayStore::clear |
( |
| ) |
|
|
inline |
◆ dbg()
| void FloatArrayStore::dbg |
( |
| ) |
const |
◆ end()
◆ existID()
| bool FloatArrayStore::existID |
( |
const Identifier & | ident | ) |
const |
|
inline |
◆ numberOfIDs()
| int FloatArrayStore::numberOfIDs |
( |
| ) |
const |
|
inline |
◆ operator=()
move assignment
Definition at line 101 of file FloatArrayStore.h.
101 {
102 if (this!=&other){
106 }
107 return *this;
108}
◆ operator[]() [1/2]
| std::vector< float > & FloatArrayStore::operator[] |
( |
const Identifier & | ident | ) |
|
|
inline |
◆ operator[]() [2/2]
| const std::vector< float > & FloatArrayStore::operator[] |
( |
const Identifier & | ident | ) |
const |
|
inline |
◆ push_back() [1/2]
| void FloatArrayStore::push_back |
( |
const Identifier & | ident, |
|
|
const std::vector< float > & | value ) |
|
inline |
◆ push_back() [2/2]
| void FloatArrayStore::push_back |
( |
const std::vector< Identifier > & | identvec, |
|
|
const std::vector< float > & | value ) |
|
inline |
Definition at line 121 of file FloatArrayStore.h.
121 {
122 m_buf.push_back(value);
124 for(std::vector<Identifier>::const_iterator it = identvec.begin() ; it != identvec.end(); ++it)
126}
◆ removeID()
| void FloatArrayStore::removeID |
( |
const Identifier & | ident | ) |
|
|
inline |
◆ share()
makes index ident share data with referenceIdent
Definition at line 146 of file FloatArrayStore.h.
147 {
151 }
152}
bool existID(const Identifier &ident) const
returns flag for index existing in the std::map
◆ sharedID()
| bool FloatArrayStore::sharedID |
( |
const Identifier & | ident | ) |
const |
|
inline |
◆ tag()
| const std::string & FloatArrayStore::tag |
( |
| ) |
const |
|
inline |
◆ m_buf
The std::vector<float> stored in each second element.
Definition at line 90 of file FloatArrayStore.h.
◆ m_bufmap
◆ m_tag
| std::string FloatArrayStore::m_tag |
|
private |
The documentation for this class was generated from the following files: