Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

ps_set

container.ps_set

§
(K 
type
)
:
Set K
 is
 
[Private constructor]
 
[Module base]

ps_set -- a partially sorted set based on ps_map

ps_set is a persistent set of ordered values. This set is generally
well-behaved with respect to cumulative and average performance.

WARNING: Due to the high worst-case time for addition, this structure should
not be used in situations when adding a single element repeatedly to the same
instance of ps_set is performance critical. If the resulting set's size n is a
power of 2, this will trigger the worst-case addition time resulting in
O(m*n log² n) for adding an element m times.

Type Parameters

§
K
:
Any 
[Private constructor]
 
[Module base]

Functions

group the elements of this sequence by a key of type K

f determines the key of an element