差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン | 次のリビジョン両方とも次のリビジョン | ||
programming_algorithm:data_structure:binary_indexed_tree [2020/12/13] – [より柔軟な実装] ikatakos | programming_algorithm:data_structure:binary_indexed_tree [2020/12/13] – [より柔軟な実装] ikatakos | ||
---|---|---|---|
行 90: | 行 90: | ||
self.func = func | self.func = func | ||
self.idf = identity_factory | self.idf = identity_factory | ||
+ | self.depth = n.bit_length() | ||
def add(self, i, x): | def add(self, i, x): |