src/cplib/collections/lazysegtree_static_op

  Source   Edit

Types

LazySegmentTree[S; F; p] = ref object
  default: S
  arr*: seq[S]
  lazy*: seq[F]
  hasLazy: seq[bool]
  lastnode: int
  log: int
  length: int
  Source   Edit

Procs

proc `$`[ST: LazySegmentTree](self: var ST): string
  Source   Edit
proc `[]=`[ST: LazySegmentTree](self: var ST; p: Natural; val: ST.S)
  Source   Edit
proc `[]`[ST: LazySegmentTree](self: var ST; p: Natural): ST.S
  Source   Edit
proc `[]`[ST: LazySegmentTree](self: var ST; segment: HSlice[int, int]): ST.S
  Source   Edit
proc apply[ST: LazySegmentTree](self: var ST; q_left, q_right: int; f: ST.F)
半開区間[q_left,q_right)にfを作用させます。   Source   Edit
proc apply[ST: LazySegmentTree](self: var ST; segment: HSlice[int, int]; f: ST.F)
  Source   Edit
proc get[ST: LazySegmentTree](self: var ST; q_left, q_right: int): ST.S
半開区間[q_left,q_right)についての演算結果を返します。   Source   Edit
proc get[ST: LazySegmentTree](self: var ST; segment: HSlice[int, int]): ST.S
  Source   Edit
proc len[ST: LazySegmentTree](self: var ST): int
  Source   Edit
proc update[ST: LazySegmentTree](self: var ST; p: Natural; val: ST.S)
pの要素をvalに変更します。   Source   Edit

Templates

template initLazySegmentTree[S, F](v_or_n: seq[S] or int; merge: untyped;
                                   default: S; mapping: untyped;
                                   composition: untyped; id: F): untyped
  Source   Edit
template newLazySegWith(v_or_n, merge, default, mapping, composition, id: untyped): untyped
  Source   Edit