Skip to content

Commit 3c4b31b

Browse files
committed
Update batch_api.jl
1 parent fe12b7f commit 3c4b31b

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

src/nlp/batch_api.jl

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ abstract type AbstractBatchNLPModel{T,S,VI} end
2323

2424
"""
2525
bf = batch_obj(bnlp, bx)
26-
27-
The input `bx` contains `bnlp.nbatch` points stacked in a full strided (column-wise) layout.
28-
The output `bf` stores the objective value for each batch entry.
2926
"""
3027
function batch_obj(bnlp::AbstractBatchNLPModel{T, S}, bx::AbstractVector) where {T, S}
3128
@lencheck (bnlp.meta.nvar * bnlp.meta.nbatch) bx
@@ -36,17 +33,12 @@ end
3633

3734
"""
3835
bf = batch_obj!(bnlp, bx, bf)
39-
40-
Evaluate ``[ f(x₁) | f(x₂) | ... ]``, the objective function of `bnlp` at `bx = [ x₁ | x₂ | ... ]` in place.
41-
Both input `bx` and output `bf` follow a full strided (column-wise) batch layout.
4236
"""
4337
function batch_obj! end
4438

4539
"""
4640
bg = batch_grad(bnlp, bx)
4741
48-
Evaluate ``∇f(x)``, the gradient of the objective function at `bx`.
49-
The gradients are returned in a full strided (column-wise) layout, with one gradient vector per batch entry.
5042
This function is only available if `bnlp.meta.grad_available` is set to `true`.
5143
"""
5244
function batch_grad(bnlp::AbstractBatchNLPModel{T, S}, bx::AbstractVector) where {T, S}
@@ -59,18 +51,12 @@ end
5951
"""
6052
bg = batch_grad!(bnlp, bx, bg)
6153
62-
Evaluate ``∇f(bx)`` for a batch of points stored in `bx` in place.
63-
Both input `bx` and output `bg` use a full strided (column-wise) batch layout.
6454
This function is only available if `bbnlp.meta.grad_available` is set to `true`.
6555
"""
6656
function batch_grad! end
6757

6858
"""
6959
bc = batch_cons(bnlp, bx)
70-
71-
Evaluate ``c(x)``, the constraints at `x`.
72-
The constraints are returned in a full strided (column-wise) layout, with one constraint
73-
vector per batch entry.
7460
"""
7561
function batch_cons(bnlp::AbstractBatchNLPModel{T, S}, bx::AbstractVector) where {T, S}
7662
@lencheck (bnlp.meta.nvar * bnlp.meta.nbatch) bx
@@ -81,16 +67,12 @@ end
8167

8268
"""
8369
bc = batch_cons!(bnlp, bx, bc)
84-
85-
Evaluate ``c(x)``, the constraints at `x` in place.
86-
Both input `bx` and output `c` follow a full strided (column-wise) batch layout.
8770
"""
8871
function batch_cons! end
8972

9073
"""
9174
(jrows, jcols) = batch_jac_structure(bnlp)
9275
93-
Return the structure of the constraints Jacobian in sparse coordinate format.
9476
This function is only available if `bbnlp.meta.jac_available` is set to `true`.
9577
"""
9678
function batch_jac_structure(bnlp::AbstractBatchNLPModel{T, S, VI}) where {T, S, VI}
@@ -103,15 +85,13 @@ end
10385
"""
10486
(jrows, jcols) = batch_jac_structure!(bnlp, jrows, jcols)
10587
106-
Return the structure of the constraints Jacobian in sparse coordinate format in place.
10788
This function is only available if `bbnlp.meta.jac_available` is set to `true`.
10889
"""
10990
function batch_jac_structure! end
11091

11192
"""
11293
bjvals = batch_jac_coord(bnlp, bx)
11394
114-
Evaluate ``J(x)``, the constraints Jacobian at `x` in sparse coordinate format.
11595
This function is only available if `bbnlp.meta.jac_available` is set to `true`.
11696
"""
11797
function batch_jac_coord(bnlp::AbstractBatchNLPModel, bx::AbstractVector, bjvals::AbstractVector)
@@ -124,15 +104,13 @@ end
124104
"""
125105
bjvals = batch_jac_coord!(bnlp, bx, bjvals)
126106
127-
Evaluate ``J(x)``, the constraints Jacobian at `x` in sparse coordinate format, rewriting `vals`.
128107
This function is only available if `bbnlp.meta.jac_available` is set to `true`.
129108
"""
130109
function batch_jac_coord! end
131110

