COIN-OR::LEMON - Graph Library

Custom Query (545 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (43 - 45 of 545)

Ticket Resolution Summary Owner Reporter
#27 fixed Think over how the demo codes should look like Peter Kovacs Alpar Juttner
Description

Some basic principles:

  • The demos should be simple and easy to understand.
  • They should read the graphs from a file instead of creating them by hand. (Except the one which demonstrates how to build and modify a graph.)
  • We should provide a limited number of general input files instead of a lot of demo specific ones.
  • The command line syntax should be uniform, we should use ArgParser everywhere.
#29 fixed Using \tparam doxygen command Peter Kovacs Peter Kovacs
Description

We should use \tparam for template parameter documentation.

#30 fixed Erroneous initialization of static members Peter Kovacs Akos Ladanyi
Description

Only static integral constant members can be initialized by adding a constant-expression initializer to their member declaration. In practice this means:

class Foo {
  public:
    static const int a = 5;       // this is ok
    static const double b = 1.5;  // this is not ok
                                  // (double is not an integral type)
};

The correct form:

class Foo {
  public:
    static const int a = 5;
    static const double b;
};

const double Foo::b = 1.5;    // this line goes to the .cc file

Note that if (and only if) you need to use an initialized member in a way that requires it to be stored as an object in memory, the member must be defined somewhere. This means that for example if you need to take the address of Foo::a then you need to define it like Foo:b but the initializer may not be repeated:

const int Foo::a;    // in the .cc file

In case Foo is a class template the syntax is a bit trickier:

template<typename T>
class Foo
{
  public: 
    static const int a = 5;
    static const double b;
};

template<typename T>
const double Foo<T>::b = 1.5;    // in the .h file

The above described problem occurs at the following places in the SVN tree:

  • lemon/cycle_canceling.h:128
  • lemon/network_simplex.h:284
  • lemon/network_simplex.h:345
  • lemon/network_simplex.h:346

You can find these by invoking g++ with the -ansi and -pedantic flags (and by running make check).

Note: See TracQuery for help on using queries.