Skip to content

Commit

Permalink
fix knapsack docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed May 6, 2024
1 parent 33b8c08 commit 5aed0c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.2.1 (Upcoming Release)

- Fix documentation of CpmActivity
- Fix documentation of Knapsack solver

### 0.2.0

Expand Down
6 changes: 3 additions & 3 deletions src/knapsack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end


"""
knapsack(problem::KnapsackProblem)::KnapsackResult
solve(problem::KnapsackProblem)::KnapsackResult
# Description
Expand All @@ -42,7 +42,7 @@ Solves the knapsack problem.
julia> values = [10, 20, 30, 40, 50];
julia> weights = [1, 2, 3, 4, 5];
julia> capacity = 10;
julia> knapsack(KnapsackProblem(values, weights, capacity));
julia> solve(KnapsackProblem(values, weights, capacity));
```
"""
function solve(problem::KnapsackProblem)::KnapsackResult
Expand All @@ -66,4 +66,4 @@ function solve(problem::KnapsackProblem)::KnapsackResult
return KnapsackResult(selected, model, objective_value(model))
end

end # End of module Knapsack
end # End of module Knapsack

0 comments on commit 5aed0c6

Please sign in to comment.