↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -50,23 +50,21 @@
50 50
    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
51 51
    ///Instantiates a \ref PredMap.
52 52

	
53 53
    ///This function instantiates a \ref PredMap.
54 54
    ///\param g is the digraph, to which we would like to define the
55 55
    ///\ref PredMap.
56
    ///\todo The digraph alone may be insufficient to initialize
57 56
    static PredMap *createPredMap(const Digraph &g)
58 57
    {
59 58
      return new PredMap(g);
60 59
    }
61 60

	
62 61
    ///The type of the map that indicates which nodes are processed.
63 62

	
64 63
    ///The type of the map that indicates which nodes are processed.
65 64
    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
66
    ///By default it is a NullMap.
67 65
    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
68 66
    ///Instantiates a \ref ProcessedMap.
69 67

	
70 68
    ///This function instantiates a \ref ProcessedMap.
71 69
    ///\param g is the digraph, to which
72 70
    ///we would like to define the \ref ProcessedMap
... ...
@@ -192,14 +190,13 @@
192 190
    bool local_processed;
193 191

	
194 192
    std::vector<typename Digraph::Node> _queue;
195 193
    int _queue_head,_queue_tail,_queue_next_dist;
196 194
    int _curr_dist;
197 195

	
198
    ///Creates the maps if necessary.
199
    ///\todo Better memory allocation (instead of new).
196
    //Creates the maps if necessary.
200 197
    void create_maps()
