MCPcopy
hub / github.com/openai/baselines / sum

Method sum

baselines/common/segment_tree.py:101–103  ·  view source on GitHub ↗

Returns arr[start] + ... + arr[end]

(self, start=0, end=None)

Source from the content-addressed store, hash-verified

99 )
100
101 def sum(self, start=0, end=None):
102 """Returns arr[start] + ... + arr[end]"""
103 return super(SumSegmentTree, self).reduce(start, end)
104
105 def find_prefixsum_idx(self, prefixsum):
106 """Find the highest index `i` in the array such that

Callers 15

find_prefixsum_idxMethod · 0.95
test_tree_setFunction · 0.95
test_tree_set_overlapFunction · 0.95
learnFunction · 0.80
add_all_summaryMethod · 0.80
_sample_proportionalMethod · 0.80
sampleMethod · 0.80
updateMethod · 0.80
dict_gatherFunction · 0.80
_initializerFunction · 0.80
__init__Method · 0.80
updateMethod · 0.80

Calls 1

reduceMethod · 0.80

Tested by 2

test_tree_setFunction · 0.76
test_tree_set_overlapFunction · 0.76