132111
"""
133112
bJv = batch_jprod(bnlp, bx, bv)
134113
135-
Evaluate ``J(x)v``, the Jacobian-vector product at `x`.
136114
This function is only available if `bbnlp.meta.jprod_available` is set to `true`.
137115
"""
138116
function batch_jprod(bnlp::AbstractBatchNLPModel{T, S}, bx::AbstractVector, bv::AbstractVector) where {T, S}
@@ -145,15 +123,13 @@ end
145123
"""
146124
bJv = batch_jprod!(bnlp, bx, bv, bJv)
147125
148-
Evaluate ``J(x)v``, the Jacobian-vector product at `x` in place.
149126
This function is only available if `bbnlp.meta.jprod_available` is set to `true`.
150127
"""
151128
function batch_jprod! end
152129

153130
"""
154131
bJtv = batch_jtprod(bnlp, bx, bv)
155132
156-
Evaluate ``J(x)^Tv``, the transposed-Jacobian-vector product at `x`.
157133
This function is only available if `bbnlp.meta.jtprod_available` is set to `true`.
158134
"""
159135
function batch_jtprod(bnlp::AbstractBatchNLPModel{T, S}, bx::AbstractVector, bv::AbstractVector) where {T, S}
@@ -167,16 +143,13 @@ end
167143
"""
168144
bJtv = batch_jtprod!(bnlp, bx, bv, Jtv)
169145
170-
Evaluate ``J(x)^Tv``, the transposed-Jacobian-vector product at `x` in place.
171-
If the problem has linear and nonlinear constraints, this function allocates.
172146
This function is only available if `bbnlp.meta.jtprod_available` is set to `true`.
173147
"""
174148
function batch_jtprod! end
175149

176150
"""
177151
(hrows, hcols) = batch_hess_structure(bnlp)
178152
179-
Return the structure of the Lagrangian Hessian in sparse coordinate format.
180153
This function is only available if `bbnlp.meta.hess_available` is set to `true`.
181154
"""
182155
function batch_hess_structure(bnlp::AbstractBatchNLPModel{T,S,VI}) where {T, S, VI}
@@ -189,18 +162,13 @@ end
189162
"""
190163
(hrows, hcols) = batch_hess_structure!(bnlp, hrows, hcols)
191164
192-
Return the structure of the Lagrangian Hessian in sparse coordinate format in place.
193165
This function is only available if `bbnlp.meta.hess_available` is set to `true`.
194166
"""
195167
function batch_hess_structure! end
196168

197169
"""
198170
bhvals = batch_hess_coord(bnlp, bx, by, bobj_weight)
199171
200-
Evaluate the Lagrangian Hessian at `(x,y)` in sparse coordinate format,
201-
with objective function scaled by `obj_weight`, i.e.,
202-
$(LAGRANGIAN_HESSIAN).
203-
Only the lower triangle is returned.
204172
This function is only available if `nlp.meta.hess_available` is set to `true`.
205173
"""
206174
function batch_hess_coord(
@@ -219,20 +187,13 @@ end
219187
"""
220188
bhvals = batch_hess_coord!(bnlp, bx, by, bobj_weight, bhvals)
221189
222-
Evaluate the Lagrangian Hessian at `(x,y)` in sparse coordinate format,
223-
with objective function scaled by `obj_weight`, i.e.,
224-
$(LAGRANGIAN_HESSIAN), overwriting `vals`.
225-
Only the lower triangle is returned.
226190
This function is only available if `bbnlp.meta.hess_available` is set to `true`.
227191
"""
228192
function batch_hess_coord! end
229193

230194
"""
231195
bHv = batch_hprod(bnlp, bx, by, bv, bobj_weight)
232196
233-
Evaluate the product of the objective Hessian at `x` with the vector `v`,
234-
with objective function scaled by `obj_weight`, where the objective Hessian is
235-
$(OBJECTIVE_HESSIAN).
236197
This function is only available if `bbnlp.meta.hprod_available` is set to `true`.
237198
"""
238199
function batch_hprod(
@@ -252,9 +213,6 @@ end
252213
"""
253214
bHv = batch_hprod!(bnlp, bx, by, bv, bobj_weight, bHv)
254215
255-
Evaluate the product of the objective Hessian at `x` with the vector `v` in
256-
place, with objective function scaled by `obj_weight`, where the objective Hessian is
257-
$(OBJECTIVE_HESSIAN).
258216
This function is only available if `bbnlp.meta.hprod_available` is set to `true`.
259217
"""
260218
function batch_hprod! end

0 commit comments

Comments
 (0)