COIN-OR::LEMON - Graph Library

Changeset 2593:8eed667ea23c in lemon-0.x for lemon/network_simplex.h


Ignore:
Timestamp:
03/07/08 01:24:23 (12 years ago)
Author:
Peter Kovacs
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3476
Message:

Fix static member initializations (ticket #30).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/network_simplex.h

    r2588 r2593  
    281281      int _sample_size;
    282282
     283      static const int SAMPLE_SIZE_FACTOR = 15;
    283284      static const int MIN_SAMPLE_SIZE = 10;
    284       static const double SAMPLE_SIZE_FACTOR = 0.0015;
    285285
    286286    public:
     
    290290        _ns(ns), _next_edge(ns._graph), _min_edge(ns._graph)
    291291      {
    292         _sample_size = int(SAMPLE_SIZE_FACTOR * countEdges(_ns._graph));
     292        _sample_size = countEdges(_ns._graph) *
     293                       SAMPLE_SIZE_FACTOR / 10000;
    293294        if (_sample_size < MIN_SAMPLE_SIZE)
    294295          _sample_size = MIN_SAMPLE_SIZE;
     
    343344      EdgeIt _next_edge;
    344345
    345       static const double LIST_LENGTH_FACTOR = 0.002;
    346       static const double MINOR_LIMIT_FACTOR = 0.1;
     346      static const int LIST_LENGTH_FACTOR = 20;
     347      static const int MINOR_LIMIT_FACTOR = 10;
    347348      static const int MIN_LIST_LENGTH = 10;
    348349      static const int MIN_MINOR_LIMIT = 2;
     
    356357        int edge_num = countEdges(_ns._graph);
    357358        _minor_count = 0;
    358         _list_length = int(edge_num * LIST_LENGTH_FACTOR);
     359        _list_length = edge_num * LIST_LENGTH_FACTOR / 10000;
    359360        if (_list_length < MIN_LIST_LENGTH)
    360361          _list_length = MIN_LIST_LENGTH;
    361         _minor_limit = int(_list_length * MINOR_LIMIT_FACTOR);
     362        _minor_limit = _list_length * MINOR_LIMIT_FACTOR / 100;
    362363        if (_minor_limit < MIN_MINOR_LIMIT)
    363364          _minor_limit = MIN_MINOR_LIMIT;
Note: See TracChangeset for help on using the changeset viewer.