Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
node Class Reference

A node in a graph. More...

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

+ Inheritance diagram for node:
+ Collaboration diagram for node:

Public Types

typedef list< edge >
::const_iterator 
in_edges_iterator
 
typedef list< edge >
::const_iterator 
out_edges_iterator
 

Public Member Functions

 node ()
 
int degree () const
 
int outdeg () const
 
int indeg () const
 
int id () const
 
const nodeopposite (edge e) const
 
list< nodeopposites (edge) const
 
bool is_hidden () const
 
int excentricity () const
 
adj_nodes_iterator adj_nodes_begin () const
 
adj_nodes_iterator adj_nodes_end () const
 
adj_edges_iterator adj_edges_begin () const
 
adj_edges_iterator adj_edges_end () const
 
in_edges_iterator in_edges_begin () const
 
in_edges_iterator in_edges_end () const
 
out_edges_iterator out_edges_begin () const
 
out_edges_iterator out_edges_end () const
 
inout_edges_iterator inout_edges_begin () const
 
inout_edges_iterator inout_edges_end () const
 
 adj_edges_iterator ()
 
 adj_edges_iterator (node, bool)
 
bool operator== (const adj_edges_iterator &) const
 
bool operator!= (const adj_edges_iterator &) const
 
adj_edges_iteratoroperator++ ()
 
adj_edges_iterator operator++ (int)
 
adj_edges_iteratoroperator-- ()
 
adj_edges_iterator operator-- (int)
 
const edgeoperator* () const
 
const edgeoperator-> () const
 
 inout_edges_iterator ()
 
 inout_edges_iterator (node n, bool start)
 
bool operator== (const inout_edges_iterator &) const
 
bool operator!= (const inout_edges_iterator &) const
 
inout_edges_iteratoroperator++ ()
 
inout_edges_iterator operator++ (int)
 
inout_edges_iteratoroperator-- ()
 
inout_edges_iterator operator-- (int)
 
const edgeoperator* () const
 
const edgeoperator-> () const
 
 adj_nodes_iterator ()
 
 adj_nodes_iterator (const node &, bool)
 
bool operator== (const adj_nodes_iterator &) const
 
bool operator!= (const adj_nodes_iterator &) const
 
adj_nodes_iteratoroperator++ ()
 
adj_nodes_iterator operator++ (int)
 
adj_nodes_iteratoroperator-- ()
 
adj_nodes_iterator operator-- (int)
 
const nodeoperator* () const
 
const nodeoperator-> () const
 

Private Member Functions

bool is_directed () const
 
bool is_undirected () const
 

Private Attributes

node_datadata
 
in_edges_iterator akt_edge [2]
 
in_edges_iterator last_edge [2]
 
in_edges_iterator begin_edge [2]
 
int inout
 
bool directed
 
adj_edges_iterator akt_edge
 
node int_node
 

Friends

class graph
 
class edge
 
class adj_edges_iterator
 
GTL_EXTERN friend bool operator== (node, node)
 
GTL_EXTERN friend bool operator!= (node, node)
 
GTL_EXTERN friend bool operator< (node, node)
 
GTL_EXTERN friend ostream & operator<< (ostream &os, const node &n)
 

Detailed Description

A node in a graph.

Iterator for adjacent nodes of a node.

Iterator for all incident edges of a node.

Iterator for adjacent edges of a node.

Definition at line 53 of file node.h.

View newest version in sPHENIX GitHub at line 53 of file node.h

Member Typedef Documentation

typedef list<edge>::const_iterator node::in_edges_iterator

Definition at line 126 of file node.h.

View newest version in sPHENIX GitHub at line 126 of file node.h

typedef list<edge>::const_iterator node::out_edges_iterator

Definition at line 130 of file node.h.

View newest version in sPHENIX GitHub at line 130 of file node.h

Constructor & Destructor Documentation

__GTL_BEGIN_NAMESPACE node::node ( )

Default constructor. Creates an invalid node. The only way to obtain a valid node is through graph::new_node Example:

  graph g;
  node n;
  n = g.new_node();
See Also
graph::new_node

Definition at line 30 of file node.cpp.

View newest version in sPHENIX GitHub at line 30 of file node.cpp

Member Function Documentation

node::adj_edges_iterator node::adj_edges_begin ( ) const

Iterate through all adjacent edges.

Returns
start for iteration through all adjacent edges

Definition at line 53 of file node.cpp.

