Add 2D binary indexed trees
[algorithm-bit-xs.git] / lib / Algorithm / BIT / XS.pm
index d9a8f4ba4d1a04f60e23a411c708f60663414f5f..42591f360956d7aa625ee51008003b6bd8f58805 100644 (file)
@@ -21,7 +21,7 @@ sub get {
 
 sub set {
        my ($b, $idx, $value) = @_;
-       $b->update($idx, $value - $b->get($idx, $value))
+       $b->update($idx, $value - $b->get($idx))
 }
 
 1;
@@ -93,7 +93,7 @@ Sets I<$bit>[I<$idx>] to I<$value>.
 
 =head1 SEE ALSO
 
-L<Algorithm::BIT>, L<https://en.wikipedia.org/wiki/Fenwick_tree>
+L<Algorithm::BIT>, L<Algorithm::BIT2D::XS>, L<https://en.wikipedia.org/wiki/Fenwick_tree>
 
 =head1 AUTHOR
 
This page took 0.009648 seconds and 4 git commands to generate.