COIN-OR::LEMON - Graph Library

Custom Query (545 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (55 - 57 of 545)

Ticket Resolution Summary Owner Reporter
#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).

#112 fixed lgf_writer.h missing from Makefile.am Peter Kovacs Akos Ladanyi
Description

lgf_writer.h is not listed in lemon/Makefile.am.

#142 fixed Disable checks for ILP solvers Alpar Juttner Akos Ladanyi
Description

Since the wrapper for ILP solvers won't be part of the 1.0 release the attached patch disables the checks for the solvers.

Note: See TracQuery for help on using queries.