The CyMeAlg Software (Release 0.01)
subgraph.h
Go to the documentation of this file.
1 /// @addtogroup cymealg
2 /// @{
3 
4 /////////////////////////////////////////////////////////////////////////////
5 ///
6 /// @file
7 ///
8 /// This header file contains a procedure for computing the subgraph
9 /// of a directed graph.
10 ///
11 /// @author Pawel Pilarczyk
12 ///
13 /////////////////////////////////////////////////////////////////////////////
14 
15 // Copyright (C) 1997-2020 by Pawel Pilarczyk.
16 //
17 // This file is part of my research software. This is free software:
18 // you can redistribute it and/or modify it under the terms of the GNU
19 // General Public License as published by the Free Software Foundation,
20 // either version 3 of the License, or (at your option) any later version.
21 //
22 // This software is distributed in the hope that it will be useful,
23 // but WITHOUT ANY WARRANTY; without even the implied warranty of
24 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 // GNU General Public License for more details.
26 //
27 // You should have received a copy of the GNU General Public License
28 // along with this software; see the file "license.txt". If not,
29 // please, see <http://www.gnu.org/licenses/>.
30 
31 // Started in January 2006. Last revision: August 23, 2019.
32 
33 
34 #ifndef _CYMEALG_SUBGRAPH_H_
35 #define _CYMEALG_SUBGRAPH_H_
36 
37 // include selected header files from the CHomP library
38 #include "chomp/system/config.h"
39 
40 namespace cymealg {
41 
42 /// Computes a restriction of the graph to its subgraph. The subgraph
43 /// vertices are defined by nonzero entries in the supplied table.
44 /// The result must be initially empty.
45 template <class Graph1, class Graph2, class Table>
46 void subgraph (const Graph1 &g, Graph2 &result, const Table &tab,
47  bool copyweights = false)
48 {
49  g. subgraph (result, tab, copyweights);
50  return;
51 } /* subgraph */
52 
53 
54 } // namespace cymealg
55 
56 #endif // _CYMEALG_SUBGRAPH_H_
57 
58 /// @}
59 
void subgraph(const Graph1 &g, Graph2 &result, const Table &tab, bool copyweights=false)
Computes a restriction of the graph to its subgraph.
Definition: subgraph.h:46