Skip to content

Commit a92e2bd

Browse files
committed
Modified arg types for `NumberNode::bound_axis_sums()
Added a `const` to `State& state`.
1 parent e88a41f commit a92e2bd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

dwave/optimization/include/dwave-optimization/nodes/numbers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class NumberNode : public ArrayOutputMixin<ArrayNode>, public DecisionNode {
157157
/// Return the state-dependent sum of the values within each slice
158158
/// along each bound axis. The returned vector is indexed by the
159159
/// bound axes in the same ordering that `axis_wise_bounds()` returns.
160-
const std::vector<std::vector<double>>& bound_axis_sums(State& state) const;
160+
const std::vector<std::vector<double>>& bound_axis_sums(const State& state) const;
161161

162162
protected:
163163
explicit NumberNode(std::span<const ssize_t> shape, std::vector<double> lower_bound,

dwave/optimization/src/nodes/numbers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ const std::vector<NumberNode::AxisBound>& NumberNode::axis_wise_bounds() const {
448448
return bound_axes_info_;
449449
}
450450

451-
const std::vector<std::vector<double>>& NumberNode::bound_axis_sums(State& state) const {
451+
const std::vector<std::vector<double>>& NumberNode::bound_axis_sums(const State& state) const {
452452
return data_ptr<NumberNodeStateData>(state)->bound_axes_sums;
453453
}
454454

0 commit comments

Comments
 (0)