Boost logo

Boost :

From: yihung.chen_at_[hidden]
Date: 2002-07-09 10:53:41


Hi,

 I try to use "edmunds_karp_max_flow" and "push_relabel_max_flow"
routines in my applicaton. Both routines receives the same set of
parameters (g, src, sink, cap, res, rev) which is similar to the examples in edmunds-karp-eg.cpp and push-relabel-eg.cpp. The edmunds_karp_max_flow routine run through and output correct result.
But the push_relabel_max_flow ran into an error as follows:

Unhandled exception in test.exe: 0xC00000005: Access violation.

VS debugger points to the eigth line

     FlowValue maximum_preflow()
      {
        work_since_last_update = 0;

        while (max_active >= min_active) { // "main" loop

          Layer& layer = layers[max_active];
----> list_iterator u_iter = layer.active_vertices.begin();

          if (u_iter == layer.active_vertices.end())
            --max_active;
          else {
            vertex_descriptor u = *u_iter;
            remove_from_active_list(u);
 
            discharge(u);

            if (work_since_last_update * global_update_frequency() > nm) {
              global_distance_update();
              work_since_last_update = 0;
            }
          }
        } // while (max_active >= min_active)

        return excess_flow[sink];
      } // maximum_preflow()

Can anyone give me some advice on this. Thanks.

Yihung Chen



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk