@@ -46,7 +46,7 @@ function MA.isequal_canonical(
4646 )
4747end
4848
49- function MA. iszero! (f:: TypedScalarLike )
49+ function MA. iszero!! (f:: TypedScalarLike )
5050 return iszero (MOI. constant (f)) && _is_constant (canonicalize! (f))
5151end
5252
@@ -103,15 +103,15 @@ function MA.promote_operation(
103103 return promote_operation (op, G, F, G)
104104end
105105
106- function MA. mutable_operate ! (
106+ function MA. operate ! (
107107 op:: Union{typeof(zero),typeof(one)} ,
108108 f:: MOI.ScalarAffineFunction ,
109109)
110110 empty! (f. terms)
111111 f. constant = op (f. constant)
112112 return f
113113end
114- function MA. mutable_operate ! (
114+ function MA. operate ! (
115115 op:: Union{typeof(zero),typeof(one)} ,
116116 f:: MOI.ScalarQuadraticFunction ,
117117)
@@ -121,34 +121,34 @@ function MA.mutable_operate!(
121121 return f
122122end
123123
124- function MA. mutable_operate ! (:: typeof (- ), f:: MOI.ScalarQuadraticFunction )
124+ function MA. operate ! (:: typeof (- ), f:: MOI.ScalarQuadraticFunction )
125125 operate_terms! (- , f. quadratic_terms)
126126 operate_terms! (- , f. affine_terms)
127127 f. constant = - f. constant
128128 return f
129129end
130- function MA. mutable_operate ! (:: typeof (- ), f:: MOI.ScalarAffineFunction )
130+ function MA. operate ! (:: typeof (- ), f:: MOI.ScalarAffineFunction )
131131 operate_terms! (- , f. terms)
132132 f. constant = - f. constant
133133 return f
134134end
135- function MA. mutable_operate ! (
135+ function MA. operate ! (
136136 op:: Union{typeof(+),typeof(-)} ,
137137 f:: MOI.ScalarAffineFunction{T} ,
138138 g:: T ,
139139) where {T}
140140 f. constant = op (f. constant, g)
141141 return f
142142end
143- function MA. mutable_operate ! (
143+ function MA. operate ! (
144144 op:: Union{typeof(+),typeof(-)} ,
145145 f:: MOI.ScalarAffineFunction{T} ,
146146 g:: MOI.VariableIndex ,
147147) where {T}
148148 push! (f. terms, MOI. ScalarAffineTerm (op (one (T)), g))
149149 return f
150150end
151- function MA. mutable_operate_to ! (
151+ function MA. operate_to ! (
152152 output:: MOI.ScalarAffineFunction{T} ,
153153 op:: Union{typeof(+),typeof(-)} ,
154154 f:: MOI.ScalarAffineFunction{T} ,
@@ -160,7 +160,7 @@ function MA.mutable_operate_to!(
160160 output. constant = op (f. constant, g. constant)
161161 return output
162162end
163- function MA. mutable_operate_to ! (
163+ function MA. operate_to ! (
164164 output:: MOI.ScalarQuadraticFunction{T} ,
165165 op:: Union{typeof(+),typeof(-)} ,
166166 f:: MOI.ScalarQuadraticFunction{T} ,
@@ -175,7 +175,7 @@ function MA.mutable_operate_to!(
175175 output. constant = op (f. constant, g. constant)
176176 return output
177177end
178- function MA. mutable_operate ! (
178+ function MA. operate ! (
179179 op:: Union{typeof(+),typeof(-)} ,
180180 f:: MOI.ScalarAffineFunction{T} ,
181181 g:: MOI.ScalarAffineFunction{T} ,
@@ -184,23 +184,23 @@ function MA.mutable_operate!(
184184 f. constant = op (f. constant, g. constant)
185185 return f
186186end
187- function MA. mutable_operate ! (
187+ function MA. operate ! (
188188 op:: Union{typeof(+),typeof(-)} ,
189189 f:: MOI.ScalarQuadraticFunction{T} ,
190190 g:: T ,
191191) where {T}
192192 f. constant = op (f. constant, g)
193193 return f
194194end
195- function MA. mutable_operate ! (
195+ function MA. operate ! (
196196 op:: Union{typeof(+),typeof(-)} ,
197197 f:: MOI.ScalarQuadraticFunction{T} ,
198198 g:: MOI.VariableIndex ,
199199) where {T}
200200 push! (f. affine_terms, MOI. ScalarAffineTerm (op (one (T)), g))
201201 return f
202202end
203- function MA. mutable_operate ! (
203+ function MA. operate ! (
204204 op:: Union{typeof(+),typeof(-)} ,
205205 f:: MOI.ScalarQuadraticFunction{T} ,
206206 g:: MOI.ScalarAffineFunction{T} ,
@@ -209,7 +209,7 @@ function MA.mutable_operate!(
209209 f. constant = op (f. constant, g. constant)
210210 return f
211211end
212- function MA. mutable_operate ! (
212+ function MA. operate ! (
213213 op:: Union{typeof(+),typeof(-)} ,
214214 f:: MOI.ScalarQuadraticFunction{T} ,
215215 g:: MOI.ScalarQuadraticFunction{T} ,
@@ -320,7 +320,7 @@ function _add_sub_affine_terms(
320320 return _add_sub_affine_terms (op, terms, α * β, args... )
321321end
322322
323- function MA. mutable_operate ! (
323+ function MA. operate ! (
324324 op:: MA.AddSubMul ,
325325 f:: MOI.ScalarAffineFunction{T} ,
326326 args:: Vararg{ScalarAffineLike{T},N} ,
@@ -409,7 +409,7 @@ function _num_function_with_terms(
409409) where {T,N}
410410 return _num_function_with_terms (T, f) + _num_function_with_terms (T, args... )
411411end
412- function MA. mutable_operate ! (
412+ function MA. operate ! (
413413 op:: MA.AddSubMul ,
414414 f:: MOI.ScalarQuadraticFunction{T} ,
415415 args:: Vararg{ScalarQuadraticLike{T},N} ,
@@ -420,15 +420,15 @@ function MA.mutable_operate!(
420420 _add_quadratic_terms (MA. add_sub_op (op), f. quadratic_terms, args... )
421421 return f
422422 else
423- return MA. mutable_operate ! (MA. add_sub_op (op), f, * (args... ))
423+ return MA. operate ! (MA. add_sub_op (op), f, * (args... ))
424424 end
425425end
426426# `args` could be `(x', a)` where `a` is a vector of constants and `x` a vector
427427# of affine functions for instance.
428- function MA. mutable_operate ! (
428+ function MA. operate ! (
429429 op:: MA.AddSubMul ,
430430 f:: TypedScalarLike ,
431431 args:: Vararg{Any,N} ,
432432) where {N}
433- return MA. mutable_operate ! (MA. add_sub_op (op), f, * (args... ))
433+ return MA. operate ! (MA. add_sub_op (op), f, * (args... ))
434434end
0 commit comments