From 5aed0c6ca489d9a54e96771096961ef83cb062cf Mon Sep 17 00:00:00 2001 From: "mhsatman@gmail.com" Date: Mon, 6 May 2024 21:21:20 +0300 Subject: [PATCH] fix knapsack docs --- CHANGELOG.md | 1 + src/knapsack.jl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76e4aa5..8de4f11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 0.2.1 (Upcoming Release) - Fix documentation of CpmActivity +- Fix documentation of Knapsack solver ### 0.2.0 diff --git a/src/knapsack.jl b/src/knapsack.jl index d4e7942..f50640b 100644 --- a/src/knapsack.jl +++ b/src/knapsack.jl @@ -21,7 +21,7 @@ end """ - knapsack(problem::KnapsackProblem)::KnapsackResult + solve(problem::KnapsackProblem)::KnapsackResult # Description @@ -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 @@ -66,4 +66,4 @@ function solve(problem::KnapsackProblem)::KnapsackResult return KnapsackResult(selected, model, objective_value(model)) end -end # End of module Knapsack \ No newline at end of file +end # End of module Knapsack