201 198
    {
202 199
      if(!_pred) {
203 200
        local_pred = true;
204 201
        _pred = Traits::createPredMap(*G);
205 202
      }
... ...
@@ -844,13 +841,12 @@
844 841
    typedef NullMap<typename Digraph::Node,typename Digraph::Arc> PredMap;
845 842
    ///Instantiates a \ref PredMap.
846 843

	
847 844
    ///This function instantiates a \ref PredMap.
848 845
    ///\param g is the digraph, to which we would like to define the
849 846
    ///\ref PredMap.
850
    ///\todo The digraph alone may be insufficient to initialize
851 847
#ifdef DOXYGEN
852 848
    static PredMap *createPredMap(const Digraph &g)
853 849
#else
854 850
    static PredMap *createPredMap(const Digraph &)
855 851
#endif
856 852
    {
... ...
@@ -1329,14 +1325,13 @@
1329 1325
    //Indicates if _reached is locally allocated (true) or not.
1330 1326
    bool local_reached;
1331 1327

	
1332 1328
    std::vector<typename Digraph::Node> _list;
1333 1329
    int _list_front, _list_back;
1334 1330

	
1335
    ///Creates the maps if necessary.
1336
    ///\todo Better memory allocation (instead of new).
1331
    //Creates the maps if necessary.
1337 1332
    void create_maps() {
1338 1333
      if(!_reached) {
1339 1334
        local_reached = true;
1340 1335
        _reached = Traits::createReachedMap(*_digraph);
1341 1336
      }
1342 1337
    }
Ignore white space 12 line context
... ...
@@ -102,15 +102,12 @@
102 102
    static Arc direct(const Edge &e, bool d) {
103 103
      return Arc(e, d);
104 104
    }
105 105

	
106 106
    /// Returns whether the given directed arc has the same orientation
107 107
    /// as the corresponding edge.
108
    ///
109
    /// \todo reference to the corresponding point of the undirected digraph
110
    /// concept. "What does the direction of an edge mean?"
111 108
    static bool direction(const Arc &a) { return a.forward; }
112 109

	
113 110
    using Parent::first;
114 111
    using Parent::next;
115 112

	
116 113
    void first(Arc &e) const {
Ignore white space 6 line context
... ...
@@ -39,16 +39,15 @@
39 39
  /// \brief Graph map based on the std::vector storage.
40 40
  ///
41 41
  /// The VectorMap template class is graph map structure what
42 42
  /// automatically updates the map when a key is added to or erased from
43 43
  /// the map. This map type uses the std::vector to store the values.
44 44
  ///
45
  /// \tparam _Notifier The AlterationNotifier that will notify this map.
45
  /// \tparam _Graph The graph this map is attached to.
46 46
  /// \tparam _Item The item type of the graph items.
47 47
  /// \tparam _Value The value type of the map.
48
  /// \todo Fix the doc: there is _Graph parameter instead of _Notifier.
49 48
  template <typename _Graph, typename _Item, typename _Value>
50 49
  class VectorMap
51 50
    : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase {
52 51
  private:
53 52

	
54 53
    /// The container type of the map.
Ignore white space 6 line context
... ...
@@ -33,14 +33,12 @@
33 33

	
34 34
// See http://www.boost.org/libs/concept_check for documentation.
35 35

	
36 36
///\file
37 37
///\brief Basic utilities for concept checking.
38 38
///
39
///\todo Are we still using BOOST concept checking utility?
40
///Is the BOOST copyright notice necessary?
41 39

	
42 40
#ifndef LEMON_CONCEPT_CHECK_H
43 41
#define LEMON_CONCEPT_CHECK_H
44 42

	
45 43
namespace lemon {
46 44

	
Ignore white space 6 line context
... ...
@@ -17,13 +17,12 @@
17 17
 */
18 18

	
19 19
///\ingroup concept
20 20
///\file
21 21
///\brief Classes for representing paths in digraphs.
22 22
///
23
///\todo Iterators have obsolete style
24 23

	
25 24
#ifndef LEMON_CONCEPT_PATH_H
26 25
#define LEMON_CONCEPT_PATH_H
27 26

	
28 27
#include <lemon/core.h>
29 28
#include <lemon/concept_check.h>
Ignore white space 6 line context
... ...
@@ -51,23 +51,21 @@
51 51
    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
52 52
    ///Instantiates a \ref PredMap.
53 53

	
54 54
    ///This function instantiates a \ref PredMap.
55 55
    ///\param g is the digraph, to which we would like to define the
56 56
    ///\ref PredMap.
57
    ///\todo The digraph alone may be insufficient to initialize
58 57
    static PredMap *createPredMap(const Digraph &g)
59 58
    {
60 59
      return new PredMap(g);
61 60
    }
62 61

	
63 62
    ///The type of the map that indicates which nodes are processed.
64 63

	
65 64
    ///The type of the map that indicates which nodes are processed.
66 65
    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
67
    ///By default it is a NullMap.
68 66
    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
69 67
    ///Instantiates a \ref ProcessedMap.
70 68

	
71 69
    ///This function instantiates a \ref ProcessedMap.
72 70
    ///\param g is the digraph, to which
73 71
    ///we would like to define the \ref ProcessedMap
... ...
@@ -192,14 +190,13 @@
192 190
    //Indicates if _processed is locally allocated (true) or not.
193 191
    bool local_processed;
194 192

	
195 193
    std::vector<typename Digraph::OutArcIt> _stack;
196 194
    int _stack_head;
197 195

	
198
    ///Creates the maps if necessary.
199
    ///\todo Better memory allocation (instead of new).
196
    //Creates the maps if necessary.
200 197
    void create_maps()
201 198
    {
202 199
      if(!_pred) {
203 200
        local_pred = true;
204 201
        _pred = Traits::createPredMap(*G);
205 202
      }
... ...
@@ -779,13 +776,12 @@
779 776
    typedef NullMap<typename Digraph::Node,typename Digraph::Arc> PredMap;
780 777
    ///Instantiates a \ref PredMap.
781 778

	
782 779
    ///This function instantiates a \ref PredMap.
783 780
    ///\param g is the digraph, to which we would like to define the
784 781
    ///\ref PredMap.
785
    ///\todo The digraph alone may be insufficient to initialize
786 782
#ifdef DOXYGEN
787 783
    static PredMap *createPredMap(const Digraph &g)
788 784
#else
789 785
    static PredMap *createPredMap(const Digraph &)
790 786
#endif
791 787
    {
... ...
@@ -1276,14 +1272,13 @@
1276 1272
    //Indicates if _reached is locally allocated (true) or not.
1277 1273
    bool local_reached;
1278 1274

	
1279 1275
    std::vector<typename Digraph::Arc> _stack;
1280 1276
    int _stack_head;
1281 1277

	
1282
    ///Creates the maps if necessary.
1283
    ///\todo Better memory allocation (instead of new).
1278
    //Creates the maps if necessary.
1284 1279
    void create_maps() {
1285 1280
      if(!_reached) {
1286 1281
        local_reached = true;
1287 1282
        _reached = Traits::createReachedMap(*_digraph);
1288 1283
      }
1289 1284
    }
Ignore white space 6 line context
... ...
@@ -140,25 +140,22 @@
140 140
    typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap;
141 141
    ///Instantiates a \ref PredMap.
142 142

	
143 143
    ///This function instantiates a \ref PredMap.
144 144
    ///\param g is the digraph, to which we would like to define the
145 145
    ///\ref PredMap.
146
    ///\todo The digraph alone may be insufficient for the initialization
147 146
    static PredMap *createPredMap(const Digraph &g)
148 147
    {
149 148
      return new PredMap(g);
150 149
    }
151 150

	
152 151
    ///The type of the map that indicates which nodes are processed.
153 152

	
154 153
    ///The type of the map that indicates which nodes are processed.
155 154
    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
156 155
    ///By default it is a NullMap.
157
    ///\todo If it is set to a real map,
158
    ///Dijkstra::processed() should read this.
159 156
    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
160 157
    ///Instantiates a \ref ProcessedMap.
161 158

	
162 159
    ///This function instantiates a \ref ProcessedMap.
163 160
    ///\param g is the digraph, to which
164 161
    ///we would like to define the \ref ProcessedMap
... ...
@@ -293,14 +290,13 @@
293 290
    bool local_heap_cross_ref;
294 291
    //Pointer to the heap.
295 292
    Heap *_heap;
296 293
    //Indicates if _heap is locally allocated (true) or not.
297 294
    bool local_heap;
298 295

	
299
    ///Creates the maps if necessary.
300
    ///\todo Better memory allocation (instead of new).
296
    //Creates the maps if necessary.
301 297
    void create_maps()
302 298
    {
303 299
      if(!_pred) {
304 300
        local_pred = true;
305 301
        _pred = Traits::createPredMap(*G);
306 302
      }
... ...
@@ -954,13 +950,12 @@
954 950
    typedef typename Digraph::template NodeMap<int> HeapCrossRef;
955 951
    ///Instantiates a \ref HeapCrossRef.
956 952

	
957 953
    ///This function instantiates a \ref HeapCrossRef.
958 954
    /// \param g is the digraph, to which we would like to define the
959 955
    /// HeapCrossRef.
960
    /// \todo The digraph alone may be insufficient for the initialization
961 956
    static HeapCrossRef *createHeapCrossRef(const Digraph &g)
962 957
    {
963 958
      return new HeapCrossRef(g);
964 959
    }
965 960

	
966 961
    ///The heap type used by the Dijkstra algorithm.
... ...
@@ -990,13 +985,12 @@
990 985
    typedef NullMap <typename Digraph::Node,typename Digraph::Arc> PredMap;
991 986
    ///Instantiates a \ref PredMap.
992 987

	
993 988
    ///This function instantiates a \ref PredMap.
994 989
    ///\param g is the digraph, to which we would like to define the
995 990
    ///\ref PredMap.
996
    ///\todo The digraph alone may be insufficient to initialize
997 991
#ifdef DOXYGEN
998 992
    static PredMap *createPredMap(const Digraph &g)
999 993
#else
1000 994
    static PredMap *createPredMap(const Digraph &)
1001 995
#endif
1002 996
    {
... ...
@@ -1005,15 +999,12 @@
1005 999

	
1006 1000
    ///The type of the map that indicates which nodes are processed.
1007 1001

	
1008 1002
    ///The type of the map that indicates which nodes are processed.
1009 1003
    ///It must meet the \ref concepts::WriteMap "WriteMap" concept.
1010 1004
    ///By default it is a NullMap.
1011
    ///\todo If it is set to a real map,
1012
    ///Dijkstra::processed() should read this.
1013
    ///\todo named parameter to set this type, function to read and write.
1014 1005
    typedef NullMap<typename Digraph::Node,bool> ProcessedMap;
1015 1006
    ///Instantiates a \ref ProcessedMap.
1016 1007

	
1017 1008
    ///This function instantiates a \ref ProcessedMap.
1018 1009
    ///\param g is the digraph, to which
1019 1010
    ///we would like to define the \ref ProcessedMap.
... ...
@@ -1051,13 +1042,12 @@
1051 1042
  /// To make it easier to use Dijkstra algorithm
1052 1043
  /// we have created a wizard class.
1053 1044
  /// This \ref DijkstraWizard class needs default traits,
1054 1045
  /// as well as the \ref Dijkstra class.
1055 1046
  /// The \ref DijkstraWizardBase is a class to be the default traits of the
1056 1047
  /// \ref DijkstraWizard class.
1057
  /// \todo More named parameters are required...
1058 1048
  template<class GR,class LM>
1059 1049
  class DijkstraWizardBase : public DijkstraWizardDefaultTraits<GR,LM>
1060 1050
  {
1061 1051
    typedef DijkstraWizardDefaultTraits<GR,LM> Base;
1062 1052
  protected:
1063 1053
    //The type of the nodes in the digraph.
Ignore white space 6 line context
... ...
@@ -99,14 +99,12 @@
99 99
  /// based) interface to create a string message. Mostly useful in
100 100
  /// exception classes (therefore the name).
101 101
  class ErrorMessage {
102 102
  protected:
103 103
    ///\e
104 104

	
105
    ///\todo The good solution is boost::shared_ptr...
106
    ///
107 105
    mutable std::auto_ptr<std::ostringstream> buf;
108 106

	
109 107
    ///\e
110 108
    bool init() throw() {
111 109
      try {
112 110
        buf.reset(new std::ostringstream);
Ignore white space 6 line context
... ...
@@ -663,13 +663,12 @@
663 663

	
664 664
  ///Like other functions using
665 665
  ///\ref named-templ-func-param "named template parameters",
666 666
  ///this function calls the algorithm itself, i.e. in this case
667 667
  ///it draws the graph.
668 668
  void run() {
669
    //\todo better 'epsilon' would be nice here.
670 669
    const double EPSILON=1e-9;
671 670
    if(dontPrint) return;
672 671

	
673 672
    _graph_to_eps_bits::_NegY<typename T::CoordsMapType>
674 673
      mycoords(_coords,_negY);
675 674

	
... ...
@@ -704,23 +703,21 @@
704 703
    }
705 704

	
706 705
    if (_autoArcWidthScale) {
707 706
      double max_w=0;
708 707
      for(ArcIt e(g);e!=INVALID;++e)
709 708
        max_w=std::max(double(_arcWidths[e]),max_w);
710
      //\todo better 'epsilon' would be nice here.
711 709
      if(max_w>EPSILON) {
712 710
        _arcWidthScale/=max_w;
713 711
      }
714 712
    }
715 713

	
716 714
    if (_autoNodeScale) {
717 715
      double max_s=0;
718 716
      for(NodeIt n(g);n!=INVALID;++n)
719 717
        max_s=std::max(double(_nodeSizes[n]),max_s);
720
      //\todo better 'epsilon' would be nice here.
721 718
      if(max_s>EPSILON) {
722 719
        _nodeScale/=max_s;
723 720
      }
724 721
    }
725 722

	
726 723
    double diag_len = 1;
... ...
@@ -870,13 +867,12 @@
870 867
           << ((A4HEIGHT-2*A4BORDER)-sc*bb.height())/2 + A4BORDER
871 868
           << " translate\n"
872 869
           << sc << " dup scale\n"
873 870
           << -bb.left() << ' ' << -bb.bottom() << " translate\n";
874 871
      }
875 872
      else {
876
        //\todo Verify centering
877 873
        double sc= std::min((A4HEIGHT-2*A4BORDER)/bb.width(),
878 874
                  (A4WIDTH-2*A4BORDER)/bb.height());
879 875
        os << ((A4WIDTH -2*A4BORDER)-sc*bb.height())/2 + A4BORDER << ' '
880 876
           << ((A4HEIGHT-2*A4BORDER)-sc*bb.width())/2 + A4BORDER
881 877
           << " translate\n"
882 878
           << sc << " dup scale\n90 rotate\n"
... ...
@@ -903,13 +899,12 @@
903 899
            sw+=_arcWidths[*e]*_arcWidthScale+_parArcDist;
904 900
          sw-=_parArcDist;
905 901
          sw/=-2.0;
906 902
          dim2::Point<double>
907 903
            dvec(mycoords[g.target(*i)]-mycoords[g.source(*i)]);
908 904
          double l=std::sqrt(dvec.normSquare());
909
          //\todo better 'epsilon' would be nice here.
910 905
          dim2::Point<double> d(dvec/std::max(l,EPSILON));
911 906
          dim2::Point<double> m;
912 907
//           m=dim2::Point<double>(mycoords[g.target(*i)]+
913 908
//                                 mycoords[g.source(*i)])/2.0;
914 909

	
915 910
//            m=dim2::Point<double>(mycoords[g.source(*i)])+
Ignore white space 6 line context
... ...
@@ -498,16 +498,14 @@
498 498
    ///\return The newly created node.
499 499
    ///
500 500
    ///\note The <tt>ArcIt</tt>s referencing a moved arc remain
501 501
    ///valid. However <tt>InArcIt</tt>s and <tt>OutArcIt</tt>s may
502 502
    ///be invalidated.
503 503
    ///
504
    ///\warning This functionality cannot be used together with the
504
    ///\warning This functionality cannot be used in conjunction with the
505 505
    ///Snapshot feature.
506
    ///
507
    ///\todo It could be implemented in a bit faster way.
508 506
    Node split(Node n, bool connect = true) {
509 507
      Node b = addNode();
510 508
      for(OutArcIt e(*this,n);e!=INVALID;) {
511 509
        OutArcIt f=e;
512 510
        ++f;
513 511
        changeSource(e,b);
Ignore white space 6 line context
... ...
@@ -481,14 +481,12 @@
481 481
  /// \c M2::Value must be convertible to \c M1::Key.
482 482
  ///
483 483
  /// The simplest way of using this map is through the composeMap()
484 484
  /// function.
485 485
  ///
486 486
  /// \sa CombineMap
487
  ///
488
  /// \todo Check the requirements.
489 487
  template <typename M1, typename M2>
490 488
  class ComposeMap : public MapBase<typename M2::Key, typename M1::Value> {
491 489
    const M1 &_m1;
492 490
    const M2 &_m2;
493 491
  public:
494 492
    typedef MapBase<typename M2::Key, typename M1::Value> Parent;
... ...
@@ -537,14 +535,12 @@
537 535
  /// must be convertible to \c V.
538 536
  ///
539 537
  /// The simplest way of using this map is through the combineMap()
540 538
  /// function.
541 539
  ///
542 540
  /// \sa ComposeMap
543
  ///
544
  /// \todo Check the requirements.
545 541
  template<typename M1, typename M2, typename F,
546 542
           typename V = typename F::result_type>
547 543
  class CombineMap : public MapBase<typename M1::Key, V> {
548 544
    const M1 &_m1;
549 545
    const M2 &_m2;
550 546
    F _f;
Ignore white space 6 line context
... ...
@@ -818,13 +818,12 @@
818 818

	
819 819
    /// Standard Gauss distribution
820 820

	
821 821
    /// Standard Gauss distribution.
822 822
    /// \note The Cartesian form of the Box-Muller
823 823
    /// transformation is used to generate a random normal distribution.
824
    /// \todo Consider using the "ziggurat" method instead.
825 824
    double gauss()
826 825
    {
827 826
      double V1,V2,S;
828 827
      do {
829 828
        V1=2*real<double>()-1;
830 829
        V2=2*real<double>()-1;
Ignore white space 6 line context
... ...
@@ -297,13 +297,12 @@
297 297
    ///\note The <tt>Arc</tt>s
298 298
    ///referencing a moved arc remain
299 299
    ///valid. However <tt>InArc</tt>'s and <tt>OutArc</tt>'s
300 300
    ///may be invalidated.
301 301
    ///\warning This functionality cannot be used together with the Snapshot
302 302
    ///feature.
303
    ///\todo It could be implemented in a bit faster way.
304 303
    Node split(Node n, bool connect = true)
305 304
    {
306 305
      Node b = addNode();
307 306
      nodes[b._id].first_out=nodes[n._id].first_out;
308 307
      nodes[n._id].first_out=-1;
309 308
      for(int i=nodes[b._id].first_out;i!=-1;i++) arcs[i].source=b._id;
Ignore white space 6 line context
... ...
@@ -289,13 +289,12 @@
289 289
  ///Also, if you start and stop the timer very frequently, it could lead to
290 290
  ///distorted results.
291 291
  ///
292 292
  ///\note If you want to measure the running time of the execution of a certain
293 293
  ///function, consider the usage of \ref TimeReport instead.
294 294
  ///
295
  ///\todo This shouldn't be Unix (Linux) specific.
296 295
  ///\sa TimeReport
297 296
  class Timer
298 297
  {
299 298
    int _running; //Timer is running iff _running>0; (_running>=0 always holds)
300 299
    TimeStamp start_time; //This is the relativ start-time if the timer
301 300
                          //is _running, the collected _running time otherwise.
... ...
@@ -484,13 +483,12 @@
484 483
  ///    ... //Here comes the algorithm
485 484
  ///  }
486 485
  ///\endcode
487 486
  ///
488 487
  ///\sa Timer
489 488
  ///\sa NoTimeReport
490
  ///\todo There is no test case for this
491 489
  class TimeReport : public Timer
492 490
  {
493 491
    std::string _title;
494 492
    std::ostream &_os;
495 493
  public:
496 494
    ///\e
Ignore white space 6 line context
... ...
@@ -21,14 +21,12 @@
21 21

	
22 22
///\ingroup misc
23 23
///\file
24 24
///\brief A basic tool to handle the anomalies of calculation with
25 25
///floating point numbers.
26 26
///
27
///\todo It should be in a module like "Basic tools"
28

	
29 27

	
30 28
namespace lemon {
31 29

	
32 30
  /// \addtogroup misc
33 31
  /// @{
34 32

	
0 comments (0 inline)