Calculating the worst case fulfillment length

There was some discussion about how to calculate the worst case scenario
for the length of a threshold fulfillment, given the subconditions' weights
and max lengths.

Here's an algorithm that finds the worst case length relatively
efficiently: https://gist.github.com/emschwartz/844b088c51367b51aff1

Stefan is working on some optimizations that avoid array slicing for the
actual implementation, but this gives the general idea.

-- 
Evan Schwartz | Software Architect | Ripple
[image: ripple.com] <http://ripple.com>

Received on Thursday, 24 March 2016 00:01:13 UTC