From f86ad3d4ff9b0c944d6f5806fe46af1d460a6500 Mon Sep 17 00:00:00 2001 From: John E Date: Fri, 14 Aug 2026 10:01:18 -0400 Subject: [PATCH] docs: fix typos Signed-off-by: John E --- docs/src/developer/checklists.md | 2 +- src/FileFormats/NL/NLExpr.jl | 4 ++-- src/Nonlinear/ReverseAD/forward_over_reverse.jl | 2 +- src/Nonlinear/ReverseAD/graph_tools.jl | 2 +- src/Nonlinear/SymbolicAD/SymbolicAD.jl | 2 +- src/Test/test_linear.jl | 2 +- src/Utilities/matrix_of_constraints.jl | 2 +- src/Utilities/results.jl | 2 +- src/attributes.jl | 14 +++++++------- src/functions.jl | 2 +- src/sets.jl | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/src/developer/checklists.md b/docs/src/developer/checklists.md index 113362cc11..a91eef8fc0 100644 --- a/docs/src/developer/checklists.md +++ b/docs/src/developer/checklists.md @@ -141,7 +141,7 @@ Use this checklist when updating the version of MathOptFormat. - [ ] New sets are added to the `@enum` in `src/FileFormats/MOF/read.jl` - [ ] `set_to_moi` is defined for each set in `src/FileFormats/MOF/read.jl` - [ ] `head_name` is defined for each set in `src/FileFormats/MOF/write.jl` - - [ ] A new unit test calling `_test_model_equality` is aded to + - [ ] A new unit test calling `_test_model_equality` is added to `test/FileFormats/MOF/MOF.jl` ## Tests diff --git a/src/FileFormats/NL/NLExpr.jl b/src/FileFormats/NL/NLExpr.jl index 248c487d88..d82843d5ac 100644 --- a/src/FileFormats/NL/NLExpr.jl +++ b/src/FileFormats/NL/NLExpr.jl @@ -13,7 +13,7 @@ include("opcode.jl") """ _JULIA_TO_AMPL -This dictionary is manualy curated, based on the list of opcodes in `opcode.jl`. +This dictionary is manually curated, based on the list of opcodes in `opcode.jl`. The goal is to map Julia functions to their AMPL opcode equivalent. @@ -105,7 +105,7 @@ const _JULIA_TO_AMPL = Dict{Symbol,Int}( """ _AMPL_TO_JULIA -This dictionary is manualy curated, based on the list of supported opcodes +This dictionary is manually curated, based on the list of supported opcodes `_JULIA_TO_AMPL`. The goal is to map AMPL opcodes to their Julia equivalents. In addition, we need diff --git a/src/Nonlinear/ReverseAD/forward_over_reverse.jl b/src/Nonlinear/ReverseAD/forward_over_reverse.jl index c531fb9878..be9e9a956f 100644 --- a/src/Nonlinear/ReverseAD/forward_over_reverse.jl +++ b/src/Nonlinear/ReverseAD/forward_over_reverse.jl @@ -9,7 +9,7 @@ const TAG = :ReverseAD """ const MAX_CHUNK::Int = 10 -An upper bound on the chunk sie for forward-over-reverse. Increasing this could +An upper bound on the chunk size for forward-over-reverse. Increasing this could improve performance at the cost of extra memory allocation. It has been 10 for a long time, and nobody seems to have complained. """ diff --git a/src/Nonlinear/ReverseAD/graph_tools.jl b/src/Nonlinear/ReverseAD/graph_tools.jl index 837fbf23b4..3d7a110731 100644 --- a/src/Nonlinear/ReverseAD/graph_tools.jl +++ b/src/Nonlinear/ReverseAD/graph_tools.jl @@ -10,7 +10,7 @@ moi_index_to_consecutive_index::Dict{MOI.VariableIndex,Int}, ) -Return a new `Vector{Nonlinear.Node}` where all occurences of +Return a new `Vector{Nonlinear.Node}` where all occurrences of `NODE_MOI_VARIABLE` are replaced by `NODE_VARIABLE` that is 1-indexed and ordered. """ diff --git a/src/Nonlinear/SymbolicAD/SymbolicAD.jl b/src/Nonlinear/SymbolicAD/SymbolicAD.jl index c9b8c679b1..97875bbceb 100644 --- a/src/Nonlinear/SymbolicAD/SymbolicAD.jl +++ b/src/Nonlinear/SymbolicAD/SymbolicAD.jl @@ -456,7 +456,7 @@ Return an expression representing the partial derivative of `f` with respect to ## Expression swelling With few exceptions, the algorithm used to compute the derivative does not -perform simplications. As a result, the returned expression may contain terms +perform simplifications. As a result, the returned expression may contain terms like `*(false, g)` that can be trivially simplified to `false`. In most cases, you should call `simplify!(derivative(f, x))` to return a diff --git a/src/Test/test_linear.jl b/src/Test/test_linear.jl index 3565567eed..4f2857b1f2 100644 --- a/src/Test/test_linear.jl +++ b/src/Test/test_linear.jl @@ -2059,7 +2059,7 @@ st w + z == 1 w, z >= 0 sol: z = 1, w = 0 ``` -Then it tranforms problem into: +Then it transforms problem into: ``` min x + y st x + y >= 1 diff --git a/src/Utilities/matrix_of_constraints.jl b/src/Utilities/matrix_of_constraints.jl index 074575a6c0..550b0c2f0f 100644 --- a/src/Utilities/matrix_of_constraints.jl +++ b/src/Utilities/matrix_of_constraints.jl @@ -608,7 +608,7 @@ function_constants(b::Vector, rows) = b[rows] set_with_dimension(::Type{S}, dim) where {S<:MOI.AbstractVectorSet} Returns the instance of `S` of [`MOI.dimension`](@ref) `dim`. -This needs to be implemented for sets of type `S` to be useable with +This needs to be implemented for sets of type `S` to be usable with [`MatrixOfConstraints`](@ref). """ function set_with_dimension(::Type{S}, dim) where {S<:MOI.AbstractVectorSet} diff --git a/src/Utilities/results.jl b/src/Utilities/results.jl index b6cb7602e8..34e7479907 100644 --- a/src/Utilities/results.jl +++ b/src/Utilities/results.jl @@ -19,7 +19,7 @@ """ is_ray(status::MOI.ResultStatusCode) -Returnn `true` if `status` is `INFEASIBILITY_CERTIFICATE` or +Return `true` if `status` is `INFEASIBILITY_CERTIFICATE` or `NEARLY_INFEASIBILITY_CERTIFICATE`. """ function is_ray(status::MOI.ResultStatusCode) diff --git a/src/attributes.jl b/src/attributes.jl index b88d6258dc..e19649cf7f 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1667,7 +1667,7 @@ solution `result_index`. ## PrimalStatus -Before quering this attribute you should first check [`PrimalStatus`](@ref) to +Before querying this attribute you should first check [`PrimalStatus`](@ref) to confirm that a primal solution is available. If the [`PrimalStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -1707,7 +1707,7 @@ the dual solution `result_index`. ## DualStatus -Before quering this attribute you should first check [`DualStatus`](@ref) to +Before querying this attribute you should first check [`DualStatus`](@ref) to confirm that a dual solution is available. If the [`DualStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -2092,7 +2092,7 @@ An [`AbstractVariableAttribute`](@ref) for the variable's primal value in result ## PrimalStatus -Before quering this attribute you should first check [`PrimalStatus`](@ref) to +Before querying this attribute you should first check [`PrimalStatus`](@ref) to confirm that a primal solution is available. If the [`PrimalStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -2183,7 +2183,7 @@ variable in result `result_index`, with respect to a basic solution. ## PrimalStatus -Before quering this attribute you should first check [`PrimalStatus`](@ref) to +Before querying this attribute you should first check [`PrimalStatus`](@ref) to confirm that a primal solution is available. If the [`PrimalStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -2386,7 +2386,7 @@ due to numerical tolerances they may not be identical.) ## PrimalStatus -Before quering this attribute you should first check [`PrimalStatus`](@ref) to +Before querying this attribute you should first check [`PrimalStatus`](@ref) to confirm that a primal solution is available. If the [`PrimalStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -2432,7 +2432,7 @@ result `result_index`. ## DualStatus -Before quering this attribute you should first check [`DualStatus`](@ref) to +Before querying this attribute you should first check [`DualStatus`](@ref) to confirm that a dual solution is available. If the [`DualStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying @@ -3386,7 +3386,7 @@ Both values are useful in different circumstances. ## DualStatus -Before quering this attribute you should first check [`DualStatus`](@ref) to +Before querying this attribute you should first check [`DualStatus`](@ref) to confirm that a dual solution is available. If the [`DualStatus`](@ref) is [`NO_SOLUTION`](@ref) the result of querying diff --git a/src/functions.jl b/src/functions.jl index 61a1d76886..23cac64f07 100644 --- a/src/functions.jl +++ b/src/functions.jl @@ -200,7 +200,7 @@ term_pair(t::ScalarQuadraticTerm) = term_indices(t) => coefficient(t) quadratic_terms::Vector{ScalarQuadraticTerm{T}}, affine_terms::Vector{ScalarAffineTerm{T}}, constant::T, - ) wher {T} + ) where {T} The scalar-valued quadratic function ``\\frac{1}{2}x^\\top Q x + a^\\top x + b``, where: diff --git a/src/sets.jl b/src/sets.jl index ac45a49bae..a5361684c7 100644 --- a/src/sets.jl +++ b/src/sets.jl @@ -1402,7 +1402,7 @@ end The (vectorized) cone of Hermitian positive semidefinite matrices, with non-negative `side_dimension` rows and columns. -Becaue the matrix is Hermitian, the diagonal elements are real, and the +Because the matrix is Hermitian, the diagonal elements are real, and the complex-valued lower triangular entries are obtained as the conjugate of corresponding upper triangular entries. @@ -2424,7 +2424,7 @@ end CountGreaterThan(dimension::Int) The set ``\\{(c, y, x) \\in \\mathbb{Z}^{1+1+d}\\}``, such that `c` is strictly -greater than the number of occurences of `y` in `x` and `dimension = 1 + 1 + d`. +greater than the number of occurrences of `y` in `x` and `dimension = 1 + 1 + d`. ## Also known as