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

ST-number algorithm. More...

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

+ Inheritance diagram for st_number:
+ Collaboration diagram for st_number:

Public Types

typedef list< node >::iterator iterator
 
typedef list< node >
::reverse_iterator 
reverse_iterator
 
- Public Types inherited from algorithm
enum  { GTL_OK = 1, GTL_ERROR = 0 }
 Return values for algorithm::check and algorithm::run. More...
 

Public Member Functions

 st_number ()
 Default constructor. Creates st-number object. Please note that there are no reasonable default settings for the parameters, i.e. the edge st connecting the lowest with highest numbers node and which of its endpoints should get number 1 (= node s) has to be specified always.
 
virtual ~st_number ()
 Destructor.
 
void st_edge (edge e)
 Sets edge st for the next run.
 
edge st_edge () const
 Get edge st.
 
void s_node (node n)
 Sets node s for next run.
 
node s_node () const
 Get node s.
 
int & operator[] (const node &n)
 Returns st-number of node n as determined in the last run.
 
iterator begin ()
 Iteration through the nodes of graph st-numbered in last run in st-number order, i.e. from 1 to highest st-number.
 
iterator end ()
 Iteration through nodes of graph in st-number order.
 
reverse_iterator rbegin ()
 Iteration through the nodes of graph st-numbered in last run in reverse st-number order, i.e. from highest st-number down to 1.
 
reverse_iterator rend ()
 End of iteration through nodes of graph in reverse st-number order.
 
int check (graph &G)
 Checks whether st-number algorithm can be applied to G.
 
int run (graph &G)
 Runs st-number algorithm on graph G.
 
void reset ()
 Resets algorithm in order to be applied to the next graph.
 
- Public Member Functions inherited from algorithm
 algorithm ()
 Creates an algorithm object.
 
virtual ~algorithm ()
 Destroys the algorithm object.
 

Protected Attributes

edge st
 
node s
 
pathfinderpf
 
list< nodest_ord
 
node_map< int > st_num
 

Detailed Description

ST-number algorithm.

Encapsulates the st-number algorithm together with all the data produced by it.

Assigns an integer st[n] to each node n of a undirected, biconnected graph, such that each node is connected with at least one node having a smaller and with at least one having a larger number than itself. The only exception to this rule are the endpoints of edge st connecting nodes s (st-number 1) and t (highest st-number).

The following options are supported:

  • st_edge sets/retrieves the edge that connects the node with the lowest number to that with the highest.
  • s_node sets/retrieves that endpoints of the st_edge, which gets number 1.

Definition at line 233 of file st_number.h.

View newest version in sPHENIX GitHub at line 233 of file st_number.h

Member Typedef Documentation

Definition at line 313 of file st_number.h.

View newest version in sPHENIX GitHub at line 313 of file st_number.h

Definition at line 318 of file st_number.h.

View newest version in sPHENIX GitHub at line 318 of file st_number.h

Constructor & Destructor Documentation

st_number::st_number ( )
inline

Default constructor. Creates st-number object. Please note that there are no reasonable default settings for the parameters, i.e. the edge st connecting the lowest with highest numbers node and which of its endpoints should get number 1 (= node s) has to be specified always.

Definition at line 243 of file st_number.h.

View newest version in sPHENIX GitHub at line 243 of file st_number.h

virtual st_number::~st_number ( )
inlinevirtual

Destructor.

Definition at line 250 of file st_number.h.

View newest version in sPHENIX GitHub at line 250 of file st_number.h

Member Function Documentation

iterator st_number::begin ( void  )
inline

Iteration through the nodes of graph st-numbered in last run in st-number order, i.e. from 1 to highest st-number.

Returns
start of iteration through nodes in st-number order

Definition at line 326 of file st_number.h.

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

Referenced by planarity::run_on_biconnected(), and planar_embedding::write_st().

+ Here is the caller graph for this function:

int st_number::check ( graph G)
virtual

Checks whether st-number algorithm can be applied to G.

