COIN-OR::LEMON - Graph Library

Custom Query (511 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (118 - 120 of 511)

Ticket Resolution Summary Owner Reporter
#219 fixed Enable <= supply requirement in Network Simplex Peter Kovacs Alpar Juttner
Description

It is purely and extension of the min. cost flow problem if we only require that the actual supply is at most the the prescription.

This extension does not require substantial change in the algorithm.

#132 fixed Erase should be shown in list graphs Balazs Dezso Balazs Dezso
Description

The [ad6b8c47bd56] patch reimplements erase in list graphs in order to show these functions in the 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.