Skip to content

Commit d84c863

Browse files
committed
Add constructors
1 parent f05415c commit d84c863

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/pyoptinterface/nlcore.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,21 @@ struct ConstantDelta
301301
{
302302
double c;
303303
size_t yi;
304+
ConstantDelta() = default;
305+
ConstantDelta(double c_, size_t yi_) : c(c_), yi(yi_)
306+
{
307+
}
304308
};
305309

306310
struct AffineDelta
307311
{
308312
double c;
309313
size_t xi;
310314
size_t yi;
315+
AffineDelta() = default;
316+
AffineDelta(double c_, size_t xi_, size_t yi_) : c(c_), xi(xi_), yi(yi_)
317+
{
318+
}
311319
};
312320

313321
size_t add_gradient_column(size_t column, size_t &gradient_nnz, std::vector<size_t> &gradient_cols,

0 commit comments

Comments
 (0)