libMesh::mapvector< Val, index_t > Class Template Reference

#include <mapvector.h>

Inheritance diagram for libMesh::mapvector< Val, index_t >:

Classes

class  const_veclike_iterator
 
class  veclike_iterator
 

Public Types

typedef std::map< index_t, Val > maptype
 

Public Member Functions

Val & operator[] (const index_t &k)
 
Val operator[] (const index_t &k) const
 
void erase (index_t i)
 
void erase (const veclike_iterator &pos)
 
veclike_iterator begin ()
 
const_veclike_iterator begin () const
 
veclike_iterator end ()
 
const_veclike_iterator end () const
 

Detailed Description

template<typename Val, typename index_t = unsigned int>
class libMesh::mapvector< Val, index_t >

This mapvector templated class is intended to provide the performance characteristics of a std::map with an interface more closely resembling that of a std::vector, for use with ParallelMesh.

Author
Roy H. Stogner

Definition at line 38 of file mapvector.h.

Member Typedef Documentation

template<typename Val, typename index_t = unsigned int>
typedef std::map<index_t, Val> libMesh::mapvector< Val, index_t >::maptype

Definition at line 41 of file mapvector.h.

Member Function Documentation

template<typename Val, typename index_t = unsigned int>
veclike_iterator libMesh::mapvector< Val, index_t >::begin ( )
inline

Definition at line 124 of file mapvector.h.

Referenced by libMesh::ParallelMesh::fix_broken_node_and_element_numbering(), and libMesh::ParallelMesh::renumber_dof_objects().

124  {
125  return veclike_iterator(maptype::begin());
126  }
template<typename Val, typename index_t = unsigned int>
const_veclike_iterator libMesh::mapvector< Val, index_t >::begin ( ) const
inline

Definition at line 128 of file mapvector.h.

128  {
129  return const_veclike_iterator(maptype::begin());
130  }
template<typename Val, typename index_t = unsigned int>
veclike_iterator libMesh::mapvector< Val, index_t >::end ( )
inline
template<typename Val, typename index_t = unsigned int>
const_veclike_iterator libMesh::mapvector< Val, index_t >::end ( ) const
inline

Definition at line 136 of file mapvector.h.

136  {
137  return const_veclike_iterator(maptype::end());
138  }
template<typename Val, typename index_t = unsigned int>
void libMesh::mapvector< Val, index_t >::erase ( index_t  i)
inline

Definition at line 116 of file mapvector.h.

Referenced by libMesh::ParallelMesh::renumber_dof_objects().

116  {
117  maptype::erase(i);
118  }
template<typename Val, typename index_t = unsigned int>
void libMesh::mapvector< Val, index_t >::erase ( const veclike_iterator pos)
inline

Definition at line 120 of file mapvector.h.

120  {
121  maptype::erase(pos.it);
122  }
template<typename Val, typename index_t = unsigned int>
Val& libMesh::mapvector< Val, index_t >::operator[] ( const index_t &  k)
inline

Definition at line 43 of file mapvector.h.

44  {
45  return maptype::operator[](k);
46  }
template<typename Val, typename index_t = unsigned int>
Val libMesh::mapvector< Val, index_t >::operator[] ( const index_t &  k) const
inline

Definition at line 47 of file mapvector.h.

48  {
49  typename maptype::const_iterator it = this->find(k);
50  return it == this->end().it? Val() : it->second;
51  }

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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:58:01 UTC

Hosted By:
SourceForge.net Logo