Tulip
5.3.0
Large graphs analysis and drawing
TriconnectedTest.h
1
/*
2
*
3
* This file is part of Tulip (http://tulip.labri.fr)
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
* @brief Checks if the graph is triconnected.
37
* Creates a clone sugraph in which to operate, then iterates over the nodes, and deletes them.
38
* Once the node is deleted, checks if the graph is biconnected.
39
* If it is not, then the graph is not triconnected.
40
* If it is, adds back the node and its edges.
41
*
42
* @param graph The graph to check is triconnected.
43
* @return bool True if the graph is triconnected, false otherwise.
44
**/
45
static
bool
isTriconnected(
Graph
*graph);
46
47
private
:
48
TriconnectedTest
();
49
50
bool
compute(
tlp::Graph
*graph);
51
// override Observable::treatEvent
52
void
treatEvent(
const
Event
&)
override
;
53
54
/**
55
* @brief Singleton instance of this class.
56
**/
57
static
TriconnectedTest
*instance;
58
/**
59
* @brief Stored results for graphs. When a graph is updated, its entry is removed from the
60
*hashmap.
61
**/
62
TLP_HASH_MAP<const Graph *, bool> resultsBuffer;
63
};
64
}
// namespace tlp
65
#endif
tlp
Definition:
AbstractProperty.h:35
tlp::Graph
Definition:
Graph.h:232
tlp::Event
Event is the base class for all events used in the Observation mechanism.
Definition:
Observable.h:51
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:141
library
tulip-core
include
tulip
TriconnectedTest.h
Generated on Sun Apr 7 2019 23:52:22 for Tulip by
1.8.13