NGen
Loading...
Searching...
No Matches
network Namespace Reference

Classes

class  Network
 A lightweight, graph based index of hydrologic features. More...
 
struct  preorder_visitor
 Pre-order recording dfs_visitor. More...
 
struct  VertexProperty
 

Typedefs

typedef boost::property< boost::vertex_index_t, std::size_t > IndexT
 Type used to index network::NodeT types.
 
typedef boost::property< boost::vertex_name_t, std::string, IndexTNodeT
 Type used to label node properties in a network::Graph.
 
typedef boost::adjacency_list< boost::setS, boost::vecS, boost::bidirectionalS, NodeTGraph
 Parameterized graph storing network::NodeT vertices.
 
typedef std::vector< Graph::vertex_descriptor > NetworkIndexT
 A vector of network::Graph vertex_descriptors.
 
using IndexPair = std::pair< NetworkIndexT::const_iterator, NetworkIndexT::const_iterator>
 A type for holding a pair of network::NetworkIndexT iterators, pair.first=begin, pair.second=end.
 

Enumerations

enum class  SortOrder {
  Topological ,
  TransposedDepthFirstPreorder
}
 Selector for using different traversal orders for linear return. More...
 

Functions

template<typename VertexListGraph , typename OutputIterator , typename P , typename T , typename R >
void df_preorder_sort (VertexListGraph &g, OutputIterator result, const boost::bgl_named_params< P, T, R > &params)
 Pre-order depth first sort function.
 
template<typename VertexListGraph , typename OutputIterator >
void df_preorder_sort (VertexListGraph &g, OutputIterator result)
 Default named params wrapper (passes no named params) for df_preorder_sort(VertexListGraph &g, OutputIterator result, const boost::bgl_named_params< P, T, R > &params)
 

Variables

static const int DEFAULT_LAYER_ID = 0
 

Typedef Documentation

◆ Graph

typedef boost::adjacency_list<boost::setS, boost::vecS, boost::bidirectionalS, NodeT> network::Graph

Parameterized graph storing network::NodeT vertices.

Nodes are stored as boost::setS, edges as boost::vecS, with bidirectional edges

◆ IndexPair

using network::IndexPair = std::pair< NetworkIndexT::const_iterator, NetworkIndexT::const_iterator>

A type for holding a pair of network::NetworkIndexT iterators, pair.first=begin, pair.second=end.

these indicies should be const to the caller

◆ IndexT

typedef boost::property<boost::vertex_index_t, std::size_t> network::IndexT

Type used to index network::NodeT types.

◆ NetworkIndexT

typedef std::vector< Graph::vertex_descriptor > network::NetworkIndexT

A vector of network::Graph vertex_descriptors.

◆ NodeT

typedef boost::property<boost::vertex_name_t, std::string, IndexT> network::NodeT

Type used to label node properties in a network::Graph.

Enumeration Type Documentation

◆ SortOrder

enum class network::SortOrder
strong

Selector for using different traversal orders for linear return.

Enumerator
Topological 

Topological order.

Usually the default. Good for dependency ordering. This is provided directly by boost::topological_sort.

TransposedDepthFirstPreorder 

A depth-first, pre-order recorded traversal on a transposed graph.

Good for extracting sets of highly contiguous nodes. Transposed because the hydrograph "tree" is actually most like an inverted tree structure, with headwaters as the "root" nodes and coastal drainage as the "leaves". This transposed traversal lets us traverse upstream instead of downstream.

Function Documentation

◆ df_preorder_sort() [1/2]

template<typename VertexListGraph , typename OutputIterator >
void network::df_preorder_sort ( VertexListGraph & g,
OutputIterator result )

Default named params wrapper (passes no named params) for df_preorder_sort(VertexListGraph &g, OutputIterator result, const boost::bgl_named_params< P, T, R > &params)

Template Parameters
VertexListGraphA boost::VertexListGraph
OutputIteratorAny std::output_iterator . Note that if for instance a std::back_insert_iterator is used, the recorded order will be reversed.

References df_preorder_sort().

◆ df_preorder_sort() [2/2]

template<typename VertexListGraph , typename OutputIterator , typename P , typename T , typename R >
void network::df_preorder_sort ( VertexListGraph & g,
OutputIterator result,
const boost::bgl_named_params< P, T, R > & params )

Pre-order depth first sort function.

Parameters
gA boost::VertexListGraph
resultAny std::output_iterator . Note that if for instance a std::back_insert_iterator is used, the recorded order will be reversed.
paramsNamed params passed to boost::depth_first_search(G, params)
Template Parameters
VertexListGraphA boost::VertexListGraph
OutputIteratorAny std::output_iterator . Note that if for instance a std::back_insert_iterator is used, the recorded order will be reversed.
PParam type, see boost::bgl_named_params
TType type, see boost::bgl_named_params
RRest type, see boost::bgl_named_params
See also
boost::topological_sort(g, result, params)

Referenced by df_preorder_sort(), and network::Network::get_sorted_index().

Variable Documentation

◆ DEFAULT_LAYER_ID

const int network::DEFAULT_LAYER_ID = 0
static