Open
Graph Drawing
Framework

 v.2012.07
 

ModularMultilevelMixer.h
Go to the documentation of this file.
1 /*
2  * $Revision: 2523 $
3  *
4  * last checkin:
5  * $Author: gutwenger $
6  * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7  ***************************************************************/
8 
43 #ifdef _MSC_VER
44 #pragma once
45 #endif
46 
47 #ifndef OGDF_MODULAR_MULTILEVEL_MIXER_H
48 #define OGDF_MODULAR_MULTILEVEL_MIXER_H
49 
55 
56 
57 namespace ogdf {
58 
89 {
90 private:
91 
93 
99 
101 
107 
110 
113 
115  int m_times;
116 
119 
122 
124 
126  bool m_randomize;
127 
128 public:
129 
131  enum erc {
133  ercLevelBound
134  };
135 
137 
139  void setLevelLayoutModule(LayoutModule *levelLayout) {
140  m_oneLevelLayoutModule.set(levelLayout);
141  }
142 
144  void setFinalLayoutModule(LayoutModule *finalLayout) {
145  m_finalLayoutModule.set(finalLayout);
146  }
147 
150  m_multilevelBuilder.set(levelBuilder);
151  }
152 
154  void setInitialPlacer(InitialPlacer *placement) {
155  m_initialPlacement.set(placement);
156  }
157 
159  void setLayoutRepeats(int times = 1) { m_times = times; }
160 
162  void setAllEdgeLengths(double len) { m_fixedEdgeLength = len; }
163 
165  void setAllNodeSizes(double size) { m_fixedNodeSize = size; }
166 
168  void setRandomize(bool b) { m_randomize = b; }
169 
171  void setLevelBound(bool b) { m_levelBound = b; }
172 
174  void call(GraphAttributes &GA);
175 
186  /*virtual void call(MultilevelGraph &MLG) {
187  GraphAttributes GA(MLG.getGraph());
188  MLG.exportAttributesSimple(GA);
189  call(GA);
190  MLG.importAttributesSimple(GA);
191  };*/
192  virtual void call(MultilevelGraph &MLG);
193 
195  erc errorCode() { return m_errorCode; }
196 
198  double coarseningRatio() { return m_coarseningRatio; }
199 
200 private:
202 };
203 
204 } // namespace ogdf
205 
206 #endif