Kyopro Library
 
読み取り中…
検索中…
一致する文字列を見つけられません
SegmentTree2D< Monoid > 構造体テンプレート

#include "segtree_2d.hpp"

公開型

using Type = Monoid::Type
 

公開メンバ関数

 SegmentTree2D ()=default
 
 SegmentTree2D (int h, int w)
 サイズ h * w の2次元セグメント木を構築する
 
void set (int x, int y, Type v)
 位置 (x, y) の要素を v に更新する
 
Type fold (int l, int r, int u, int d)
 矩形領域 [l, r) × [u, d) のモノイド積を返す
 

詳解

template<typename Monoid>
struct SegmentTree2D< Monoid >

segtree_2d.hpp4 行目に定義があります。

型定義メンバ詳解

◆ Type

template<typename Monoid>
using SegmentTree2D< Monoid >::Type = Monoid::Type

segtree_2d.hpp5 行目に定義があります。

構築子と解体子

◆ SegmentTree2D() [1/2]

template<typename Monoid>
SegmentTree2D< Monoid >::SegmentTree2D ( )
default

◆ SegmentTree2D() [2/2]

template<typename Monoid>
SegmentTree2D< Monoid >::SegmentTree2D ( int h,
int w )
inline

サイズ h * w の2次元セグメント木を構築する

segtree_2d.hpp10 行目に定義があります。

関数詳解

◆ set()

template<typename Monoid>
void SegmentTree2D< Monoid >::set ( int x,
int y,
Type v )
inline

位置 (x, y) の要素を v に更新する

覚え書き
O(log(h) log(w))

segtree_2d.hpp17 行目に定義があります。

◆ fold()

template<typename Monoid>
Type SegmentTree2D< Monoid >::fold ( int l,
int r,
int u,
int d )
inline

矩形領域 [l, r) × [u, d) のモノイド積を返す

覚え書き
O(log(h) log(w))

segtree_2d.hpp29 行目に定義があります。


この構造体詳解は次のファイルから抽出されました: