dejavu
Fast probabilistic symmetry detection.
Loading...
Searching...
No Matches
dejavu::static_graph Class Reference

Graph with static number of vertices and edges. More...

#include <graph.h>

Public Member Functions

 static_graph (const int nv, const int ne)
 
 static_graph ()
 
 ~static_graph ()
 
void initialize_graph (const unsigned int nv, const unsigned int ne)
 
unsigned int add_vertex (const int color, const int deg)
 
void add_edge (const unsigned int v1, const unsigned int v2)
 
void sanity_check ()
 
void dump_dimacs (const std::string &filename)
 
dejavu::sgraphget_sgraph ()
 
int * get_coloring ()
 

Detailed Description

Graph with static number of vertices and edges.

Graph format based on the internal format of dejavu (sgraph), but adding sanity checks and easy access to the construction. Essentially, this class provides a more convenient interface to construct sgraphs.

The graph must first be initialized (either using the respective constructor or using initialize_graph). For the initialization, the final number of vertices or edges must be given. The number of vertices or edges can not be changed. Then, using add_vertex and add_edge, the precise number of defined vertices and edges must be added. The add_vertex(color, deg) function requires a color and a degree. Both can not be changed later.

The add_edge(v1, v2) function adds an undirected edge from v1 to v2. It is always required that v1 < v2 holds, to prevent the accidental addition of hyper-edges.

After the graph was built, the internal sassy graph (sgraph) can be accessed either by the user, or the provided functions. Once the graph construction is finished, the internal sgraph can be changed arbitrarily.

Definition at line 292 of file graph.h.

Constructor & Destructor Documentation

◆ static_graph() [1/2]

dejavu::static_graph::static_graph ( const int  nv,
const int  ne 
)
inline

Definition at line 319 of file graph.h.

◆ static_graph() [2/2]

dejavu::static_graph::static_graph ( )
inline

Definition at line 331 of file graph.h.

◆ ~static_graph()

dejavu::static_graph::~static_graph ( )
inline

Definition at line 335 of file graph.h.

Member Function Documentation

◆ add_edge()

void dejavu::static_graph::add_edge ( const unsigned int  v1,
const unsigned int  v2 
)
inline

Definition at line 371 of file graph.h.

◆ add_vertex()

unsigned int dejavu::static_graph::add_vertex ( const int  color,
const int  deg 
)
inline

Definition at line 355 of file graph.h.

◆ dump_dimacs()

void dejavu::static_graph::dump_dimacs ( const std::string &  filename)
inline

Definition at line 407 of file graph.h.

◆ get_coloring()

int * dejavu::static_graph::get_coloring ( )
inline

Definition at line 433 of file graph.h.

◆ get_sgraph()

dejavu::sgraph * dejavu::static_graph::get_sgraph ( )
inline

Definition at line 428 of file graph.h.

◆ initialize_graph()

void dejavu::static_graph::initialize_graph ( const unsigned int  nv,
const unsigned int  ne 
)
inline

Definition at line 342 of file graph.h.

◆ sanity_check()

void dejavu::static_graph::sanity_check ( )
inline

Definition at line 403 of file graph.h.


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