57#ifndef __ADS_Paradigms
58 #define __ADS_Paradigms
94template<
class Z ,
class Next ,
class Last ,
class A ,
class O >
96 -> std::optional<
decltype( o( z ) ) >;
117template<
class Z ,
class Next ,
class Last ,
class A ,
class O ,
class M ,
120 M && m , B && better )
121 -> std::optional<
decltype( o( z ) ) >;
141template<
class N ,
class C ,
class P ,
class L ,
class V >
162template<
class X ,
class Cand ,
class Best >
163std::vector< X >
greedy(
int k , Cand && candidates , Best && best );
180template<
class X ,
class S ,
class D ,
class V ,
class C >
182 C && combine ) ->
decltype( direct( x ) );
198template<
class T ,
class B >
199std::vector< T >
maximal(
const std::vector< T > & X , B && better );
209#include "ADS/algorithm/impl/Paradigms.tpp"
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
std::vector< X > greedy(int k, Cand &&candidates, Best &&best)
the greedy scheme: for each of stages, the best of the values candidates( i , x ) admissible after t...
std::vector< T > maximal(const std::vector< T > &X, B &&better)
the elements of that are maximal for the partial order better( a , b ), i.e., strictly better than
auto enumerateSearch(Z z, Next &&next, Last &&last, A &&a, O &&o) -> std::optional< decltype(o(z)) >
the enumerative search from the first object : the answer of the first with , next( z ) after unti...
bool backtrack(const N &node, C &&children, P &&prune, L &&leaf, V &&visit)
the backtracking from the node : prune( N ) rejects and its subtree, a leaf goes to visit( N ),...
auto enumerateOptimize(Z z, Next &&next, Last &&last, A &&a, O &&o, M &&m, B &&better) -> std::optional< decltype(o(z)) >
the enumerative optimization: the answer of an admissible object of with no admissible one better,...
auto divideEtImpera(const X &x, S &&small, D &&direct, V &÷, C &&combine) -> decltype(direct(x))
divide et impera: direct( x ) if small( x ), else the combination of the solutions of the instances t...
auto children(Tree< T > *t)
the children of , from the leftmost, as a range
Definition Tree.h:409