Ticket #307: 307-2-impr-86c49553fea5.patch

File 307-2-impr-86c49553fea5.patch, 3.3 KB (added by Peter Kovacs, 11 years ago)
• lemon/circulation.h

# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1250584535 -7200
# Node ID 86c49553fea53ec66f545929a2bc75c94f1b6a20
# Parent  1f08e846df296135814062a8a9c4feb22c76d4ab
Test file + doc improvements (#307)

diff --git a/lemon/circulation.h b/lemon/circulation.h
 a return *_level; } /// \brief Sets the tolerance used by algorithm. /// \brief Sets the tolerance used by the algorithm. /// /// Sets the tolerance used by algorithm. /// Sets the tolerance object used by the algorithm. /// \return (*this) Circulation& tolerance(const Tolerance& tolerance) { _tol = tolerance; return *this; /// \brief Returns a const reference to the tolerance. /// /// Returns a const reference to the tolerance. /// Returns a const reference to the tolerance object used by /// the algorithm. const Tolerance& tolerance() const { return _tol; }
• lemon/preflow.h

diff --git a/lemon/preflow.h b/lemon/preflow.h
 a /// \e push-relabel algorithm producing a \ref max_flow /// "flow of maximum value" in a digraph. /// The preflow algorithms are the fastest known maximum /// flow algorithms. The current implementation use a mixture of the /// flow algorithms. The current implementation uses a mixture of the /// \e "highest label" and the \e "bound decrease" heuristics. /// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$. /// return *_level; } /// \brief Sets the tolerance used by algorithm. /// \brief Sets the tolerance used by the algorithm. /// /// Sets the tolerance used by algorithm. /// Sets the tolerance object used by the algorithm. /// \return (*this) Preflow& tolerance(const Tolerance& tolerance) { _tolerance = tolerance; return *this; /// \brief Returns a const reference to the tolerance. /// /// Returns a const reference to the tolerance. /// Returns a const reference to the tolerance object used by /// the algorithm. const Tolerance& tolerance() const { return _tolerance; }
• test/circulation_test.cc

diff --git a/test/circulation_test.cc b/test/circulation_test.cc
 a .upperMap(ucap) .supplyMap(supply) .flowMap(flow); const CirculationType::Elevator& elev = const_circ_test.elevator(); circ_test.elevator(const_cast(elev)); CirculationType::Tolerance tol = const_circ_test.tolerance(); circ_test.tolerance(tol); circ_test.init(); circ_test.greedyInit();
• test/preflow_test.cc

diff --git a/test/preflow_test.cc b/test/preflow_test.cc
 a ::Create PreflowType; PreflowType preflow_test(g, cap, n, n); const PreflowType& const_preflow_test = preflow_test; const PreflowType::Elevator& elev = const_preflow_test.elevator(); preflow_test.elevator(const_cast(elev)); PreflowType::Tolerance tol = const_preflow_test.tolerance(); preflow_test.tolerance(tol); preflow_test .capacityMap(cap)