ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::AssignmentEngine Concept Reference

the engines of the solves of an Assignment, objects that it keeps: solve( n , C , all , D , col , u , v ) gives an optimal assignment of the costs \( C \) by rows, infinity() forbidding a pair, in col (the column of each row) and its potentials in \( u \) and \( v \), every reduced cost \( c( i , j ) - u_i - v_j \) of a finite cost nonnegative and those of the pairs zero; \( D \) holds the pairs whose cost changed since the last solve, or all is true when anything may have. More...

#include <ADS/graph/Assignment.h>

Concept definition

template< class E , class W >
std::default_initializable< E > &&
requires( E & x , int n , const std::vector< W > & C , bool all ,
const std::vector< std::pair< int , int > > & D ,
std::vector< int > & col , std::vector< W > & u ,
std::vector< W > & v )
{
{ x.solve( n , C , all , D , col , u , v ) } -> std::convertible_to< int >;
}
the engines of the solves of an Assignment, objects that it keeps: solve( n , C , all ,...
Definition Assignment.h:134

Detailed description

the engines of the solves of an Assignment, objects that it keeps: solve( n , C , all , D , col , u , v ) gives an optimal assignment of the costs \( C \) by rows, infinity() forbidding a pair, in col (the column of each row) and its potentials in \( u \) and \( v \), every reduced cost \( c( i , j ) - u_i - v_j \) of a finite cost nonnegative and those of the pairs zero; \( D \) holds the pairs whose cost changed since the last solve, or all is true when anything may have.

It returns Reopt::SCRATCH_BY_EVENT or Reopt::WARM, the way it solved, or \( -1 \), with nothing changed, if there is no perfect assignment, which the code of ADS then looks for [see NetworkSimplexAssignment of ADS/interop/lemon/Warm.h]