Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ graph/

operations_research::LinearSumAssignment< GraphType > Class Template Reference

#include <linear_assignment.h>

List of all members.

Public Member Functions

 LinearSumAssignment (const GraphType &graph, NodeIndex num_left_nodes)
 This class modifies the given graph by adding arcs to it as costs are specified via SetArcCost, but does not take ownership.
virtual ~LinearSumAssignment ()
void SetCostScalingDivisor (CostValue factor)
 Sets the cost-scaling divisor, i.e., the amount by which we divide the scaling parameter on each iteration.
void OptimizeGraphLayout (GraphType *graph)
 Optimizes the layout of the graph for the access pattern our implementation will use.
const GraphType & Graph () const
 Allows tests, iterators, etc., to inspect our underlying graph.
NodeIndex Head (ArcIndex arc) const
 These handy member functions make the code more compact, and we expose them to clients so that client code that doesn't have direct access to the graph can learn about the optimum assignment once it is computed.
virtual CostValue ArcCost (ArcIndex arc) const
 Returns the original arc cost for use by a client that's iterating over the optimum assignment.
virtual void SetArcCost (ArcIndex arc, CostValue cost)
 Sets the cost of an arc already present in the given graph.
virtual bool FinalizeSetup ()
 Completes initialization after the problem is fully specified.
virtual bool ComputeAssignment ()
 Computes the optimum assignment.
virtual CostValue GetCost () const
 Returns the cost of the minimum-cost perfect matching.
virtual NodeIndex NumNodes () const
 Returns the total number of nodes in the given problem.
virtual NodeIndex NumLeftNodes () const
 Returns the number of nodes on the left side of the given problem.
ArcIndex GetAssignmentArc (NodeIndex left_node) const
 Returns the arc through which the given node is matched.
CostValue GetAssignmentCost (NodeIndex node) const
 Returns the cost of the assignment arc incident to the given node.
NodeIndex GetMate (NodeIndex left_node) const
 Returns the node to which the given node is matched.
string StatsString () const

Classes

class  ActiveNodeContainerInterface
class  ActiveNodeQueue
class  ActiveNodeStack
class  BipartiteLeftNodeIterator
struct  Stats


Detailed Description

template<typename GraphType>
class operations_research::LinearSumAssignment< GraphType >

Definition at line 199 of file linear_assignment.h.


Constructor & Destructor Documentation

template<typename GraphType>
operations_research::LinearSumAssignment< GraphType >::LinearSumAssignment ( const GraphType &  graph,
NodeIndex  num_left_nodes 
) [inline]

This class modifies the given graph by adding arcs to it as costs are specified via SetArcCost, but does not take ownership.

Definition at line 916 of file linear_assignment.h.

template<typename GraphType>
virtual operations_research::LinearSumAssignment< GraphType >::~LinearSumAssignment (  )  [inline, virtual]

Definition at line 207 of file linear_assignment.h.


Member Function Documentation

template<typename GraphType>
void operations_research::LinearSumAssignment< GraphType >::SetCostScalingDivisor ( CostValue  factor  )  [inline]

Sets the cost-scaling divisor, i.e., the amount by which we divide the scaling parameter on each iteration.

Definition at line 211 of file linear_assignment.h.

template<typename GraphType>
void operations_research::LinearSumAssignment< GraphType >::OptimizeGraphLayout ( GraphType *  graph  )  [inline]

Optimizes the layout of the graph for the access pattern our implementation will use.

Definition at line 1009 of file linear_assignment.h.

template<typename GraphType>
const GraphType& operations_research::LinearSumAssignment< GraphType >::Graph (  )  const [inline]

Allows tests, iterators, etc., to inspect our underlying graph.

Definition at line 220 of file linear_assignment.h.

template<typename GraphType>
NodeIndex operations_research::LinearSumAssignment< GraphType >::Head ( ArcIndex  arc  )  const [inline]

These handy member functions make the code more compact, and we expose them to clients so that client code that doesn't have direct access to the graph can learn about the optimum assignment once it is computed.

Definition at line 226 of file linear_assignment.h.

template<typename GraphType>
virtual CostValue operations_research::LinearSumAssignment< GraphType >::ArcCost ( ArcIndex  arc  )  const [inline, virtual]

Returns the original arc cost for use by a client that's iterating over the optimum assignment.

Definition at line 232 of file linear_assignment.h.

template<typename GraphType>
void operations_research::LinearSumAssignment< GraphType >::SetArcCost ( ArcIndex  arc,
CostValue  cost 
) [inline, virtual]

Sets the cost of an arc already present in the given graph.

Definition at line 939 of file linear_assignment.h.

template<typename GraphType>
bool operations_research::LinearSumAssignment< GraphType >::FinalizeSetup (  )  [inline, virtual]

Completes initialization after the problem is fully specified.

Returns true if we successfully prove that arithmetic calculations are guaranteed not to overflow. ComputeAssignment() calls this method itself, so only clients that care about obtaining a warning about the possibility of arithmetic precision problems need to call this method explicitly.

Separate from ComputeAssignment() for white-box testing and for clients that need to react to the possibility that arithmetic overflow is not ruled out.

FinalizeSetup() is idempotent.

Definition at line 1300 of file linear_assignment.h.

template<typename GraphType>
bool operations_research::LinearSumAssignment< GraphType >::ComputeAssignment (  )  [inline, virtual]

Computes the optimum assignment.

Returns true on success. Return value of false implies the given problem is infeasible.

Definition at line 1357 of file linear_assignment.h.

template<typename GraphType>
CostValue operations_research::LinearSumAssignment< GraphType >::GetCost (  )  const [inline, virtual]

Returns the cost of the minimum-cost perfect matching.

Precondition: success_ == true, signifying that we computed the optimum assignment for a feasible problem.

Definition at line 1379 of file linear_assignment.h.

template<typename GraphType>
virtual NodeIndex operations_research::LinearSumAssignment< GraphType >::NumNodes (  )  const [inline, virtual]

Returns the total number of nodes in the given problem.

Definition at line 265 of file linear_assignment.h.

template<typename GraphType>
virtual NodeIndex operations_research::LinearSumAssignment< GraphType >::NumLeftNodes (  )  const [inline, virtual]

Returns the number of nodes on the left side of the given problem.

Definition at line 271 of file linear_assignment.h.

template<typename GraphType>
ArcIndex operations_research::LinearSumAssignment< GraphType >::GetAssignmentArc ( NodeIndex  left_node  )  const [inline]

Returns the arc through which the given node is matched.

Definition at line 276 of file linear_assignment.h.

template<typename GraphType>
CostValue operations_research::LinearSumAssignment< GraphType >::GetAssignmentCost ( NodeIndex  node  )  const [inline]

Returns the cost of the assignment arc incident to the given node.

Definition at line 283 of file linear_assignment.h.

template<typename GraphType>
NodeIndex operations_research::LinearSumAssignment< GraphType >::GetMate ( NodeIndex  left_node  )  const [inline]

Returns the node to which the given node is matched.

Definition at line 288 of file linear_assignment.h.

template<typename GraphType>
string operations_research::LinearSumAssignment< GraphType >::StatsString (  )  const [inline]

Definition at line 295 of file linear_assignment.h.


The documentation for this class was generated from the following file: