OpenTTD: src/linkgraph/mcf.cpp File Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

Data Structures | Typedefs | Functions
mcf.cpp File Reference

Definition of Multi-Commodity-Flow solver. More...

`#include "../stdafx.h"`
`#include "../core/math_func.hpp"`
`#include "mcf.h"`
`#include <set>`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
class | DistanceAnnotation
| Distance-based annotation for use in the Dijkstra algorithm. More...
struct | DistanceAnnotation::Comparator
| Comparator for std containers. More...
class | CapacityAnnotation
| Capacity-based annotation for use in the Dijkstra algorithm. More...
struct | CapacityAnnotation::Comparator
| Comparator for std containers. More...
class | GraphEdgeIterator
| Iterator class for getting the edges in the order of their next_edge members. More...
class | FlowEdgeIterator
| Iterator class for getting edges from a FlowStatMap. More...

## Typedefs
typedef std::map< NodeID, Path * > | PathViaMap

## Functions
template<typename T >
bool | Greater (T x_anno, T y_anno, NodeID x, NodeID y)
| Relation that creates a weak order without duplicates.

## Detailed Description

Definition of Multi-Commodity-Flow solver.

Definition in file mcf.cpp.

## Function Documentation

template<typename T >

bool Greater | ( | T | x_anno,
|  | T | y_anno,
|  | NodeID | x,
|  | NodeID | y
| ) |  |

Relation that creates a weak order without duplicates.

Avoid accidentally deleting different paths of the same capacity/distance in a set. When the annotation is the same node IDs are compared, so there are no equal ranges.

Template Parameters

  T | Type to be compared on.

Parameters

  x_anno | First value.
  y_anno | Second value.
  x | Node id associated with the first value.
  y | Node id associated with the second value.

Definition at line 550 of file mcf.cpp.