Graph Cpp
Helper Graph class for C++ with CMake support
Loading...
Searching...
No Matches
graph.hpp File Reference
#include "utils.hpp"
Include dependency graph for graph.hpp:

Go to the source code of this file.

Classes

class  Graph< vert_t, weight_t >::Edge
 
class  Graph< vert_t, weight_t >
 Класс графа (может быть взвешенным и ориентированным). More...
 

Concepts

concept  AllowedVertType
 
concept  AllowedWeightType
 

Functions

template<AllowedVertType vert_t, AllowedWeightType weight_t>
vert_t EndVertFromTuple (const std::tuple< vert_t, vert_t, weight_t > &edge)
 
template<AllowedVertType vert_t, AllowedWeightType weight_t>
std::ostream & operator<< (std::ostream &os, const Graph< vert_t, weight_t > &graph)
 
template<AllowedVertType vert_t, AllowedWeightType weight_t>
vert_t StartVertFromTuple (const std::tuple< vert_t, vert_t, weight_t > &edge)
 
template<AllowedVertType vert_t, AllowedWeightType weight_t>
weight_t WeightFromTuple (const std::tuple< vert_t, vert_t, weight_t > &edge)
 

Function Documentation

◆ EndVertFromTuple()

template<AllowedVertType vert_t, AllowedWeightType weight_t>
vert_t EndVertFromTuple ( const std::tuple< vert_t, vert_t, weight_t > & edge)
inline
24 {
25 return std::get<1>(edge);
26}
Here is the caller graph for this function:

◆ operator<<()

template<AllowedVertType vert_t, AllowedWeightType weight_t>
std::ostream & operator<< ( std::ostream & os,
const Graph< vert_t, weight_t > & graph )
inline
864 {
865 os << "Edges:\n ";
866 graph.PrintEdges(os);
867
868 os << "\n";
869
870 os << "Vertices:\n ";
871 graph.PrintVerts(os);
872 return os;
873}
std::ostream & PrintEdges(std::ostream &os=std::cout) const
Выводит в поток список ребер.
Definition graph.hpp:362
std::ostream & PrintVerts(std::ostream &os=std::cout) const
Выводит в поток список вершин.
Definition graph.hpp:350
Here is the call graph for this function:

◆ StartVertFromTuple()

template<AllowedVertType vert_t, AllowedWeightType weight_t>
vert_t StartVertFromTuple ( const std::tuple< vert_t, vert_t, weight_t > & edge)
inline
18 {
19 return std::get<0>(edge);
20}
Here is the caller graph for this function:

◆ WeightFromTuple()

template<AllowedVertType vert_t, AllowedWeightType weight_t>
weight_t WeightFromTuple ( const std::tuple< vert_t, vert_t, weight_t > & edge)
inline
30 {
31 return std::get<2>(edge);
32}
Here is the caller graph for this function: