Mercurial > defical
comparison defical-c/src/graphmagic.h @ 0:ebed2bd0d300
Initial import from svn. History be damned.
author | Edho P. Arief <me@myconan.net> |
---|---|
date | Fri, 02 Apr 2010 23:11:57 +0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ebed2bd0d300 |
---|---|
1 #include "includes.h" | |
2 using namespace std; | |
3 | |
4 class semtd; | |
5 | |
6 class semtd | |
7 { | |
8 private: | |
9 //graphType: 0=path, 1=cycle, 2=completebipartite, 3=wheel, 4=fan, 5=doublefan | |
10 //vector< vector<bool> > theGraph; | |
11 bool theGraph[1000][1000]; | |
12 bool isQuickMode; | |
13 bool isSureFail; | |
14 vector< vector<uint32_t> > edgeLabels; | |
15 vector<uint32_t> edgeLabelsUsed; | |
16 uint32_t edgeLabelAbsoluteMax,edgeLabelMin,edgeLabelMax; | |
17 double scoreCache; | |
18 inline uint32_t edgeLabelRange(); | |
19 void setEdgeLabels(uint32_t verPos); | |
20 void removeEdgeLabels(uint32_t verPos); | |
21 void refreshEdgeLabelsMinMax(); | |
22 void resetLabels(uint32_t mode); | |
23 void draw(uint32_t drawType,uint32_t start,uint32_t end); | |
24 void draw(uint32_t drawType,uint32_t start,uint32_t end,uint32_t extra); | |
25 inline void connectVertices(uint32_t a,uint32_t b); | |
26 bool isValidRange(uint32_t min,uint32_t max); | |
27 public: | |
28 uint32_t numDef,numEdges,graphType; | |
29 semtd(); | |
30 semtd(uint32_t graphType, uint32_t numVer, uint32_t numDef); | |
31 uint32_t NumVer,TotalVer; | |
32 vector<uint32_t> VerLabels; | |
33 string Print(uint32_t withDual); | |
34 void FixLabel(); | |
35 void SwapLabel(); | |
36 bool IsSemt(); | |
37 double SemtScore(); | |
38 void SetVerLabel(uint32_t verPos,uint32_t verLabel); | |
39 void RemoveVerLabel(uint32_t verPos); | |
40 bool IsValidToLabel(uint32_t verPos,uint32_t verLabel); | |
41 uint32_t MinDef(); | |
42 }; | |
43 |