Tulip
5.0.0
Large graphs analysis and drawing
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
TriconnectedTest.h
1
/*
2
*
3
* This file is part of Tulip (www.tulip-software.org)
4
*
5
* Authors: David Auber and the Tulip development Team
6
* from LaBRI, University of Bordeaux
7
*
8
* Tulip is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation, either version 3
11
* of the License, or (at your option) any later version.
12
*
13
* Tulip is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
* See the GNU General Public License for more details.
17
*
18
*/
19
20
#ifndef TULIP_TRICONNECTEDTEST_H
21
#define TULIP_TRICONNECTEDTEST_H
22
23
#include <tulip/tuliphash.h>
24
#include <tulip/Observable.h>
25
#include <tulip/Graph.h>
26
27
namespace
tlp
{
28
29
/**
30
* @ingroup Checks
31
* @brief Provides functions to test if a graph is triconnected.
32
**/
33
class
TLP_SCOPE
TriconnectedTest
:
private
Observable
{
34
public
:
35
36
/**
37
* @brief Checks if the graph is triconnected.
38
* Creates a clone sugraph in which to operate, then iterates over the nodes, and deletes them.
39
* Once the node is deleted, checks if the graph is biconnected.
40
* If it is not, then the graph is not triconnected.
41
* If it is, adds back the node and its edges.
42
*
43
* @param graph The graph to check is triconnected.
44
* @return bool True if the graph is triconnected, false otherwise.
45
**/
46
static
bool
isTriconnected(
Graph
*graph);
47
48
private
:
49
TriconnectedTest
();
50
51
bool
compute(
tlp::Graph
* graph);
52
// override Observable::treatEvent
53
void
treatEvent(
const
Event
&);
54
55
/**
56
* @brief Singleton instance of this class.
57
**/
58
static
TriconnectedTest
* instance;
59
/**
60
* @brief Stored results for graphs. When a graph is updated, its entry is removed from the hashmap.
61
**/
62
TLP_HASH_MAP<const Graph*, bool> resultsBuffer;
63
};
64
65
66
}
67
#endif
tlp
Definition:
AbstractProperty.h:35
tlp::Graph
Definition:
Graph.h:206
tlp::Event
Event is the base class for all events used in the Observation mechanism.
Definition:
Observable.h:47
tlp::TriconnectedTest
Provides functions to test if a graph is triconnected.
Definition:
TriconnectedTest.h:33
tlp::Observable
The Observable class is the base of Tulip's observation system.
Definition:
Observable.h:123
library
tulip-core
include
tulip
TriconnectedTest.h
Generated on Tue Jun 27 2017 12:25:56 for Tulip by
1.8.11