class ReRooting(T, GraphType)
- ReRooting(T, GraphType)
 - Reference
 - Object
 
Overview
Example of T:
struct DP
  getter val : Int64, cnt : Int32
  def initialize
    @val, @cnt = 0i64, 0
  end
  def initialize(@val, @cnt)
  end
  def +(other : self) : self
    DP.new(val + other.val, cnt + other.cnt)
  end
  def add_root(v : Int32) : self
    DP.new(val + cnt, cnt + 1)
  end
end
  Defined in:
graph/re_rooting.crConstructors
Instance Method Summary
- #<<(*args, **options)
 - #<<(*args, **options, &)
 - #add_edges(*args, **options)
 - #add_edges(*args, **options, &)
 - #graph : GraphType
 - #size(*args, **options)
 - #size(*args, **options, &)
 - #solve : Array(T)