cosi::LabelMap< T2 > Class Template Reference

#include <LabelMap.hpp>

Inheritance diagram for cosi::LabelMap< T2 >:

cosi::CommunicationStructure< cosi::Label_1 > cosi::CommunicationStructure< cosi::Label_10 > cosi::CommunicationStructure< cosi::Label_5 > cosi::CommunicationStructure< cosi::Label_7 > cosi::CommunicationStructure< cosi::Label_8 > cosi::NetworkBase cosi::NetworkBase cosi::U_CommunicationStructure< cosi::Label_1 >

List of all members.

Public Member Functions

 LabelMap ()
 Default constructor.
 ~LabelMap ()
 Destructor.
void Set (Vertex V, T2 pD)
 Assigns the value pD to pK.
void Set (Edge E, T2 pD)
void Erase (Vertex V)
void Erase (Edge E)
T2 & Get (Vertex V)
 Returns the value associated to pK.
T2 & Get (Edge E)
bool Assigned (Vertex V)
 Returns false if no value has been previously assigned to pK (by an appropiate call to the Set function).
bool Assigned (Edge E)
multiset< string > GetQuantityNames ()

Private Attributes

map< Vertex, T2 > mV
 The internal map storage.
map< Edge, T2 > mE


Detailed Description

template<class T2>
class cosi::LabelMap< T2 >

This template class defines a map between two objects. In COSI, this template class is used to attach labels to nodes and links.

Author:
Alessandro Pinto,

The Donald O. Pederson Center for Electronic System Design

Electrical Engineering Department

University of California, Berkeley

545P Cory Hall, Berkeley, CA 94720

+1 (510) 642 9670

http://www.eecs.berkeley.edu/~apinto

Version:
Id
LabelMap.hpp,v 1.11 2008/08/21 23:38:14 apinto Exp

Constructor & Destructor Documentation

template<class T2>
cosi::LabelMap< T2 >::LabelMap (  )  [inline]

Default constructor.

template<class T2>
cosi::LabelMap< T2 >::~LabelMap (  )  [inline]

Destructor.

The destructor clears the intermal map.


Member Function Documentation

template<class T2>
void cosi::LabelMap< T2 >::Set ( Vertex  V,
T2  pD 
) [inline]

Assigns the value pD to pK.

template<class T2>
void cosi::LabelMap< T2 >::Set ( Edge  E,
T2  pD 
) [inline]

template<class T2>
void cosi::LabelMap< T2 >::Erase ( Vertex  V  )  [inline]

template<class T2>
void cosi::LabelMap< T2 >::Erase ( Edge  E  )  [inline]

template<class T2>
T2& cosi::LabelMap< T2 >::Get ( Vertex  V  )  [inline]

Returns the value associated to pK.

If no value has been associated to pK, this function returns the default object T2(). A default constructur should always be availalbe for type T2.

template<class T2>
T2& cosi::LabelMap< T2 >::Get ( Edge  E  )  [inline]

template<class T2>
bool cosi::LabelMap< T2 >::Assigned ( Vertex  V  )  [inline]

Returns false if no value has been previously assigned to pK (by an appropiate call to the Set function).

See also:
Set

template<class T2>
bool cosi::LabelMap< T2 >::Assigned ( Edge  E  )  [inline]

template<class T2>
multiset<string> cosi::LabelMap< T2 >::GetQuantityNames (  )  [inline]


Member Data Documentation

template<class T2>
map<Vertex,T2> cosi::LabelMap< T2 >::mV [private]

The internal map storage.

template<class T2>
map<Edge,T2> cosi::LabelMap< T2 >::mE [private]


The documentation for this class was generated from the following file:
Generated on Sun Sep 7 18:37:46 2008 for COSI by  doxygen 1.5.4
Contact 
©2002-2018 U.C. Regents