[Lemon-commits] kpeter: r3509 - lemon/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Oct 6 17:08:17 CEST 2008
Author: kpeter
Date: Mon Oct 6 17:08:17 2008
New Revision: 3509
Modified:
lemon/trunk/lemon/capacity_scaling.h
lemon/trunk/lemon/cost_scaling.h
lemon/trunk/lemon/cycle_canceling.h
lemon/trunk/lemon/network_simplex.h
Log:
Add missing pointer initializing in min cost flow classes
Modified: lemon/trunk/lemon/capacity_scaling.h
==============================================================================
--- lemon/trunk/lemon/capacity_scaling.h (original)
+++ lemon/trunk/lemon/capacity_scaling.h Mon Oct 6 17:08:17 2008
@@ -255,9 +255,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(&lower), _capacity(graph), _cost(cost),
- _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false),
- _res_cap(graph), _excess(graph), _pred(graph)
+ _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false),
+ _res_cap(graph), _excess(graph), _pred(graph), _dijkstra(NULL)
{
// Removing non-zero lower bounds
_capacity = subMap(capacity, lower);
@@ -288,9 +288,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(NULL), _capacity(capacity), _cost(cost),
- _supply(supply), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false),
- _res_cap(capacity), _excess(graph), _pred(graph)
+ _supply(supply), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false),
+ _res_cap(capacity), _excess(graph), _pred(graph), _dijkstra(NULL)
{
// Checking the sum of supply values
Supply sum = 0;
@@ -317,9 +317,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(&lower), _capacity(graph), _cost(cost),
- _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false),
- _res_cap(graph), _excess(graph), _pred(graph)
+ _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false),
+ _res_cap(graph), _excess(graph), _pred(graph), _dijkstra(NULL)
{
// Removing non-zero lower bounds
_capacity = subMap(capacity, lower);
@@ -354,9 +354,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(NULL), _capacity(capacity), _cost(cost),
- _supply(graph, 0), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false),
- _res_cap(capacity), _excess(graph), _pred(graph)
+ _supply(graph, 0), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false),
+ _res_cap(capacity), _excess(graph), _pred(graph), _dijkstra(NULL)
{
_supply[s] = flow_value;
_supply[t] = -flow_value;
Modified: lemon/trunk/lemon/cost_scaling.h
==============================================================================
--- lemon/trunk/lemon/cost_scaling.h (original)
+++ lemon/trunk/lemon/cost_scaling.h Mon Oct 6 17:08:17 2008
@@ -181,10 +181,10 @@
PotentialMap *_potential;
bool _local_potential;
- // The residual graph
- ResGraph *_res_graph;
// The residual cost map
ResidualCostMap<LargeCostMap> _res_cost;
+ // The residual graph
+ ResGraph *_res_graph;
// The reduced cost map
ReducedCostMap *_red_cost;
// The excess map
@@ -209,9 +209,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(&lower), _capacity(graph), _orig_cost(cost),
- _cost(graph), _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost),
- _excess(graph, 0)
+ _cost(graph), _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_cost(_cost),
+ _res_graph(NULL), _red_cost(NULL), _excess(graph, 0)
{
// Removing non-zero lower bounds
_capacity = subMap(capacity, lower);
@@ -241,9 +241,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(NULL), _capacity(capacity), _orig_cost(cost),
- _cost(graph), _supply(supply), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost),
- _excess(graph, 0)
+ _cost(graph), _supply(supply), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_cost(_cost),
+ _res_graph(NULL), _red_cost(NULL), _excess(graph, 0)
{
// Checking the sum of supply values
Supply sum = 0;
@@ -270,9 +270,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(&lower), _capacity(graph), _orig_cost(cost),
- _cost(graph), _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost),
- _excess(graph, 0)
+ _cost(graph), _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_cost(_cost),
+ _res_graph(NULL), _red_cost(NULL), _excess(graph, 0)
{
// Removing nonzero lower bounds
_capacity = subMap(capacity, lower);
@@ -306,9 +306,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(NULL), _capacity(capacity), _orig_cost(cost),
- _cost(graph), _supply(graph, 0), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost),
- _excess(graph, 0)
+ _cost(graph), _supply(graph, 0), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_cost(_cost),
+ _res_graph(NULL), _red_cost(NULL), _excess(graph, 0)
{
_supply[s] = flow_value;
_supply[t] = -flow_value;
Modified: lemon/trunk/lemon/cycle_canceling.h
==============================================================================
--- lemon/trunk/lemon/cycle_canceling.h (original)
+++ lemon/trunk/lemon/cycle_canceling.h Mon Oct 6 17:08:17 2008
@@ -168,8 +168,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(&lower), _capacity(graph), _cost(cost),
- _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost)
+ _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_graph(NULL),
+ _res_cost(_cost)
{
// Removing non-zero lower bounds
_capacity = subMap(capacity, lower);
@@ -198,8 +199,9 @@
const CostMap &cost,
const SupplyMap &supply ) :
_graph(graph), _lower(NULL), _capacity(capacity), _cost(cost),
- _supply(supply), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost)
+ _supply(supply), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_graph(NULL),
+ _res_cost(_cost)
{
// Checking the sum of supply values
Supply sum = 0;
@@ -226,8 +228,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(&lower), _capacity(graph), _cost(cost),
- _supply(graph), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost)
+ _supply(graph), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_graph(NULL),
+ _res_cost(_cost)
{
// Removing non-zero lower bounds
_capacity = subMap(capacity, lower);
@@ -261,8 +264,9 @@
Node s, Node t,
Supply flow_value ) :
_graph(graph), _lower(NULL), _capacity(capacity), _cost(cost),
- _supply(graph, 0), _flow(0), _local_flow(false),
- _potential(0), _local_potential(false), _res_cost(_cost)
+ _supply(graph, 0), _flow(NULL), _local_flow(false),
+ _potential(NULL), _local_potential(false), _res_graph(NULL),
+ _res_cost(_cost)
{
_supply[s] = flow_value;
_supply[t] = -flow_value;
Modified: lemon/trunk/lemon/network_simplex.h
==============================================================================
--- lemon/trunk/lemon/network_simplex.h (original)
+++ lemon/trunk/lemon/network_simplex.h Mon Oct 6 17:08:17 2008
@@ -32,8 +32,6 @@
#include <lemon/smart_graph.h>
#include <lemon/math.h>
-#define _DEBUG_
-
namespace lemon {
/// \addtogroup min_cost_flow
@@ -609,7 +607,7 @@
_potential(_graph), _depth(_graph), _parent(_graph),
_pred_edge(_graph), _thread(_graph), _forward(_graph),
_state(_graph), _red_cost(_graph, _cost, _potential),
- _flow_result(0), _potential_result(0),
+ _flow_result(NULL), _potential_result(NULL),
_local_flow(false), _local_potential(false),
_node_ref(graph), _edge_ref(graph)
{
@@ -659,7 +657,7 @@
_potential(_graph), _depth(_graph), _parent(_graph),
_pred_edge(_graph), _thread(_graph), _forward(_graph),
_state(_graph), _red_cost(_graph, _cost, _potential),
- _flow_result(0), _potential_result(0),
+ _flow_result(NULL), _potential_result(NULL),
_local_flow(false), _local_potential(false),
_node_ref(graph), _edge_ref(graph)
{
@@ -703,7 +701,7 @@
_potential(_graph), _depth(_graph), _parent(_graph),
_pred_edge(_graph), _thread(_graph), _forward(_graph),
_state(_graph), _red_cost(_graph, _cost, _potential),
- _flow_result(0), _potential_result(0),
+ _flow_result(NULL), _potential_result(NULL),
_local_flow(false), _local_potential(false),
_node_ref(graph), _edge_ref(graph)
{
@@ -753,7 +751,7 @@
_potential(_graph), _depth(_graph), _parent(_graph),
_pred_edge(_graph), _thread(_graph), _forward(_graph),
_state(_graph), _red_cost(_graph, _cost, _potential),
- _flow_result(0), _potential_result(0),
+ _flow_result(NULL), _potential_result(NULL),
_local_flow(false), _local_potential(false),
_node_ref(graph), _edge_ref(graph)
{
More information about the Lemon-commits
mailing list