Handbook
Glossary
equiv-set-size ( a disjoint-set -- n )
Factor handbook
»
The language
»
Collections
»
Disjoint sets
Prev:
equiv? ( a b disjoint-set -- ? )
Next:
add-atom ( a disjoint-set -- )
Vocabulary
disjoint-sets
Inputs
a
an
object
disjoint-set
a
disjoint-set
Outputs
n
an
integer
Word description
Outputs the number of elements in the equivalence class of
a
.
Definition
IN:
disjoint-sets
GENERIC:
equiv-set-size
( a disjoint-set -- n )
Methods
USING:
accessors
assocs
disjoint-sets
kernel
;
M:
disjoint-set
equiv-set-size
[
representative
]
keep
counts>>
at
;