59 cerr <<
"Error: n must be a positive integer." <<
endl;
63 unsigned int t = std::time(0);
79 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
83 for (
int i = 0; i < n; i++)
86 cout << q.
rear() <<
" ";
93 cout << q.
front() <<
" ";
Core header for the Aleph-w library.
Dynamic queue of elements of generic type T based on single linked list.
T & put(const T &data)
The type of element.
T get()
Remove the oldest item of the queue.
T & front()
Return a modifiable reference to the oldest item in the queue.
T & rear()
Return a modifiable reference to the youngest item in the queue.
bool is_empty() const noexcept
Return true if this is empty.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
Dynamic queue implementation based on linked lists.