Open
Graph Drawing
Framework
v. 2023.09 (Elderberry)
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
separator.inc
Go to the documentation of this file.
1
29
#pragma once
30
31
#include <
ogdf/lib/abacus/separator.h
>
32
#include <
ogdf/lib/abacus/constraint.h
>
33
#include <
ogdf/lib/abacus/variable.h
>
34
35
namespace
abacus
{
36
37
38
template
<
class
BaseType,
class
CoType>
39
Separator_CUTFOUND
40
Separator<BaseType, CoType>::cutFound
(BaseType *cv)
41
{
42
if
(newCons_.full()) {
43
delete
cv;
44
return
Full
;
45
}
46
47
if
(pool_&&pool_->present(cv)) {
48
delete
cv;
49
nDuplications_++;
50
return
Duplication
;
51
}
52
53
if
(hash_&&
find
(cv)) {
54
delete
cv;
55
nDuplications_++;
56
return
Duplication
;
57
}
58
59
60
newCons_.push(cv);
61
if
(hash_)
62
hash_->insert(cv->hashKey(),cv);
63
return
Added
;
64
}
65
66
67
template
<
class
BaseType,
class
CoType>
68
int
Separator<BaseType, CoType>::nCollisions
()
const
69
{
70
if
(!hash_)
71
return
0;
72
return
hash_->nCollisions();
73
}
74
75
76
template
<
class
BaseType,
class
CoType>
77
bool
Separator<BaseType, CoType>::find
(BaseType *cv)
78
{
79
int
key = cv->hashKey();
80
81
BaseType **cand = hash_->initializeIteration(key);
82
83
while
(cand) {
84
if
(cv->equal(*cand))
return
true
;
85
cand = hash_->next(key);
86
}
87
return
false
;
88
}
89
90
}
abacus::Added
@ Added
Definition:
separator.h:40
abacus::Separator::nCollisions
int nCollisions() const
Returns the number of collisions in the hash table.
constraint.h
constraint.
abacus
Definition:
ILPClusterPlanarity.h:50
variable.h
variable.
abacus::Full
@ Full
Definition:
separator.h:40
abacus::Separator::cutFound
Separator_CUTFOUND cutFound(BaseType *cv)
Passes a cut (constraint or variable) to the buffer.
separator.h
separator.
abacus::Separator_CUTFOUND
Separator_CUTFOUND
Definition:
separator.h:40
abacus::Separator::find
bool find(BaseType *cv)
abacus::Duplication
@ Duplication
Definition:
separator.h:40
Minisat::Internal::find
static bool find(V &ts, const T &t)
Definition:
Alg.h:47
include
ogdf
lib
abacus
separator.inc
This site is powered by Netlify.
© 1999–2024
The OGDF Team