GraphLibrary  0.0.1
A simple library that implements various graph algorithms.
 All Classes Namespaces Files Functions Variables Typedefs Macros
StreamOverload.hpp File Reference

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const gl::Color &rhs)
 Prints a gl::Color element. Format: [Hex code;(R,G,B),Opacity]. More...
 
template<class SCALAR >
std::ostream & operator<< (std::ostream &os, const gl::Edge< SCALAR > &rhs)
 Prints a gl::Edge element. Format: [Source-(Weight)->Destination;Weight/Capacity; Color]. More...
 
Graph output to stream

Prints various properties of the graph:

  • Number of nodes
  • Number of edges
  • Direction, Storage format
  • All edges
Parameters
osStream that will be used for output
[in]rhsGraph that will be printed
template<class SCALAR , class STORAGE >
std::ostream & operator<< (std::ostream &os, const gl::Graph< SCALAR, STORAGE, gl::Directed > &rhs)
 Prints all info of a directed graph. More...
 
template<class SCALAR , class STORAGE >
std::ostream & operator<< (std::ostream &os, const gl::Graph< SCALAR, STORAGE, gl::Undirected > &rhs)
 Prints all info of an undirected graph. More...
 
Container output to stream

Prints all contents of the given GraphLib container.

Parameters
osStream that will be used for output
[in]rhsContainer that will be printed
template<class val_t >
std::ostream & operator<< (std::ostream &os, const gl::Distance< val_t > &dist)
 Prints the value of a gl::Distance. More...
 
template<class idx_t >
std::ostream & operator<< (std::ostream &os, const std::list< idx_t > &rhs)
 Prints all elements of an std::list. More...
 
template<class idx_t >
std::ostream & operator<< (std::ostream &os, const std::vector< idx_t > &rhs)
 Prints all elements of an std::vector. More...
 
template<class idx_t >
std::ostream & operator<< (std::ostream &os, const std::deque< idx_t > &rhs)
 Prints all elements of an std::deque. More...
 
template<class idx_t >
std::ostream & operator<< (std::ostream &os, std::stack< idx_t > rhs)
 Prints all elements of an std::stack. More...
 

Function Documentation

template<class SCALAR , class STORAGE >
std::ostream& operator<< ( std::ostream &  os,
const gl::Graph< SCALAR, STORAGE, gl::Directed > &  rhs 
)

Prints all info of a directed graph.

template<class SCALAR , class STORAGE >
std::ostream& operator<< ( std::ostream &  os,
const gl::Graph< SCALAR, STORAGE, gl::Undirected > &  rhs 
)

Prints all info of an undirected graph.

template<class val_t >
std::ostream& operator<< ( std::ostream &  os,
const gl::Distance< val_t > &  dist 
)

Prints the value of a gl::Distance.

template<class idx_t >
std::ostream& operator<< ( std::ostream &  os,
const std::list< idx_t > &  rhs 
)

Prints all elements of an std::list.

template<class idx_t >
std::ostream& operator<< ( std::ostream &  os,
const std::vector< idx_t > &  rhs 
)

Prints all elements of an std::vector.

template<class idx_t >
std::ostream& operator<< ( std::ostream &  os,
const std::deque< idx_t > &  rhs 
)

Prints all elements of an std::deque.

template<class idx_t >
std::ostream& operator<< ( std::ostream &  os,
std::stack< idx_t >  rhs 
)

Prints all elements of an std::stack.

Only supports copying the stack, due to its implementation.

std::ostream& operator<< ( std::ostream &  os,
const gl::Color rhs 
)

Prints a gl::Color element. Format: [Hex code;(R,G,B),Opacity].

Parameters
osStream that will be used for output
[in]rhsColor that will be printed
template<class SCALAR >
std::ostream& operator<< ( std::ostream &  os,
const gl::Edge< SCALAR > &  rhs 
)

Prints a gl::Edge element. Format: [Source-(Weight)->Destination;Weight/Capacity; Color].

Parameters
osStream that will be used for output
[in]rhsEdge that will be printed