Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::knapsack_detail Namespace Reference

Functions

template<std::integral W>
size_t to_size_checked (const W value, const char *fn_name, const char *field_name)
 
template<std::integral W, typename V >
Array< size_t > extract_weights_checked (const Array< Knapsack_Item< W, V > > &items, const char *fn_name)
 
template<typename V >
V dp_add (V a, V b) noexcept
 

Function Documentation

◆ dp_add()

template<typename V >
V Aleph::knapsack_detail::dp_add ( V  a,
V  b 
)
inlinenoexcept

Definition at line 140 of file Knapsack.H.

References Aleph::and, and V.

Referenced by Aleph::knapsack_01(), Aleph::knapsack_01_value(), and Aleph::knapsack_unbounded().

◆ extract_weights_checked()

template<std::integral W, typename V >
Array< size_t > Aleph::knapsack_detail::extract_weights_checked ( const Array< Knapsack_Item< W, V > > &  items,
const char *  fn_name 
)
inline

◆ to_size_checked()

template<std::integral W>
size_t Aleph::knapsack_detail::to_size_checked ( const W  value,
const char *  fn_name,
const char *  field_name 
)
inline