Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "McCormick"
uuid = "53c679d3-6890-5091-8386-c291e8c8aaa1"
authors = ["Matthew Wilhelm <matthew.wilhelm@uconn.edu>"]
version = "0.13.9"
version = "0.13.10"

[deps]
DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b"
Expand Down
10 changes: 5 additions & 5 deletions src/McCormick.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ end
"""
$(TYPEDSIGNATURES)

Takes the concave relaxation gradient 'cc_grad', the convex relaxation gradient
'cv_grad', and the index of the midpoint returned 'id' and outputs the appropriate
Takes the concave relaxation gradient `cc_grad`, the convex relaxation gradient
`cv_grad`, and the index of the midpoint returned `id` and outputs the appropriate
gradient according to McCormick relaxation rules.
"""
function mid_grad(cc_grad::SVector{N,Float64}, cv_grad::SVector{N,Float64}, id::Int64) where N
Expand All @@ -218,8 +218,8 @@ end
"""
$(TYPEDSIGNATURES)

Calculates the value of the slope line segment between `(xL, f(xL))` and `(xU, f(xU))`
defaults to evaluating the derivative of the function if the interval is tight.
Calculates the value and the slope of the line segment between `(xL, f(xL))` and `(xU, f(xU))`.
Defaults to evaluating the derivative of the function if the interval is tight.
"""
@inline function dline_seg(f::Function, df::Function, x::Float64, xL::Float64, xU::Float64)
delta = xU - xL
Expand Down Expand Up @@ -266,7 +266,7 @@ end
$(TYPEDSIGNATURES)

Refines convex/concave relaxations `cv` and `cc` with associated subgradients
`cv_grad` and `cc_grad` by intersecting them with the interval boudns `xL`
`cv_grad` and `cc_grad` by intersecting them with the interval bounds `xL`
and `xU`.
"""
function cut(xL::Float64, xU::Float64, cv::Float64, cc::Float64,
Expand Down
2 changes: 1 addition & 1 deletion src/forward_operators/mixed_convexity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ end
flag && (p = golden_section(xL, 0.0, acos_env, xU, 0.0))
end
(x <= p) && (return NaNMath.acos(x), -1.0/NaNMath.sqrt(1.0-x^2), p)
return dline_seg(acos, acos_deriv, x, p, xU)..., p
return dline_seg(NaNMath.acos, acos_deriv, x, p, xU)..., p
end

@inline asinh_deriv(x::Float64) = 1.0/sqrt(1.0 + x^2)
Expand Down
Loading