class Crystalg::DataStructures::LinkCutTree(T)

Overview

EXPERIMENTAL

Defined in:

crystalg/data_structures/link_cut_tree.cr

Constant Summary

INF = Int32::MAX

Constructors

Instance Method Summary

Constructor Detail

def self.new(size) #

[View source]

Instance Method Detail

def add(from : NodeID, to : NodeID, v : Int32) #

[View source]
def add(id : NodeID, val : Int32) #

[View source]
def connected?(x : NodeID, y : NodeID) #

[View source]
def cut(id : NodeID) : Nil #

[View source]
def evert(par : NodeID) : Nil #

[View source]
def find_root(id : NodeID) : NodeID #

[View source]
def lca(ch : NodeID, par : NodeID) : NodeID | Nil #

[View source]
def link(ch : NodeID, par : NodeID) : Nil #

[View source]
def min(from : NodeID, to : NodeID) : Int32 #

[View source]
def min_id(id : NodeID) : Int32 #

[View source]
def root?(id : NodeID) #

[View source]