View newest version in sPHENIX GitHub at line 53 of file node.cpp

References adj_edges_iterator().

Referenced by bfs::bfs_sub(), planarity::case_B(), planarity::case_D(), planarity::case_E(), ratio_cut_partition::compute_target_node(), planarity::dfs_bushform(), pathfinder::dfs_sub(), dfs::dfs_sub(), fm_partition::inital_gain_of_node_on_sideA(), ratio_cut_partition::inital_gain_of_node_on_sideA(), fm_partition::inital_gain_of_node_on_sideB(), ratio_cut_partition::inital_gain_of_node_on_sideB(), min_tree::run(), dijkstra::run(), planarity::up_until_marked(), fm_partition::update_data_structure_A2B(), ratio_cut_partition::update_data_structure_A2B(), fm_partition::update_data_structure_B2A(), and ratio_cut_partition::update_data_structure_B2A().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

node::adj_edges_iterator node::adj_edges_end ( ) const

Iterate through all adjacent edges.

Returns
end for iteration through all adjacent edges

Definition at line 58 of file node.cpp.

View newest version in sPHENIX GitHub at line 58 of file node.cpp

References adj_edges_iterator().

Referenced by bfs::bfs_sub(), planarity::case_B(), planarity::case_D(), planarity::case_E(), ratio_cut_partition::compute_target_node(), planarity::dfs_bushform(), pathfinder::dfs_sub(), dfs::dfs_sub(), fm_partition::inital_gain_of_node_on_sideA(), ratio_cut_partition::inital_gain_of_node_on_sideA(), fm_partition::inital_gain_of_node_on_sideB(), ratio_cut_partition::inital_gain_of_node_on_sideB(), min_tree::run(), dijkstra::run(), planarity::up_until_marked(), fm_partition::update_data_structure_A2B(), ratio_cut_partition::update_data_structure_A2B(), fm_partition::update_data_structure_B2A(), and ratio_cut_partition::update_data_structure_B2A().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

node::adj_edges_iterator ( node  ,
bool   
)
node::adj_nodes_iterator node::adj_nodes_begin ( ) const

Iterate through all adjacent nodes.

Returns
start for iteration through all adjacent nodes

Definition at line 43 of file node.cpp.

View newest version in sPHENIX GitHub at line 43 of file node.cpp

References adj_nodes_iterator().

+ Here is the call graph for this function:

node::adj_nodes_iterator node::adj_nodes_end ( ) const

Iterate through all adjacent nodes.

Returns
end for iteration through all adjacent nodes

Definition at line 48 of file node.cpp.

View newest version in sPHENIX GitHub at line 48 of file node.cpp

References adj_nodes_iterator().

+ Here is the call graph for this function:

node::adj_nodes_iterator ( )

Referenced by adj_nodes_begin(), and adj_nodes_end().

+ Here is the caller graph for this function:

node::adj_nodes_iterator ( const node ,
bool   
)
int node::degree ( ) const

Returns the degree of the node, i. e. node::outdeg + node::indeg .

Definition at line 93 of file node.cpp.

View newest version in sPHENIX GitHub at line 93 of file node.cpp

References indeg(), and outdeg().

Referenced by biconnectivity::new_start_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int node::excentricity ( ) const

Returns the excentricity of the node, i.e. the maximum graph-theoretic distance to another node

Returns
excentricity of node.

Definition at line 146 of file node.cpp.

View newest version in sPHENIX GitHub at line 146 of file node.cpp

References KFPMath::b, bfs::calc_level(), data, bfs::end(), bfs::level(), node_data::owner, bfs::run(), and bfs::start_node().

Referenced by graph::center().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int node::id ( ) const

Definition at line 108 of file node.cpp.

View newest version in sPHENIX GitHub at line 108 of file node.cpp

References data, and node_data::id.

Referenced by operator<<(), and Jetscape::PartonShower::save_node_info_handler().

+ Here is the caller graph for this function:

node::in_edges_iterator node::in_edges_begin ( ) const

Iterate through all incoming edges.

Returns
start for iteration through all incoming edges

Definition at line 73 of file node.cpp.

View newest version in sPHENIX GitHub at line 73 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_sap::comp_dist_labels(), maxflow_pp::comp_min_throughput(), graph::del_node(), maxflow_pp::get_sp_backwards(), maxflow_pp::hide_unreachable_nodes(), Jetscape::Parton::parents(), planarity::run_on_biconnected(), and maxflow_pp::store_temp_unvisible_edges().

