UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
PathChecker.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef PATHCHECKER_H_
21 #define PATHCHECKER_H_
22 
23 #include "Hypergraph.h"
24 
25 namespace uncover {
26  namespace graphs {
27 
32  class PathChecker {
33 
34  public:
35 
39  virtual ~PathChecker();
40 
47  static bool hasPath(Hypergraph const& graph, unsigned int length);
48 
49  protected:
50 
61  static bool findPath(Hypergraph const& graph,
62  unordered_set<IDType>& visited,
63  IDType currentVertex,
64  unsigned int currentPath,
65  unsigned int maxPath);
66 
67  private:
68 
72  PathChecker();
73 
74  };
75 
76  } /* namespace graphs */
77 } /* namespace uncover */
78 
79 #endif /* PATHCHECKER_H_ */
virtual ~PathChecker()
Destroys the current instance of PathChecker.
Definition: PathChecker.cpp:28
The PathChecker class provides functions to compute whether given graphs have paths of a defined leng...
Definition: PathChecker.h:32
A Hypergraph represents a graph with a unique identifier.
Definition: Hypergraph.h:35
static bool findPath(Hypergraph const &graph, unordered_set< IDType > &visited, IDType currentVertex, unsigned int currentPath, unsigned int maxPath)
Recursively searches for a path in the given graph which has the given maximal length.
Definition: PathChecker.cpp:44
unsigned int IDType
IDType is an (unsigned) integer specifically used as an Identifier of graphs, elements of graphs or a...
Definition: globals.h:53
PathChecker()
PathChecker cannot be instantiated.
Definition: PathChecker.cpp:26
static bool hasPath(Hypergraph const &graph, unsigned int length)
Checks if the given graph has a path with at least the given length.
Definition: PathChecker.cpp:30