Go to the documentation of this file.
20 #ifndef LIBMESH_MAPVECTOR_H
21 #define LIBMESH_MAPVECTOR_H
38 template <
typename Val,
typename index_t=
unsigned int>
46 return maptype::operator[](k);
50 typename maptype::const_iterator it = this->find(k);
51 return it == this->
end().
it? Val() : it->second;
73 return it == other.
it;
77 return it != other.
it;
80 typename maptype::iterator
it;
106 return it == other.
it;
110 return it != other.
it;
113 typename maptype::const_iterator
it;
120 veclike_iterator
erase(
const veclike_iterator & pos) {
121 return veclike_iterator(maptype::erase(pos.it));
125 return veclike_iterator(maptype::begin());
128 const_veclike_iterator
begin()
const {
129 return const_veclike_iterator(maptype::begin());
136 const_veclike_iterator
end()
const {
143 #endif // LIBMESH_MAPVECTOR_H
const_veclike_iterator(const veclike_iterator &i)
veclike_iterator & operator++()
The libMesh namespace provides an interface to certain functionality in the library.
const_veclike_iterator(const const_veclike_iterator &i)
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end.
bool operator==(const const_veclike_iterator &other) const
std::map< index_t, Val > maptype
bool operator!=(const const_veclike_iterator &other) const
const_veclike_iterator & operator++()
maptype::const_iterator it
veclike_iterator erase(const veclike_iterator &pos)
const_veclike_iterator(const typename maptype::const_iterator &i)
veclike_iterator operator++(int)
This mapvector templated class is intended to provide the performance characteristics of a std::map w...
const_veclike_iterator begin() const
Val & operator[](const index_t &k)
const Val & operator*() const
const_veclike_iterator operator++(int)
bool operator!=(const veclike_iterator &other) const
bool operator==(const veclike_iterator &other) const
veclike_iterator(const typename maptype::iterator &i)
const_veclike_iterator end() const