Name : perl-Algorithm-BIT-XS
| |
Version : 0.003
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.85
| Date : 2024-08-28 23:35:54
|
Group : Development/Libraries/Perl
| Source RPM : perl-Algorithm-BIT-XS-0.003-1.85.src.rpm
|
Size : 0.03 MB
| |
Packager : (none)
| |
Summary : Binary indexed trees / Fenwick trees
|
Description :
A binary indexed tree is a data structure similar to an array of integers. The two main operations are updating an element and calculating a prefix sum, both of which run in time logarithmic in the size of the tree.
* Algorithm::BIT::XS->*new*(_$len_)
Create a new binary indexed tree of length _$len_. As binary indexed trees are 1-indexed, its indexes are [1.._$len_]. It is initially filled with zeroes.
* $bit->*clear*()
Clears the binary indexed tree (sets all elements to 0).
* $bit->*query*(_$idx_)
Returns the prefix sum _$bit_[1] + _$bit_[2] + ... + _$bit_[_$idx_].
* $bit->*update*(_$idx_, _$value_)
Adds _$value_ to _$bit_[_$idx_].
* $bit->*get*(_$idx_)
Returns the value of _$bit_[_$idx_].
* $bit->*set*(_$idx_, _$value_)
Sets _$bit_[_$idx_] to _$value_.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/openSUSE_Tumbleweed/x86_64 |