Name : perl-Algorithm-BIT-XS
| |
Version : 0.003
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 18:13:40
|
Group : Development/Libraries/Perl
| Source RPM : perl-Algorithm-BIT-XS-0.003-lp155.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
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/15.5/x86_64 |