|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Rich, side-by-side demo for Knapsack variants. More...
Go to the source code of this file.
Typedefs | |
| using | Item = Knapsack_Item< int, int > |
Functions | |
| int | main () |
| Runs a console demonstration of multiple knapsack problem variants. | |
Rich, side-by-side demo for Knapsack variants.
Definition in file knapsack_example.cc.
| using Item = Knapsack_Item<int, int> |
Definition at line 45 of file knapsack_example.cc.
| int main | ( | ) |
Runs a console demonstration of multiple knapsack problem variants.
Executes four scenarios (0/1 knapsack, value-only query, unbounded knapsack, and bounded knapsack) that print item tables, capacities, computed optimal values, and summaries of selected items to standard output.
0 on successful completion. Definition at line 126 of file knapsack_example.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::knapsack_01(), Aleph::knapsack_01_value(), Aleph::knapsack_bounded(), Aleph::knapsack_unbounded(), Aleph::print_rule(), r, and Aleph::Array< T >::size().