README
Top Level Namespace
Array
AsciiBinaryTree
Barrett
BigFloat
BigFloat
BinaryHeap
BinaryTree
EmptyError
BipartiteMatching
Combination
Comparable
CulSum
CulSum2D
DiGraph
DP
DynamicMint
Mint
Enumerable
EulerTourForVertex
FenwickTree
GCD
Geometric
Circle
Line
Polygon
Segment
Vec2
Graph
Imos
Imos2D
ImosLinear
Indexable
Int
Iterator
LCA
Math
Matrix
Mint
Mint2
ModInt
MultiSet
NTT
PartiallyPersistentUnionFind
PersistentArray
PersistentUnionFind
Point
Prime
PythagoreanTriples
ReRooting
RollingHash
Scanner
SCC
Sieve
SieveFast
SlopeTrick
SMultiSet
Bucket
RedBlackTree
NilNode
Node
Color
Treap
NilNode
Node
SSet
Bucket
RedBlackTree
NilNode
Node
Color
Treap
NilNode
Node
String
TreeNilNode
TreeNode
Tuple
UnGraph
UnionFind
UnweightedDiGraph
UnweightedEdge
UnweightedEdge2
UnweightedUnGraph
WeightedEdge
WeightedEdge2
class
UnionFind
UnionFind
Reference
Object
Defined in:
datastructure/union_find.cr
Constructors
.new
(n : Int, edges : Enumerable(Tuple(Int32, Int32)))
.new
(n : Int)
Instance Method Summary
#count_components
: Int32
#groups
#root
(x : Int)
#same?
(x : Int, y : Int)
#size
(x : Int)
#unite
(x : Int, y : Int)
Constructor Detail
def self.
new
(n :
Int
, edges :
Enumerable
(
Tuple
(Int32, Int32)))
#
[
View source
]
def self.
new
(n :
Int
)
#
[
View source
]
Instance Method Detail
def
count_components
: Int32
#
[
View source
]
def
groups
#
[
View source
]
def
root
(x :
Int
)
#
[
View source
]
def
same?
(x :
Int
, y :
Int
)
#
[
View source
]
def
size
(x :
Int
)
#
[
View source
]
def
unite
(x :
Int
, y :
Int
)
#
[
View source
]