Template Numerical Library version\ main:4e6e2c1
Loading...
Searching...
No Matches
TNL::Graphs::GraphOrientation< Directed > Struct Template Reference

Template structure for specifying graph orientation (directed or undirected). More...

#include <TNL/Graphs/GraphOrientation.h>

Static Public Member Functions

static std::string getSerializationType ()
 Returns a string representation of the graph type for serialization.
static constexpr bool isDirected ()
 Checks if the graph is directed.

Detailed Description

template<bool Directed>
struct TNL::Graphs::GraphOrientation< Directed >

Template structure for specifying graph orientation (directed or undirected).

This template serves as the base for defining graph types. It provides compile-time information about whether a graph is directed or undirected through the template parameter.

Template Parameters
DirectedBoolean indicating if the graph is directed (true) or undirected (false).
See also
DirectedGraph, UndirectedGraph

Member Function Documentation

◆ getSerializationType()

template<bool Directed>
std::string TNL::Graphs::GraphOrientation< Directed >::getSerializationType ( )
inlinestaticnodiscard

Returns a string representation of the graph type for serialization.

Returns
"Directed" for directed graphs, "Undirected" for undirected graphs.

◆ isDirected()

template<bool Directed>
constexpr bool TNL::Graphs::GraphOrientation< Directed >::isDirected ( )
inlinestaticnodiscardconstexpr

Checks if the graph is directed.

Returns
True if the graph is directed, false if undirected.

The documentation for this struct was generated from the following file: