Todo List
Member FindStronglyConnectedComponents (const NodeIndex num_nodes, const Graph &graph, SccOutput *components)
(user): Possible optimizations:
  • Try to reserve the vectors which sizes are bounded by num_nodes.
  • Use an index rather than doing push_back(), pop_back() on them.
  • For a client needing many Scc computations one after another, it could be better to wrap this in a class so we don't need to allocate the stacks at each computation.
Namespace operations_research

(user): add depth-first-search based connectivity for directed graphs.

(user): add depth-first-search based biconnectivity for directed graphs.

(user) although it is already possible, using the GroupForwardArcsByFunctor method, to group all the outgoing (resp. incoming) arcs of a node, the iterator logic could still be improved to allow traversing the outgoing (resp. incoming) arcs in O(out_degree(node)) (resp. O(in_degree(node))) instead of O(degree(node)).

(user) it is possible to implement arc deletion and garbage collection in an efficient (relatively) manner. For the time being we haven't seen an application for this.

(user): implement pruning procedures on top of the Held-Karp algorithm.

(user): implement the above active node choice rule.

(user): an alternative would be to evaluate: A.V. Goldberg, "The Partial Augment-Relabel Algorithm for the Maximum Flow Problem.” In Proceedings of Algorithms ESA, LNCS 5193:466-477, Springer 2008. http://www.springerlink.com/index/5535k2j1mt646338.pdf

(user): See whether the following can bring any improvements on real-life problems. R.K. Ahuja, A.V. Goldberg, J.B. Orlin, and R.E. Tarjan, "Finding minimum-cost flows by double scaling," Mathematical Programming, (1992) 53:243-266. http://www.springerlink.com/index/gu7404218u6kt166.pdf

Member operations_research::BuildKruskalMinimumSpanningTreeFromSortedArcs (const Graph &graph, const std::vector< typename Graph::ArcIndex > &sorted_arcs)
(user): Add a global Minimum Spanning Tree API automatically switching between Prim and Kruskal depending on problem size.
Member operations_research::ChristofidesPathSolver< CostType, ArcIndex, NodeIndex, CostFunction >::SetMatchingAlgorithm (MatchingAlgorithm matching)
(user): Change the default when minimum matching gets faster.
Member operations_research::ComputeMinimumWeightMatchingWithMIP (const GraphType &graph, const WeightFunctionType &weight)
(user): Handle infeasible cases if this algorithm is used outside of Christofides.
Member operations_research::ConnectedComponents< NodeIndex, ArcIndex >::AddGraph (const Graph &graph)
(user): implement Depth-First Search-based connected components finder.
Member operations_research::EbertGraphBase< NodeIndexType, ArcIndexType, DerivedGraph >::GroupForwardArcsByFunctor (const ArcIndexTypeStrictWeakOrderingFunctor &compare, PermutationCycleHandler< ArcIndexType > *annotation_handler)
(user): Configure SWIG to handle the GroupForwardArcsByFunctor member template and the CycleHandlerForAnnotatedArcs class.
Class operations_research::ElementIterator< Set >
(user): Move the Set-related classbelow to util/bitset.h Iterates over the elements of a set represented as an unsigned integer, starting from the smallest element.
Class operations_research::ForwardStaticGraph< NodeIndexType, ArcIndexType >::CycleHandlerForAnnotatedArcs
(user): Configure SWIG to handle the CycleHandlerForAnnotatedArcs class.
Member operations_research::ForwardStaticGraph< NodeIndexType, ArcIndexType >::ForwardStaticGraph (const NodeIndexType num_nodes, const ArcIndexType num_arcs, const bool sort_arcs_by_head, std::vector< std::pair< NodeIndexType, NodeIndexType > > *client_input_arcs, operations_research::PermutationCycleHandler< ArcIndexType > *const client_cycle_handler)
(user): For some reason, SWIG breaks if the operations_research namespace is not explicit in the following argument declaration.
Member operations_research::GenericMaxFlow< Graph >::check_result_
(user): Make the check more exhaustive by checking the optimality?
Member operations_research::GenericMaxFlow< Graph >::GetSinkSideMinCut (std::vector< NodeIndex > *result)
(user): In the two-phases algorithm, we can get this minimum cut without doing the second phase. Add an option for this if there is a need to, note that the second phase is pretty fast so the gain will be small.
Class operations_research::GenericMinCostFlow< Graph, ArcFlowType, ArcScaledCostType >
(user): Avoid using the globally defined type CostValue and FlowQuantity. Also uses the Arc*Type where there is no risk of overflow in more places.
Member operations_research::HamiltonianPathSolver< CostType, CostFunction >::Integer
(user): remove this limitation by using pruning techniques.
Member operations_research::IsEulerianGraph (const Graph &graph)
(user): Check graph connectivity.
Member operations_research::IsSemiEulerianGraph (const Graph &graph, std::vector< NodeIndex > *odd_nodes)
(user): Check graph connectivity.
Member operations_research::LatticeMemoryManager< Set, CostType >::BaseOffset (int card, Set s) const

(user): Investigate how to compute BaseOffset(card - 1, s \ { n }) from BaseOffset(card, n) to speed up the DP iteration.

(user): Evaluate the interest of the above. There are 'card' f(set, j) to store. That is why we need to multiply local_offset by card before adding it to the corresponding base_offset_.

Class operations_research::MaxFlow
(user): Modify this code and remove it.
Member operations_research::PruningHamiltonianSolver< CostType, CostFunction >::Integer

(user): Use generic map-based cache instead of lattice-based one.

(user): Use SaturatedArithmetic for better precision.

Class operations_research::SimpleMaxFlow
(user): If the need arises, extend this interface to support warm start.
Member operations_research::SimpleMaxFlow::POSSIBLE_OVERFLOW
(user): rename POSSIBLE_OVERFLOW to INT_OVERFLOW and modify our clients.
Member operations_research::SimpleMaxFlow::SetArcCapacity (ArcIndex arc, FlowQuantity capacity)
(user): Support incrementality in the max flow implementation.
Class operations_research::SimpleMinCostFlow
(user): If the need arises, extend this interface to support warm start and incrementality between solves. Note that this is already supported by the GenericMinCostFlow<> interface.
Member util::BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >::arc_capacity () const
(user): Same questions as the ones in node_capacity().
Member util::BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >::FreezeCapacities ()
(user): Only define this in debug mode at the cost of having a lot of ifndef NDEBUG all over the place? remove the function completely ?
Member util::BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >::GroupForwardArcsByFunctor (const A &a, B *b)
(user): remove the public functions below.
Member util::BaseGraph< NodeIndexType, ArcIndexType, HasReverseArcs >::node_capacity () const
(user): Is it needed? remove completely? return the real capacities at the cost of having a different implementation for each graphs?
Member util::PermuteWithExplicitElementType (const IntVector &permutation, Array *array_to_permute, ElementType unused)
(user): consider slower but more memory efficient implementations that follow the cycles of the permutation and use a bitmap to indicate what has been permuted or to mark the beginning of each cycle.
Member util::RemoveCyclesFromPath (const Graph &graph, std::vector< int > *arc_path)
(user): In some cases, there is more than one possible solution. We could take some arc costs and return the cheapest path instead. Or return the shortest path in term of number of arcs.
Member util::ReverseArcMixedGraph< NodeIndexType, ArcIndexType >::Head (ArcIndexType arc) const
(user): support Head() and Tail() before Build(), like StaticGraph<>.
Member util::ReverseArcMixedGraph< NodeIndexType, ArcIndexType >::OutgoingArcIterator::DEFINE_STL_ITERATOR_FUNCTIONS (OutgoingArcIterator)
(user): we lose a bit by returning a BeginEndWrapper<> on top of this iterator rather than a simple IntegerRange on the arc indices.
Member util::ReverseArcStaticGraph< NodeIndexType, ArcIndexType >::Build (std::vector< ArcIndexType > *permutation)
(user): the 0 is wasted here, but minor optimisation.
Member util::ReverseArcStaticGraph< NodeIndexType, ArcIndexType >::Head (ArcIndexType arc) const
(user): support Head() and Tail() before Build(), like StaticGraph<>.
Member util::ReverseArcStaticGraph< NodeIndexType, ArcIndexType >::OutgoingArcIterator::DEFINE_STL_ITERATOR_FUNCTIONS (OutgoingArcIterator)
(user): we lose a bit by returning a BeginEndWrapper<> on top of this iterator rather than a simple IntegerRange on the arc indices.
Member util::SVector< T >::reserve (int n)
(user): in C++17 we could use std::uninitialized_move instead of this loop.