Besides from the trivial preconditions that edge st and node s lie in G and s is really an endpoint of st (which isn't checked), G must be undirected and biconnected.

Note
As for all algorithms in GTL, check must be called, because it might do some initialization.
Parameters
Ggraph
Return values
algorithm::GTL_OKiff st-number algorithm may be applied
See Also
algorithm::check

Implements algorithm.

Definition at line 215 of file st_number.cpp.

View newest version in sPHENIX GitHub at line 215 of file st_number.cpp

References graph::is_directed(), pathfinder::pathfinder(), and physmon_simulation::s.

Referenced by planarity::run_on_biconnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

iterator st_number::end ( void  )
inline

Iteration through nodes of graph in st-number order.

Returns
end of iteration through nodes of graph in st-number order

Definition at line 336 of file st_number.h.

View newest version in sPHENIX GitHub at line 336 of file st_number.h

Referenced by planar_embedding::write_st().

+ Here is the caller graph for this function:

int& st_number::operator[] ( const node n)
inline

Returns st-number of node n as determined in the last run.

Parameters
nnode
Returns
st-number of n

Definition at line 305 of file st_number.h.

View newest version in sPHENIX GitHub at line 305 of file st_number.h

References n.

reverse_iterator st_number::rbegin ( )
inline

Iteration through the nodes of graph st-numbered in last run in reverse st-number order, i.e. from highest st-number down to 1.

Returns
start of iteration through nodes in reverse st-number order

Definition at line 348 of file st_number.h.

View newest version in sPHENIX GitHub at line 348 of file st_number.h

Referenced by planarity::correct_embedding().

+ Here is the caller graph for this function:

reverse_iterator st_number::rend ( )
inline

End of iteration through nodes of graph in reverse st-number order.

Returns
end of iteration through nodes in reverse st-number order

Definition at line 359 of file st_number.h.

View newest version in sPHENIX GitHub at line 359 of file st_number.h

Referenced by planarity::correct_embedding().

+ Here is the caller graph for this function:

void st_number::reset ( )
inlinevirtual

Resets algorithm in order to be applied to the next graph.

This will delete most of the information obtained in the last run.

See Also
algorithm::reset

Implements algorithm.

Definition at line 405 of file st_number.h.

View newest version in sPHENIX GitHub at line 405 of file st_number.h

int st_number::run ( graph G)
virtual

Runs st-number algorithm on graph G.

It is assumed that check was called previously and returned algorithm::GTL_OK.

Parameters
Ggraph
Returns
algorithm::GTL_OK iff G could be correctly st-numbered
See Also
algorithm::run

Implements algorithm.

Definition at line 225 of file st_number.cpp.

View newest version in sPHENIX GitHub at line 225 of file st_number.cpp

References pathfinder::end(), it, pathfinder::pos, physmon_simulation::s, t, and Acts::Test::tmp().

Referenced by planarity::run_on_biconnected().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void st_number::s_node ( node  n)
inline

Sets node s for next run.

This must be one of the endpoints of edge st. This node will get st-number 1 and thus the other endpoint will get the highest st-number.

Parameters
nnode s

Definition at line 283 of file st_number.h.

View newest version in sPHENIX GitHub at line 283 of file st_number.h

References n, and physmon_simulation::s.

Referenced by planarity::case_A(), planarity::case_B(), planarity::case_C(), planarity::case_D(), planarity::case_E(), planarity::examine_obstruction(), and planarity::run_on_biconnected().

+ Here is the caller graph for this function:

node st_number::s_node ( ) const
inline

Get node s.

Return values
nodes

Definition at line 293 of file st_number.h.

View newest version in sPHENIX GitHub at line 293 of file st_number.h

References physmon_simulation::s.

void st_number::st_edge ( edge  e)
inline

Sets edge st for the next run.

Parameters
eedge st

Definition at line 259 of file st_number.h.

View newest version in sPHENIX GitHub at line 259 of file st_number.h

References Acts::UnitConstants::e.

Referenced by planarity::case_A(), planarity::case_B(), planarity::case_C(), planarity::case_D(), planarity::case_E(), and planarity::run_on_biconnected().

+ Here is the caller graph for this function:

edge st_number::st_edge ( ) const
inline

Get edge st.

Return values
edgest

Definition at line 269 of file st_number.h.

View newest version in sPHENIX GitHub at line 269 of file st_number.h

Member Data Documentation

pathfinder* st_number::pf
protected

Definition at line 423 of file st_number.h.

View newest version in sPHENIX GitHub at line 423 of file st_number.h

node st_number::s
protected

Definition at line 418 of file st_number.h.

View newest version in sPHENIX GitHub at line 418 of file st_number.h

edge st_number::st
protected

Definition at line 413 of file st_number.h.

View newest version in sPHENIX GitHub at line 413 of file st_number.h

node_map<int> st_number::st_num
protected

Definition at line 433 of file st_number.h.

View newest version in sPHENIX GitHub at line 433 of file st_number.h

list<node> st_number::st_ord
protected

Definition at line 428 of file st_number.h.

View newest version in sPHENIX GitHub at line 428 of file st_number.h


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