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

An edge in a graph. More...

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

+ Collaboration diagram for edge:

Public Member Functions

 edge ()
 
node source () const
 
node target () const
 
void reverse ()
 
void change_source (node n)
 
void change_target (node n)
 
const nodeopposite (node n) const
 
list< nodesources () const
 
list< nodetargets () const
 
int id () const
 
bool is_hidden () const
 

Private Member Functions

void remove_from (int where) const
 

Private Attributes

edge_datadata
 

Friends

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

Detailed Description

An edge in a graph.

Definition at line 34 of file edge.h.

View newest version in sPHENIX GitHub at line 34 of file edge.h

Constructor & Destructor Documentation

__GTL_BEGIN_NAMESPACE edge::edge ( )

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

  graph g;
  node n1, n2;
  edge e;
  n1 = g.new_node();
  n2 = g.new_node();
  e = g.new_edge(n1, n2);
See Also
graph::new_edge

Definition at line 31 of file edge.cpp.

View newest version in sPHENIX GitHub at line 31 of file edge.cpp

Member Function Documentation

void edge::change_source ( node  n)

Makes n the source of this edge. Takes O(1) time.

Parameters
<code>n</code>new source

Definition at line 54 of file edge.cpp.

View newest version in sPHENIX GitHub at line 54 of file edge.cpp

References edge_data::adj_pos, assert, data, node::data, node_data::edges, and edge_data::nodes.

void edge::change_target ( node  n)

Makes n the target of this edge. Takes O(1) time.

Parameters
<code>n</code>new target

Definition at line 93 of file edge.cpp.

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

References edge_data::adj_pos, assert, data, node::data, node_data::edges, and edge_data::nodes.

int edge::id ( ) const

Definition at line 214 of file edge.cpp.

View newest version in sPHENIX GitHub at line 214 of file edge.cpp

References data, and edge_data::id.

Referenced by Jetscape::PartonShower::new_parton().

+ Here is the caller graph for this function:

bool edge::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 219 of file edge.cpp.

View newest version in sPHENIX GitHub at line 219 of file edge.cpp

References data, and edge_data::hidden.

Referenced by graph::hide_edge(), and graph::restore_edge().

+ Here is the caller graph for this function:

const node & edge::opposite ( node  n) const

Returns the node opposite to n referring to this edge.

Parameters
<code>n</code>a node incident to this edge

Definition at line 241 of file edge.cpp.

View newest version in sPHENIX GitHub at line 241 of file edge.cpp

References assert, data, edge_data::nodes, and physmon_simulation::s.

Referenced by bid_dijkstra::fill_node_edge_lists(), and bellman_ford::predecessor_node().

+ Here is the caller graph for this function:

void edge::remove_from ( int  where) const
private

Definition at line 224 of file edge.cpp.

View newest version in sPHENIX GitHub at line 224 of file edge.cpp

References edge_data::adj_pos, data, and edge_data::nodes.

Referenced by graph::del_edge(), and graph::hide_edge().

+ Here is the caller graph for this function:

void edge::reverse ( )

Changes the direction of this edge.

Definition at line 132 of file edge.cpp.

View newest version in sPHENIX GitHub at line 132 of file edge.cpp

References edge_data::adj_pos, assert, data, edge_data::nodes, and Acts::Test::tmp().

+ Here is the call graph for this function:

node edge::source ( ) const

Returns the source node of the edge.

Returns
source

Definition at line 44 of file edge.cpp.

View newest version in sPHENIX GitHub at line 44 of file edge.cpp

References data, and edge_data::nodes.

Referenced by biconnectivity::after_recursive_call_handler(), planarity::case_A(), planarity::case_D(), planarity::case_E(), maxflow_ff::create_back_edge(), maxflow_sap::create_back_edge(), maxflow_pp::create_back_edge(), graph::del_edge(), Jetscape::PartonShower::GetNumberOfParents(), biconnectivity::init_handler(), graph::insert_reverse_edges(), planar_embedding::insert_selfloop(), graph::is_bidirected(), operator<<(), planar_embedding::pos(), bellman_ford::relax(), min_tree::run(), and planarity::run_on_biconnected().

+ Here is the caller graph for this function:

list< node > edge::sources ( ) const

Definition at line 204 of file edge.cpp.

View newest version in sPHENIX GitHub at line 204 of file edge.cpp

References data, and edge_data::nodes.

node edge::target ( ) const

Returns the target node of the edge.

Returns
target

Definition at line 49 of file edge.cpp.

View newest version in sPHENIX GitHub at line 49 of file edge.cpp

References data, and edge_data::nodes.

Referenced by biconnectivity::after_recursive_call_handler(), planarity::case_A(), planarity::case_D(), planarity::case_E(), maxflow_ff::create_back_edge(), maxflow_sap::create_back_edge(), maxflow_pp::create_back_edge(), graph::del_edge(), Jetscape::PartonShower::GetNumberOfChilds(), biconnectivity::init_handler(), graph::insert_reverse_edges(), graph::is_bidirected(), operator<<(), planar_embedding::pos(), bellman_ford::relax(), and min_tree::run().

+ Here is the caller graph for this function:

list< node > edge::targets ( ) const

Definition at line 209 of file edge.cpp.

View newest version in sPHENIX GitHub at line 209 of file edge.cpp

References data, and edge_data::nodes.

Friends And Related Function Documentation

friend class graph
friend

Definition at line 129 of file edge.h.

View newest version in sPHENIX GitHub at line 129 of file edge.h

friend class node
friend

Definition at line 130 of file edge.h.

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

GTL_EXTERN friend bool operator!= ( edge  e1,
edge  e2 
)
friend

Definition at line 258 of file edge.cpp.

View newest version in sPHENIX GitHub at line 258 of file edge.cpp

GTL_EXTERN friend bool operator< ( edge  e1,
edge  e2 
)
friend

Definition at line 263 of file edge.cpp.

View newest version in sPHENIX GitHub at line 263 of file edge.cpp

GTL_EXTERN friend ostream& operator<< ( ostream &  os,
const edge e 
)
friend

Definition at line 36 of file edge.cpp.

View newest version in sPHENIX GitHub at line 36 of file edge.cpp

GTL_EXTERN friend bool operator== ( edge  e1,
edge  e2 
)
friend

Definition at line 253 of file edge.cpp.

View newest version in sPHENIX GitHub at line 253 of file edge.cpp

Member Data Documentation


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