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>
22struct Variable;
23struct Constraint;
24class Blocks;
25
29struct VPSC {
30public:
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;
36protected:
39 unsigned m;
40 void printBlocks();
41private:
42 void refine();
43 bool constraintGraphIsCyclic(const unsigned n, Variable *vs[]);
44 bool blockGraphIsCyclic();
45};
46
47struct IncVPSC : VPSC {
48public:
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[]);
55private:
56 typedef std::vector<Constraint*> ConstraintList;
57 ConstraintList inactive;
58 double mostViolated(ConstraintList &l,Constraint* &v);
59};
A constraint determines a minimum or exact spacing required between two variables.
Definition constraint.h:25
void satisfy()
void moveBlocks()
unsigned splitCnt
Definition solve_VPSC.h:49
void solve()
void splitBlocks()
void printBlocks()
virtual void solve()
virtual void satisfy()
Constraint ** cs
Definition solve_VPSC.h:38
Blocks bs
Definition solve_VPSC.h:37
unsigned m
Definition solve_VPSC.h:39
virtual ~VPSC()=default