PageRenderTime 26ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/Visualisation/GraphDrawing/plans/general.hpp

https://github.com/MLewsey/oklibrary
C++ Header | 155 lines | 4 code | 3 blank | 148 comment | 0 complexity | 1c6a43551f235a4102771f059bcc2711 MD5 | raw file
  1. // Oliver Kullmann, 26.12.2005 (Swansea)
  2. /* Copyright 2005 - 2007, 2008, 2009 Oliver Kullmann
  3. This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
  4. it and/or modify it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation and included in this library; either version 3 of the
  6. License, or any later version. */
  7. /*!
  8. \file GraphDrawing/plans/general.hpp
  9. \brief Plans for the graph drawing module (as a whole)
  10. \todo Update namespaces.
  11. \todo Graphics library
  12. <ul>
  13. <li> The fundamental problem is to determine a suitable graphics library
  14. (or just relying on a graph-library with drawing-capabilities, or on a
  15. special graphs-visualisation library).
  16. </li>
  17. <li> Possibilities:
  18. <ol>
  19. <li> Qt : very intrusive, and thus perhaps not the right choice </li>
  20. <li> OpenGL in the form of the Mesa library: Perhaps this is suitable.
  21. </li>
  22. <li> Perhaps easiest is FLTK http://www.fltk.org/ . </li>
  23. </ol>
  24. </li>
  25. <li> This graphics library must offer the following functionality:
  26. <ol>
  27. <li> a window with graphical elements can be created; </li>
  28. <li> graphical elements can be handled as objects, and placed on the
  29. canvas using coordinates; </li>
  30. <li> graphical elements include at least pixels, points (in various sizes)
  31. and lines; it should be possible to vary their appearance (including
  32. giving them colours), and possibly these elements can be moved; </li>
  33. <li> regarding drawing big trees, we need to zoom in and out easily. </li>
  34. </ol>
  35. One should play around with Mesa and FLTK to see what they can, and to
  36. estimate the quality of these libraries.
  37. </li>
  38. <li> At least at the Maxima/Lisp level, Gnuplot should also be investigated.
  39. </li>
  40. </ul>
  41. \todo Graph visualisation library
  42. <ul>
  43. <li> http://www.ogdf.net/doku.php looks like a
  44. reasonable choice; but apparently not much newer developments. </li>
  45. <li> Then perhaps we don't need the graphics library? </li>
  46. <li> See "Graph drawing" in
  47. Buildsystem/ExternalSources/SpecialBuilds/plans/Graphs.hpp. </li>
  48. <li> Also some of the general graph libraries (see "General C++ graph
  49. libraries" in Buildsystem/ExternalSources/SpecialBuilds/plans/Graphs.hpp)
  50. have graphics-capabilities. </li>
  51. </ul>
  52. \todo External libraries / programs:
  53. <ul>
  54. <li> there is this C-program especially for drawing large trees XXX </li>
  55. </ul>
  56. \todo Concepts
  57. <ul>
  58. <li> Concepts for rooted oriented trees and for graphs are needed. </li>
  59. <li> For graphs the Boost graph library is not optimal, but not too bad.
  60. </li>
  61. <li> See "Graph drawing" in ComputerAlgebra/Graphs/Lisp/plans/general.hpp.
  62. </li>
  63. <li> Important for communication is to get an overview on
  64. graph-file-formats, both for "abstract" and for "drawn" graphs.
  65. <ol>
  66. <li> See "Input/Output" in Graphs/BoostSupport/plans/general.hpp. </li>
  67. </ol>
  68. </li>
  69. </ul>
  70. \todo Applications
  71. <ul>
  72. <li> Likely the different sub-points deserve their own modules. </li>
  73. <li> SAT solvers output the search tree in xml format; the tree is drawn,
  74. and at least one selected value labeling the vertices is visualised using
  75. some colour scheme; see GraphDrawing/plans/Trees.hpp.
  76. <ol>
  77. <li> The information for each node varies from solver to solver, so we
  78. need several xml-fields. </li>
  79. <li> Possible information is
  80. <ul>
  81. <li> The branching variable. </li>
  82. <li> Number of r_k-reductions for available k. </li>
  83. <li> Number of pure literals. </li>
  84. <li> Autarkie reductions. </li>
  85. <li> Measures for the clause-set. </li>
  86. <li> Time needed to process the node. </li>
  87. </ul>
  88. Should we treat this information all as numerical? The branching variable
  89. is different --- here we need the precise value (and also a name is
  90. attached to it).
  91. </li>
  92. <li> Besides node-labellings with numerical values we also have
  93. edge labellings:
  94. <ul>
  95. <li> The distances for the branching (the one used to select the
  96. branching, and also additional ones). <li>
  97. <li> The probability in the probability distribution corresponding
  98. to the branching tuple (see
  99. Heuristics/StatisticalAnalysis/plans/BacktrackingProbing.hpp) </li>
  100. <li> the optimal probability (from the canonical probability distribution
  101. of the tree; see OK's SAT-handbook article on heuristics) </li>
  102. <li> The estimated probability for satisfiability (for choosing the
  103. first branch; see
  104. Heuristics/StatisticalAnalysis/plans/SatisfiabilityPrediction.hpp).
  105. </li>
  106. </ul>
  107. As a non-numerical labelling we have the branching literal.
  108. </li>
  109. </ol>
  110. This all for backtracking-solvers; conflict-learning is difficult. </li>
  111. </li>
  112. <li> The various (multi)graphs associated with CNFs should be visualised
  113. (static snapshots, and also dynamic simulations). </li>
  114. <li> For CS-232 a visualisation of the graph_traversal algorithm is needed,
  115. starting with a drawing of some graph, where first all vertices and edges
  116. are black, and then stepwise vertices get marked red, and edges are
  117. blinking if they are just examined, yellow if they are in the buffer,
  118. green if the are tree edges, blue if they are back edges (perhaps dashed as
  119. long as they are still in the buffer). At the end every edge made the
  120. transition from black through yellow to either green or blue. </li>
  121. <li> For CS-342 a backtracking tree labeled with clause-sets would be useful
  122. (possible output in Latex-format). </li>
  123. </ul>
  124. \todo Conversions
  125. <ul>
  126. <li> It should be possible to create ps-, png- and Latex-files from the
  127. drawings. </li>
  128. </ul>
  129. */
  130. /*!
  131. \namespace OKlib::GraphDrawing
  132. \brief Tools for drawing graphs and trees
  133. */
  134. namespace OKlib {
  135. namespace GraphDrawing {
  136. }
  137. }