dyng
Data Structures | Typedefs | Enumerations | Functions
Dyng Namespace Reference

The namespace of DynG. More...

Data Structures

class  CorridorGravWriter
 Writes the Grav with the corridor and active graph highlighted. More...
 
class  DyngError
 A logical error in the use of the dynamic network occurred. More...
 
class  FlowGravWriter
 Grav writer for fractional flows. More...
 
class  GravWriter
 Base class for writing to Grav files. More...
 
class  Net
 A dynamic time expanded network. More...
 
class  PathGravWriter
 Writes a path. More...
 

Typedefs

typedef int index_type
 Type of indices.
 

Enumerations

enum  Attribute : int {
  COST = 0, BASECOST = 1, AUGCOST = 2, FLOW = 3,
  NODE = 4, TIME = 5
}
 Attribute for building node/arc descriptions. More...
 

Functions

void write_basegraph_tikz (const Net &net, bool withdoc, std::ostream &out)
 Write base graph in Tikz format. More...
 
void write_basegraph_grav (const Net &net, const std::string &name, std::ostream &out)
 Write base graph in grav format. More...
 
void write_rgraph (const Net &net, std::ostream &out)
 Write time expansion in rgraph format. More...
 
void write_corridor_grav (std::ostream &out, const Net &net, const std::string &name, bool addgraph=false)
 Write time expansion in grav format. More...
 
void write_grav (const Net &net, const std::string &name, const std::vector< index_type > &path, std::ostream &out)
 Write time expansion in grav format with some highlighted path. More...
 
void write_grav (const Net &net, const std::string &name, const std::vector< double > &basecosts, const std::vector< double > &augcosts, const std::vector< index_type > &path, std::ostream &out)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path. More...
 
void write_grav (const Net &net, const std::string &name, int(*getattr)(Attribute attr, index_type id, void *value), const std::vector< index_type > &path, std::ostream &out)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path. More...
 
void write_grav (const Net &net, const std::string &name, const std::vector< const char *> &nodedesc, const std::vector< const char *> &arcdesc, const std::vector< index_type > &path, std::ostream &out)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path. More...
 
void write_grav (const Net &net, const std::string &name, const std::vector< double > &basecosts, const std::vector< double > &augcosts, const std::vector< const char *> &nodedesc, const std::vector< const char *> &arcdesc, const std::vector< index_type > &path, std::ostream &out)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path. More...
 
void write_flow_grav (std::ostream &out, const Net &net, const std::string &name, const std::vector< double > &basecosts, const std::vector< double > &augcosts, const std::vector< const char *> &nodedesc, const std::vector< const char *> &arcdesc, const std::vector< double > &flow, bool append=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some colorized flow. More...
 

Detailed Description

The namespace of DynG.

Enumeration Type Documentation

◆ Attribute

enum Dyng::Attribute : int

Attribute for building node/arc descriptions.

Enumerator
COST 

cost of an arc, double

BASECOST 

base cost of an arc, double

AUGCOST 

augmented cost of an arc, double

FLOW 

flow of an arc, double

NODE 

node description, c string of size 80

TIME 

time description, c string of size 80

Function Documentation

◆ write_basegraph_grav()

void Dyng::write_basegraph_grav ( const Net net,
const std::string &  name,
std::ostream &  out 
)

Write base graph in grav format.

Parameters
netThe dynamic network.
nameThe name of the network.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_basegraph_tikz()

void Dyng::write_basegraph_tikz ( const Net net,
bool  withdoc,
std::ostream &  out 
)

Write base graph in Tikz format.

Parameters
netThe dynamic network.
withdocIf true generate document framework code.
outThe output stream to write to.

◆ write_corridor_grav()

void Dyng::write_corridor_grav ( std::ostream &  out,
const Net net,
const std::string &  name,
bool  addgraph = false 
)

Write time expansion in grav format.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written.

Parameters
outThe output stream to write to.
netThe dynamic network.
nameThe name of the network.
addgraphIf true generate 'addgraph' instead of 'newgraph' commands.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_flow_grav()

void Dyng::write_flow_grav ( std::ostream &  out,
const Net net,
const std::string &  name,
const std::vector< double > &  basecosts,
const std::vector< double > &  augcosts,
const std::vector< const char *> &  nodedesc,
const std::vector< const char *> &  arcdesc,
const std::vector< double > &  flow,
bool  append = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some colorized flow.

Parameters
outThe output stream to write to.
netThe dynamic network.
nameThe name of the network.
basecostsThe base costs.
augcostsThe augmented costs.
nodedescThe node descriptions.
arcdescThe arc descriptions.
appendIf true generate addgraph instead of newgraph commands.
flowThe arc flows.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_grav() [1/5]

void Dyng::write_grav ( const Net net,
const std::string &  name,
const std::vector< index_type > &  path,
std::ostream &  out 
)

Write time expansion in grav format with some highlighted path.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written.

Parameters
netThe dynamic network.
nameThe name of the network.
pathThe path (arcs) to be highlighted.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_grav() [2/5]

void Dyng::write_grav ( const Net net,
const std::string &  name,
const std::vector< double > &  basecosts,
const std::vector< double > &  augcosts,
const std::vector< index_type > &  path,
std::ostream &  out 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written. This functions accepts additional cost vectors to be used in the arc description.

Parameters
netThe dynamic network.
nameThe name of the network.
pathThe path (arcs) to be highlighted.
basecostsThe base costs.
augcostsThe augmented costs.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_grav() [3/5]

void Dyng::write_grav ( const Net net,
const std::string &  name,
int(*)(Attribute attr, index_type id, void *value)  getattr,
const std::vector< index_type > &  path,
std::ostream &  out 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written.

Parameters
netThe dynamic network.
nameThe name of the network.
getattrAttribute getter function.
pathThe path (arcs) to be highlighted.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_grav() [4/5]

void Dyng::write_grav ( const Net net,
const std::string &  name,
const std::vector< const char *> &  nodedesc,
const std::vector< const char *> &  arcdesc,
const std::vector< index_type > &  path,
std::ostream &  out 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written.

Parameters
netThe dynamic network.
nameThe name of the network.
nodedescThe node descriptions.
arcdescThe arc descriptions.
pathThe path (arcs) to be highlighted.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_grav() [5/5]

void Dyng::write_grav ( const Net net,
const std::string &  name,
const std::vector< double > &  basecosts,
const std::vector< double > &  augcosts,
const std::vector< const char *> &  nodedesc,
const std::vector< const char *> &  arcdesc,
const std::vector< index_type > &  path,
std::ostream &  out 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Write time expansion in grav format with some highlighted path.

The graph will generate a newgraph command, i.e. all nodes and arcs will be written.

Parameters
netThe dynamic network.
nameThe name of the network.
basecostsThe base costs.
augcostsThe augmented costs.
nodedescThe node descriptions.
arcdescThe arc descriptions.
pathThe path (arcs) to be highlighted.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized

◆ write_rgraph()

void Dyng::write_rgraph ( const Net net,
std::ostream &  out 
)

Write time expansion in rgraph format.

Parameters
netThe dynamic network.
outThe output stream to write to.
Exceptions
DyngErrorif time expansion is not initialized