Graphviz
13.0.0~dev.20241222.1117
Loading...
Searching...
No Matches
solve_VPSC.h
Go to the documentation of this file.
1
18
#pragma once
19
20
#include <vector>
21
#include <
vpsc/blocks.h
>
22
struct
Variable
;
23
struct
Constraint
;
24
class
Blocks
;
25
29
struct
VPSC
{
30
public
:
31
virtual
void
satisfy
();
32
virtual
void
solve
();
33
34
VPSC
(
const
unsigned
n,
Variable
*vs[],
const
unsigned
m
,
Constraint
*
cs
[]);
35
virtual
~VPSC
() =
default
;
36
protected
:
37
Blocks
bs
;
38
Constraint
**
cs
;
39
unsigned
m
;
40
void
printBlocks
();
41
private
:
42
void
refine();
43
bool
constraintGraphIsCyclic(
const
unsigned
n,
Variable
*vs[]);
44
bool
blockGraphIsCyclic();
45
};
46
47
struct
IncVPSC
:
VPSC
{
48
public
:
49
unsigned
splitCnt
;
50
void
satisfy
();
51
void
solve
();
52
void
moveBlocks
();
53
void
splitBlocks
();
54
IncVPSC
(
const
unsigned
n,
Variable
*vs[],
const
unsigned
m
,
Constraint
*
cs
[]);
55
private
:
56
typedef
std::vector<Constraint*> ConstraintList;
57
ConstraintList inactive;
58
double
mostViolated(ConstraintList &l,
Constraint
* &v);
59
};
blocks.h
Blocks
Definition
blocks.h:38
Constraint
A constraint determines a minimum or exact spacing required between two variables.
Definition
constraint.h:25
IncVPSC
Definition
solve_VPSC.h:47
IncVPSC::satisfy
void satisfy()
Definition
solve_VPSC.cpp:172
IncVPSC::moveBlocks
void moveBlocks()
Definition
solve_VPSC.cpp:215
IncVPSC::splitCnt
unsigned splitCnt
Definition
solve_VPSC.h:49
IncVPSC::solve
void solve()
Definition
solve_VPSC.cpp:142
IncVPSC::splitBlocks
void splitBlocks()
Definition
solve_VPSC.cpp:229
VPSC
Definition
solve_VPSC.h:29
VPSC::printBlocks
void printBlocks()
Definition
solve_VPSC.cpp:59
VPSC::solve
virtual void solve()
Definition
solve_VPSC.cpp:137
VPSC::satisfy
virtual void satisfy()
Definition
solve_VPSC.cpp:80
VPSC::cs
Constraint ** cs
Definition
solve_VPSC.h:38
VPSC::bs
Blocks bs
Definition
solve_VPSC.h:37
VPSC::m
unsigned m
Definition
solve_VPSC.h:39
VPSC::~VPSC
virtual ~VPSC()=default
Variable
Definition
variable.h:26
lib
vpsc
solve_VPSC.h
Generated by
1.9.8