Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
separator.inc
Go to the documentation of this file.
1
29#pragma once
30
34
35namespace abacus {
36
37
38template <class BaseType, class CoType>
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
67template <class BaseType, class CoType>
69{
70 if(!hash_)
71 return 0;
72 return hash_->nCollisions();
73}
74
75
76template <class BaseType, class CoType>
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}
Separator_CUTFOUND cutFound(BaseType *cv)
Passes a cut (constraint or variable) to the buffer.
int nCollisions() const
Returns the number of collisions in the hash table.
bool find(BaseType *cv)
constraint.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
Separator_CUTFOUND
Definition separator.h:40
@ Duplication
Definition separator.h:40
@ Added
Definition separator.h:40
separator.
variable.