klaudiosinani / dsforest

Disjoint-set forests for ES6
MIT License
16 stars 0 forks source link

Add new `DisjointSet#isSingleton(value)` predicate class method (#3) #12

Closed klaudiosinani closed 5 years ago

klaudiosinani commented 5 years ago

Description

The PR introduces the following new unary predicate method:

Determines whether the given element value is part of a singleton disjoint-set, a set of size 1 with value as its representative element, returning true or false as appropriate.

Also, the corresponding TypeScript ambient declarations are included in the PR.