Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
UpSAT.h
Go to the documentation of this file.
1
34#pragma once
35
36#include <ogdf/basic/Graph.h>
37
39
40#include <vector>
41
42namespace ogdf {
43class GraphCopy;
44template<class E>
45class List;
46
47class UpSAT {
48public:
49 //constructor
50 explicit UpSAT(Graph& G);
52
53private:
54 class Comp;
55
56 //FLAGS
58 //copy of the input graph
60 //number of clauses and variables
62 long long numberOfClauses;
63 //Indices of the nodes and edges of m_G
66 //Dominating edges-pairs
68 //Variables of the formulation(s)
69 std::vector<std::vector<int>> tau;
70 std::vector<std::vector<int>> sigma;
71 std::vector<std::vector<int>> mu;
72 //Formula
74
75public:
76 bool testUpwardPlanarity(NodeArray<int>* nodeOrder = nullptr);
77 bool embedUpwardPlanar(adjEntry& externalToItsRight, NodeArray<int>* nodeOrder = nullptr);
78 long long getNumberOfClauses();
80 void reset();
81
82private:
89 void ruleUpward();
91 void ruleTutte();
92 void ruleFixed(const Minisat::Model& model);
93 void sortBySigma(List<adjEntry>& adjList, const Minisat::Model& model);
94 void embedFromModel(const Minisat::Model& model, adjEntry& externalToItsRight);
95 bool OE(bool embed, adjEntry& externalToItsRight, NodeArray<int>* nodeOrder);
96 bool FPSS(NodeArray<int>* nodeOrder); // cannot embed
97 bool HL(bool embed, adjEntry& externalToItsRight, NodeArray<int>* nodeOrder);
98 void writeNodeOrder(const Minisat::Model& model, NodeArray<int>* nodeOrder);
99};
100
101}
Includes declaration of graph class.
Declaration of class Minisat.
The Formula class.
Definition Minisat.h:220
Represents a simple class for model storage.
Definition Minisat.h:157
Class for adjacency list elements.
Definition Graph_d.h:143
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:390
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
int getNumberOfVariables()
void computeMuVariables()
void ruleUpward()
int numberOfVariables
Definition UpSAT.h:61
void embedFromModel(const Minisat::Model &model, adjEntry &externalToItsRight)
void sortBySigma(List< adjEntry > &adjList, const Minisat::Model &model)
UpSAT(GraphCopy &G, bool feasibleOriginalEdges)
NodeArray< int > N
Definition UpSAT.h:64
void rulePlanarity()
Graph & m_G
Definition UpSAT.h:59
void ruleTutte()
long long numberOfClauses
Definition UpSAT.h:62
void computeTauVariables()
std::vector< std::vector< int > > mu
Definition UpSAT.h:71
void computeSigmaVariables()
EdgeArray< List< edge > > D
Definition UpSAT.h:67
bool FPSS(NodeArray< int > *nodeOrder)
bool HL(bool embed, adjEntry &externalToItsRight, NodeArray< int > *nodeOrder)
void writeNodeOrder(const Minisat::Model &model, NodeArray< int > *nodeOrder)
void ruleFixed(const Minisat::Model &model)
void computeDominatingEdges()
bool OE(bool embed, adjEntry &externalToItsRight, NodeArray< int > *nodeOrder)
bool testUpwardPlanarity(NodeArray< int > *nodeOrder=nullptr)
long long getNumberOfClauses()
bool embedUpwardPlanar(adjEntry &externalToItsRight, NodeArray< int > *nodeOrder=nullptr)
std::vector< std::vector< int > > sigma
Definition UpSAT.h:70
void ruleSigmaTransitive()
UpSAT(Graph &G)
std::vector< std::vector< int > > tau
Definition UpSAT.h:69
void ruleTauTransitive()
void reset()
Minisat::Formula m_F
Definition UpSAT.h:73
EdgeArray< int > M
Definition UpSAT.h:65
bool feasibleOriginalEdges
Definition UpSAT.h:57
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition Graph_d.h:659
The namespace for all OGDF objects.