diff --git a/CHANGELOG.md b/CHANGELOG.md index 44442a6..0521ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### 0.2.4 (Upcoming Release) +- Rename `mmethodcorrection()` to `mmethodcorrection!()` just because the function mutates its input. ### 0.2.3 diff --git a/src/simplex.jl b/src/simplex.jl index d85d172..a0193b0 100644 --- a/src/simplex.jl +++ b/src/simplex.jl @@ -313,7 +313,7 @@ function standardform!(s::SimplexProblem) s.isinstandardform = true end -function mmethodcorrection(s::SimplexProblem) +function mmethodcorrection!(s::SimplexProblem) M = s.biggestvalue n, p = size(s.lhs) for i = 1:n @@ -414,7 +414,7 @@ end function solve!(s::SimplexProblem)::SimplexProblem standardform!(s) - mmethodcorrection(s) + mmethodcorrection!(s) while !s.converged singleiteration!(s) @@ -431,7 +431,7 @@ function simplexiterations(s::SimplexProblem)::Vector{SimplexProblem} push!(iterations, s1) s2 = copy(s1) - mmethodcorrection(s2) + mmethodcorrection!(s2) push!(iterations, s2) while !s2.converged @@ -455,7 +455,7 @@ function simplexpretty(s::SimplexProblem; maxiter::Int = 1000)::Nothing println(copied) @info "M Method corrections:" - mmethodcorrection(copied) + mmethodcorrection!(copied) println(copied)