Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ne_map< Key, Value, Graph, Alloc > Class Template Reference

Baseclass for node_map and edge_map. More...

#include <JETSCAPE/blob/main/external_packages/gtl/include/GTL/ne_map.h>

+ Collaboration diagram for ne_map< Key, Value, Graph, Alloc >:

Public Types

typedef vector< Value, Alloc >
::reference 
value_reference
 
typedef vector< Value, Alloc >
::const_reference 
const_value_reference
 

Public Member Functions

void init (const Graph &, Value def=Value())
 
value_reference operator[] (Key key)
 
const_value_reference operator[] (Key key) const
 
void clear ()
 

Protected Member Functions

 ne_map ()
 
 ne_map (const Graph &g, Value def=Value())
 

Private Attributes

vector< Value, Alloc > data
 

Detailed Description

template<class Key, class Value, class Graph, class Alloc = allocator<Value>>
class ne_map< Key, Value, Graph, Alloc >

Baseclass for node_map and edge_map.

ne_map is the common implementation of node_map and edge_map and cannot be used directly.

Definition at line 31 of file ne_map.h.

View newest version in sPHENIX GitHub at line 31 of file ne_map.h

Member Typedef Documentation

template<class Key, class Value, class Graph, class Alloc = allocator<Value>>
typedef vector<Value, Alloc>::const_reference ne_map< Key, Value, Graph, Alloc >::const_value_reference

Definition at line 84 of file ne_map.h.

View newest version in sPHENIX GitHub at line 84 of file ne_map.h

template<class Key, class Value, class Graph, class Alloc = allocator<Value>>
typedef vector<Value, Alloc>::reference ne_map< Key, Value, Graph, Alloc >::value_reference

Definition at line 75 of file ne_map.h.

View newest version in sPHENIX GitHub at line 75 of file ne_map.h

Constructor & Destructor Documentation

template<class Key , class Value , class Graph , class Alloc >
ne_map< Key, Value, Graph, Alloc >::ne_map ( )
protected

Constructs an empty ne_map not associated to any graph.

Definition at line 137 of file ne_map.h.

View newest version in sPHENIX GitHub at line 137 of file ne_map.h

template<class Key , class Value, class Graph, class Alloc >
ne_map< Key, Value, Graph, Alloc >::ne_map ( const Graph &  g,
Value  def = Value() 
)
explicitprotected

Constructs a ne_map associated to the graph g. The value associated to each key is set to def. You may (but need not) call ne_map::init(const graph &, T) to associate it to a graph.

Parameters
<code>g</code>associated graph
<code>def</code>default value

Definition at line 142 of file ne_map.h.

View newest version in sPHENIX GitHub at line 142 of file ne_map.h

Member Function Documentation

template<class Key , class Value , class Graph , class Alloc >
void ne_map< Key, Value, Graph, Alloc >::clear ( )

Erases a elements of this nodemap

Definition at line 177 of file ne_map.h.

View newest version in sPHENIX GitHub at line 177 of file ne_map.h

References configureMap::data.

Referenced by fm_partition::clean_pass(), ratio_cut_partition::clean_step(), and dijkstra::init().

+ Here is the caller graph for this function:

template<class Key , class Value, class Graph, class Alloc >
void ne_map< Key, Value, Graph, Alloc >::init ( const Graph &  g,
Value  def = Value() 
)

Initializes the ne_map to hold information for the elements of graph g. def is the value associated with all elements.

Parameters
<code>g</code>associated graph
<code>def</code>default value

Definition at line 148 of file ne_map.h.

View newest version in sPHENIX GitHub at line 148 of file ne_map.h

References configureMap::data, testing::Key(), n, and ambiguity_solver_full_chain::t2.

Referenced by planarity::examine_obstruction(), planar_embedding::init(), bid_dijkstra::init(), dijkstra::init(), fm_partition::init_data_structure(), ratio_cut_partition::init_data_structure(), fm_partition::init_filling_buckets(), ratio_cut_partition::init_filling_buckets(), topsort::init_handler(), biconnectivity::init_handler(), pathfinder::pathfinder(), maxflow_ff::prepare_run(), maxflow_sap::prepare_run(), maxflow_pp::prepare_run(), bellman_ford::run(), bfs::run(), dfs::run(), planarity::run_on_biconnected(), fm_partition::set_vars(), and ratio_cut_partition::set_vars().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Key, class Value , class Graph , class Alloc >
ne_map< Key, Value, Graph, Alloc >::value_reference ne_map< Key, Value, Graph, Alloc >::operator[] ( Key  key)

Read/write accessor function to the value associated with key. Use this function to change the value of an element in the ne_map. Assume that ne is a ne_map<int>. Then you can assign the value 5 to key with:

  ne[key] = 5;

If there is no entry in the ne_map associated with key, one is created.

Parameters
keyKey of the Entry to change
Returns
a reference to the value associated to key.

Definition at line 156 of file ne_map.h.

View newest version in sPHENIX GitHub at line 156 of file ne_map.h

References configureMap::data, and testing::Value().

+ Here is the call graph for this function:

template<class Key, class Value , class Graph , class Alloc >
ne_map< Key, Value, Graph, Alloc >::const_value_reference ne_map< Key, Value, Graph, Alloc >::operator[] ( Key  key) const

Read-only accessor function to the value associated with key. Use this function to read the value of an element in the ne_map. Assume that ne is a ne_map<int>. Then you can print the value associated with key with:

  cout << ne[key];
Parameters
keyKey of the Entry to look up
Returns
a const reference to the value associated to key.

Definition at line 170 of file ne_map.h.

View newest version in sPHENIX GitHub at line 170 of file ne_map.h

References assert, and configureMap::data.

Member Data Documentation

template<class Key, class Value, class Graph, class Alloc = allocator<Value>>
vector<Value, Alloc> ne_map< Key, Value, Graph, Alloc >::data
private

Definition at line 131 of file ne_map.h.

View newest version in sPHENIX GitHub at line 131 of file ne_map.h


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