Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Knapsack_Result< V > Struct Template Reference

Result of a knapsack computation. More...

#include <Knapsack.H>

Collaboration diagram for Aleph::Knapsack_Result< V >:
[legend]

Public Attributes

V optimal_value = V{}
 Maximum total value achieved.
 
Array< size_t > selected_items
 Indices (0-based) of items selected for the optimum.
 

Detailed Description

template<typename V>
struct Aleph::Knapsack_Result< V >

Result of a knapsack computation.

Contains the total value achieved and the indices of the items that form the optimal solution.

Template Parameters
VValue type.

Definition at line 106 of file Knapsack.H.

Member Data Documentation

◆ optimal_value

template<typename V >
V Aleph::Knapsack_Result< V >::optimal_value = V{}

Maximum total value achieved.

Definition at line 108 of file Knapsack.H.

Referenced by Aleph::knapsack_bounded().

◆ selected_items

template<typename V >
Array<size_t> Aleph::Knapsack_Result< V >::selected_items

Indices (0-based) of items selected for the optimum.

Definition at line 109 of file Knapsack.H.


The documentation for this struct was generated from the following file: