Skip to content

Commit

Permalink
change mmethodcorrection() to mmethodcorrection!()
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed Oct 16, 2024
1 parent 69358a1 commit e519960
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 0.2.4 (Upcoming Release)

- Rename `mmethodcorrection()` to `mmethodcorrection!()` just because the function mutates its input.

### 0.2.3

Expand Down
8 changes: 4 additions & 4 deletions src/simplex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -414,7 +414,7 @@ end
function solve!(s::SimplexProblem)::SimplexProblem
standardform!(s)

mmethodcorrection(s)
mmethodcorrection!(s)

while !s.converged
singleiteration!(s)
Expand All @@ -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
Expand All @@ -455,7 +455,7 @@ function simplexpretty(s::SimplexProblem; maxiter::Int = 1000)::Nothing
println(copied)

@info "M Method corrections:"
mmethodcorrection(copied)
mmethodcorrection!(copied)
println(copied)


Expand Down

0 comments on commit e519960

Please sign in to comment.