+ Here is the caller graph for this function:

node::in_edges_iterator node::in_edges_end ( ) const

Iterate through all incoming edges.

Returns
end for iteration through all incoming edges

Definition at line 78 of file node.cpp.

View newest version in sPHENIX GitHub at line 78 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_sap::comp_dist_labels(), maxflow_pp::comp_min_throughput(), graph::del_node(), maxflow_pp::get_sp_backwards(), maxflow_pp::hide_unreachable_nodes(), Jetscape::Parton::parents(), planarity::run_on_biconnected(), and maxflow_pp::store_temp_unvisible_edges().

+ Here is the caller graph for this function:

int node::indeg ( ) const

Returns the in degree of the node, i. e. the number of incoming edges.

Definition at line 103 of file node.cpp.

View newest version in sPHENIX GitHub at line 103 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_ff::create_artif_source_target(), maxflow_sap::create_artif_source_target(), maxflow_pp::create_artif_source_target(), degree(), Jetscape::PartonShower::GetNumberOfParents(), and main().

+ Here is the caller graph for this function:

node::inout_edges_iterator node::inout_edges_begin ( ) const

Iterate through all incoming and outgoing edges.

Returns
start for iteration through all incoming and outgoing edges

Definition at line 63 of file node.cpp.

View newest version in sPHENIX GitHub at line 63 of file node.cpp

References inout_edges_iterator().

+ Here is the call graph for this function:

node::inout_edges_iterator node::inout_edges_end ( ) const

Iterate through all incoming and outgoing edges.

Returns
end for iteration through all incoming and outgoing edges

Definition at line 68 of file node.cpp.

View newest version in sPHENIX GitHub at line 68 of file node.cpp

References inout_edges_iterator().

+ Here is the call graph for this function:

node::inout_edges_iterator ( )

Referenced by inout_edges_begin(), and inout_edges_end().

+ Here is the caller graph for this function:

node::inout_edges_iterator ( node  n,
bool  start 
)
bool node::is_directed ( ) const
private

Definition at line 113 of file node.cpp.

View newest version in sPHENIX GitHub at line 113 of file node.cpp

References data, graph::is_directed(), and node_data::owner.

+ Here is the call graph for this function:

bool node::is_hidden ( ) const

Returns true iff node is hidden.

Returns
true iff node is hidden.
See Also
graph::hide_edge
graph::restore_edge

Definition at line 141 of file node.cpp.

View newest version in sPHENIX GitHub at line 141 of file node.cpp

References data, and node_data::hidden.

Referenced by graph::hide_node(), and graph::restore_node().

+ Here is the caller graph for this function:

bool node::is_undirected ( ) const
private

Definition at line 118 of file node.cpp.

View newest version in sPHENIX GitHub at line 118 of file node.cpp

References data, graph::is_undirected(), and node_data::owner.

+ Here is the call graph for this function:

bool node::operator!= ( const adj_edges_iterator ) const
bool node::operator!= ( const inout_edges_iterator ) const
bool node::operator!= ( const adj_nodes_iterator ) const
const edge& node::operator* ( ) const
const edge& node::operator* ( ) const
const node& node::operator* ( ) const
adj_edges_iterator& node::operator++ ( )
adj_edges_iterator node::operator++ ( int  )
inout_edges_iterator& node::operator++ ( )
inout_edges_iterator node::operator++ ( int  )
adj_nodes_iterator& node::operator++ ( )
adj_nodes_iterator node::operator++ ( int  )
adj_edges_iterator& node::operator-- ( )
adj_edges_iterator node::operator-- ( int  )
inout_edges_iterator& node::operator-- ( )
inout_edges_iterator node::operator-- ( int  )
adj_nodes_iterator& node::operator-- ( )
adj_nodes_iterator node::operator-- ( int  )
const edge* node::operator-> ( ) const
const edge* node::operator-> ( ) const
const node* node::operator-> ( ) const
bool node::operator== ( const adj_edges_iterator ) const
bool node::operator== ( const inout_edges_iterator ) const
bool node::operator== ( const adj_nodes_iterator ) const
list< node > node::opposites ( edge  ) const

Definition at line 135 of file node.cpp.

View newest version in sPHENIX GitHub at line 135 of file node.cpp

node::out_edges_iterator node::out_edges_begin ( ) const

Iterate through all outgoing edges.

