Skip to content

Conversation

@fastbodin
Copy link
Contributor

@fastbodin fastbodin commented Jan 30, 2026

Do not merge. Draft PR. Only C++ has been implemented. Simply checking CircleCi.

@fastbodin fastbodin force-pushed the enhancement/axis_wise_bounds_numbernode branch from 31319bc to bebd145 Compare January 30, 2026 22:48
Data is stored at C++ level with the class `AxisBoundInfo` as private
attribute to `NumberNode`. Added relevant C++ tests.
For each bound axis and each hyperslice along said axis, we store the
running sum of the values within the hyperslice. This state dependant
data is stored via `NumberNodeStateData`. If `NumberNode` is initialized
with values, we check that all axis-wise bounds are satisfied.
Added satisfies_axis_wise_bounds(), update_bound_axis_slice_sums(),
axis_wise_bounds(), and bound_axis_sums() to NumberNode. Updated various
NumberNode, IntegerNode, and BinaryNode methods to reference
NumberNodeStateData as opposed to ArrayNodeStateData. Updated all
NumberNode mutate methods to reflect changes to the axis-wise bound
running sums. Added C++ tests to check said mutate methods on
BinaryNode and IntegerNode.
Make use of BufferIterators to compute the sum of the values within each
hyperslice along each bound axis as opposed making a custom method to do
this.
Defined method to initialize_state() given exactly one axis-wise bound.
Fill state with lower bounds and increment until state satisfies
axis-wise bounds or determines infeasible. Added appropriate C++
IntegerNode and BinaryNode tests.
Made BoundAxisInfo and BoundAxisOperators members of NumberNode. Updated
all C++ tests. Optimized BufferIterator use in initialize_state().
Improved comments. Improved methods. Cleaned up C++ tests.
Added static_casts where necessary for CircleCI.
When constructing a state that satisfies exactly one axis-wise bound.
Needed for Cython interface. Changed relevant C++ code.
Used aliases in C++ NumberNode tests.
Also made BoundAxisOperaters an `enum` as opposed
to `enum class` because we found a Cython workaround.
@fastbodin fastbodin force-pushed the enhancement/axis_wise_bounds_numbernode branch from bebd145 to 15f7b67 Compare February 3, 2026 23:11
@fastbodin
Copy link
Contributor Author

Feature is fully implemented.

Previously accepted list of tuples and list of lists.
Now simply list of tuples for consistency.
@fastbodin fastbodin force-pushed the enhancement/axis_wise_bounds_numbernode branch from e3b0255 to 1c177b4 Compare February 4, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant