Regina 7.3 Calculation Engine
Public Member Functions | Public Attributes | List of all members
regina::TreeDecomposition::Graph Struct Reference

Represents a graph, which may be directed or undirected. More...

#include <treewidth/treedecomposition.h>

Public Member Functions

 Graph (size_t order)
 Constructs a new graph with no arcs. More...
 
 ~Graph ()
 Destroys this graph. More...
 
void dump (std::ostream &out) const
 Writes the adjacency matrix of this graph in a compact format to the given output stream. More...
 
 Graph (const Graph &)=delete
 
Graphoperator= (const Graph &)=delete
 

Public Attributes

size_t order_
 The number of nodes in the graph. More...
 
bool ** adj_
 The adjacency matrix for the graph. More...
 

Detailed Description

Represents a graph, which may be directed or undirected.

This is an internal class, used to convert input graphs into a common format before passing them to the main tree decomposition algorithms.

Constructor & Destructor Documentation

◆ Graph()

regina::TreeDecomposition::Graph::Graph ( size_t  order)
inline

Constructs a new graph with no arcs.

Parameters
orderthe number of nodes in the new graph.

◆ ~Graph()

regina::TreeDecomposition::Graph::~Graph ( )
inline

Destroys this graph.

Member Function Documentation

◆ dump()

void regina::TreeDecomposition::Graph::dump ( std::ostream &  out) const

Writes the adjacency matrix of this graph in a compact format to the given output stream.

The output will be formatted as a matrix, and will be spread across multiple lines.

Parameters
outthe output stream to which to write.

Member Data Documentation

◆ adj_

bool** regina::TreeDecomposition::Graph::adj_

The adjacency matrix for the graph.

Specifically, adj_[i][j] is true if and only if there is an arc from node i to node j.

◆ order_

size_t regina::TreeDecomposition::Graph::order_

The number of nodes in the graph.


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

Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).