Returns
start for iteration through all outgoing edges

Definition at line 83 of file node.cpp.

View newest version in sPHENIX GitHub at line 83 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_sap::advance(), maxflow_ff::comp_max_flow(), maxflow_sap::comp_max_flow(), maxflow_pp::comp_max_flow(), maxflow_pp::comp_min_throughput(), maxflow_ff::comp_sp(), graph::del_node(), maxflow_pp::get_sp_ahead(), maxflow_sap::has_an_admissible_arc(), maxflow_pp::hide_unreachable_nodes(), graph::insert_reverse_edges(), graph::is_bidirected(), maxflow_pp::leveling(), maxflow_sap::min_neighbour_label(), planarity::run_on_biconnected(), and maxflow_pp::store_temp_unvisible_edges().

+ Here is the caller graph for this function:

node::out_edges_iterator node::out_edges_end ( ) const

Iterate through all outgoing edges.

Returns
end for iteration through all outgoing edges

Definition at line 88 of file node.cpp.

View newest version in sPHENIX GitHub at line 88 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_sap::advance(), maxflow_ff::comp_max_flow(), maxflow_sap::comp_max_flow(), maxflow_pp::comp_max_flow(), maxflow_pp::comp_min_throughput(), maxflow_ff::comp_sp(), graph::del_node(), maxflow_pp::get_sp_ahead(), maxflow_sap::has_an_admissible_arc(), maxflow_pp::hide_unreachable_nodes(), graph::insert_reverse_edges(), graph::is_bidirected(), maxflow_pp::leveling(), maxflow_sap::min_neighbour_label(), planarity::run_on_biconnected(), and maxflow_pp::store_temp_unvisible_edges().

+ Here is the caller graph for this function:

int node::outdeg ( ) const

Returns the out degree of the node, i. e. the number of outgoing edges.

Definition at line 98 of file node.cpp.

View newest version in sPHENIX GitHub at line 98 of file node.cpp

References data, and node_data::edges.

Referenced by maxflow_ff::create_artif_source_target(), maxflow_sap::create_artif_source_target(), maxflow_pp::create_artif_source_target(), degree(), and Jetscape::PartonShower::GetNumberOfChilds().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class adj_edges_iterator
friend

Definition at line 229 of file node.h.

View newest version in sPHENIX GitHub at line 229 of file node.h

friend class edge
friend

Definition at line 228 of file node.h.

View newest version in sPHENIX GitHub at line 228 of file node.h

friend class graph
friend

Definition at line 227 of file node.h.

View newest version in sPHENIX GitHub at line 227 of file node.h

GTL_EXTERN friend bool operator!= ( node  v1,
node  v2 
)
friend

Definition at line 163 of file node.cpp.

View newest version in sPHENIX GitHub at line 163 of file node.cpp

GTL_EXTERN friend bool operator< ( node  v1,
node  v2 
)
friend

Definition at line 168 of file node.cpp.

View newest version in sPHENIX GitHub at line 168 of file node.cpp

GTL_EXTERN friend ostream& operator<< ( ostream &  os,
const node n 
)
friend

Definition at line 35 of file node.cpp.

View newest version in sPHENIX GitHub at line 35 of file node.cpp

GTL_EXTERN friend bool operator== ( node  v1,
node  v2 
)
friend

Definition at line 158 of file node.cpp.

View newest version in sPHENIX GitHub at line 158 of file node.cpp

Member Data Documentation

in_edges_iterator node::akt_edge
private

Definition at line 264 of file node.h.

View newest version in sPHENIX GitHub at line 264 of file node.h

adj_edges_iterator node::akt_edge
private

Definition at line 325 of file node.h.

View newest version in sPHENIX GitHub at line 325 of file node.h

in_edges_iterator node::begin_edge
private

Definition at line 264 of file node.h.

View newest version in sPHENIX GitHub at line 264 of file node.h

bool node::directed
private

Definition at line 266 of file node.h.

View newest version in sPHENIX GitHub at line 266 of file node.h

int node::inout
private

Definition at line 265 of file node.h.

View newest version in sPHENIX GitHub at line 265 of file node.h

node node::int_node
private

Definition at line 326 of file node.h.

View newest version in sPHENIX GitHub at line 326 of file node.h

in_edges_iterator node::last_edge
private

Definition at line 264 of file node.h.

View newest version in sPHENIX GitHub at line 264 of file node.h


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