Zoltan2
Public Member Functions
Zoltan2::GidLookupHelper< T, lno_t > Class Template Reference

A class to do GID lookups. More...

#include <Zoltan2_GidLookupHelper.hpp>

List of all members.

Public Member Functions

 GidLookupHelper (const RCP< const Environment > &env, const ArrayRCP< const T > &gidList)
 Constructor.
 GidLookupHelper ()
 Construct an empty lookup helper.
lno_t lookup (const T gid) const
 the index of the global id in the gidList passed into the constructor.
lno_t size () const
 the number of unique gids in the list.
void getIndices (ArrayRCP< lno_t > &indices) const
 Return a list of the indices in gidList that were included in the lookup table (all if there were no duplicates.) Returns indices from lowest to highest.

Detailed Description

template<typename T, typename lno_t>
class Zoltan2::GidLookupHelper< T, lno_t >

A class to do GID lookups.

Processing user global IDs may require GID -> index look ups. Some T support generation of unique double hash keys for any value. Ordinals are an example. So do not, such as strings.

If double hash keys are supported, a hash table will be created. If not, a std::map will be created.

Definition at line 76 of file Zoltan2_GidLookupHelper.hpp.


Constructor & Destructor Documentation

template<typename T , typename lno_t >
Zoltan2::GidLookupHelper< T, lno_t >::GidLookupHelper ( const RCP< const Environment > &  env,
const ArrayRCP< const T > &  gidList 
)

Constructor.

Definition at line 130 of file Zoltan2_GidLookupHelper.hpp.

template<typename T , typename lno_t >
Zoltan2::GidLookupHelper< T, lno_t >::GidLookupHelper ( )

Construct an empty lookup helper.

Definition at line 124 of file Zoltan2_GidLookupHelper.hpp.


Member Function Documentation

template<typename T , typename lno_t >
lno_t Zoltan2::GidLookupHelper< T, lno_t >::lookup ( const T  gid) const

the index of the global id in the gidList passed into the constructor.

If duplicate gids appear in the list, it is the location of the first of these.

Definition at line 184 of file Zoltan2_GidLookupHelper.hpp.

template<typename T, typename lno_t>
lno_t Zoltan2::GidLookupHelper< T, lno_t >::size ( ) const [inline]

the number of unique gids in the list.

Definition at line 108 of file Zoltan2_GidLookupHelper.hpp.

template<typename T , typename lno_t >
void Zoltan2::GidLookupHelper< T, lno_t >::getIndices ( ArrayRCP< lno_t > &  indices) const

Return a list of the indices in gidList that were included in the lookup table (all if there were no duplicates.) Returns indices from lowest to highest.

Definition at line 212 of file Zoltan2_GidLookupHelper.hpp.


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