Appearance
meos.js / MeosSet
Abstract Class: MeosSet<T>
Defined in: core/types/collections/base/MeosSet.ts:43
Abstract base class for all MEOS set types (ordered sets of discrete values).
A set holds a finite, sorted collection of distinct values of the same type.
Concrete subclasses: IntSet, FloatSet, DateSet, TsTzSet.
Remarks
Every set object wraps a WASM heap pointer and must be released with free (or a using declaration) when no longer needed.
Extended by
Type Parameters
T
T
The element type (e.g. number for IntSet, DateADT for DateSet).
Constructors
Constructor
ts
new MeosSet<T>(inner): MeosSet<T>;Defined in: core/types/collections/base/MeosSet.ts:46
Parameters
inner
number
Returns
MeosSet<T>
Accessors
inner
Get Signature
ts
get inner(): number;Defined in: core/types/collections/base/MeosSet.ts:58
Raw WASM heap pointer. Do not free this value directly; use free.
Returns
number
Methods
[dispose]()
ts
dispose: void;Defined in: core/types/collections/base/MeosSet.ts:68
Implements the using resource-management protocol — calls free automatically.
Returns
void
asHexWKB()
ts
asHexWKB(variant?): string;Defined in: core/types/collections/base/MeosSet.ts:91
Serialises this set to a hex-encoded WKB string.
Parameters
variant?
number = 4
WKB encoding variant (default 4 = Extended WKB).
Returns
string
contains()
ts
contains(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:147
true if this contains every element of other.
Parameters
other
this
Returns
boolean
copy()
ts
copy(): this;Defined in: core/types/collections/base/MeosSet.ts:76
Returns a deep copy of this set. The caller is responsible for calling free on the returned copy.
Returns
this
distance()
ts
abstract distance(other): number;Defined in: core/types/collections/base/MeosSet.ts:195
Returns the distance between this and other. Returns 0 if they share at least one element. The unit depends on the concrete type.
Parameters
other
this
Returns
number
endValue()
ts
abstract endValue(): T;Defined in: core/types/collections/base/MeosSet.ts:129
Returns the largest (last) value in the set.
Returns
T
eq()
ts
eq(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:232
true if this and other contain the same elements.
Parameters
other
this
Returns
boolean
free()
ts
free(): void;Defined in: core/types/collections/base/MeosSet.ts:63
Releases the WASM-allocated memory. Must be called when the object is no longer needed.
Returns
void
ge()
ts
ge(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:257
true if this is greater than or equal to other in MEOS total ordering.
Parameters
other
this
Returns
boolean
gt()
ts
gt(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:252
true if this is strictly greater than other in MEOS total ordering.
Parameters
other
this
Returns
boolean
hash()
ts
hash(): number;Defined in: core/types/collections/base/MeosSet.ts:105
32-bit integer hash of this set.
Returns
number
intersection()
ts
intersection(other): MeosSet<T> | null;Defined in: core/types/collections/base/MeosSet.ts:205
Returns the intersection of this and other, or null if they are disjoint. The caller is responsible for calling free on the result.
Parameters
other
this
Returns
MeosSet<T> | null
isAfter()
ts
isAfter(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:174
true if every element of this is strictly greater than every element of other.
Parameters
other
this
Returns
boolean
isBefore()
ts
isBefore(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:161
true if every element of this is strictly less than every element of other.
Parameters
other
this
Returns
boolean
isContainedIn()
ts
isContainedIn(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:142
true if this is entirely contained within other (every element of this is in other).
Parameters
other
this
Returns
boolean
isOverOrAfter()
ts
isOverOrAfter(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:182
true if this does not extend to the left of other (i.e. min(this) ≥ min(other)).
Parameters
other
this
Returns
boolean
isOverOrBefore()
ts
isOverOrBefore(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:169
true if this does not extend to the right of other (i.e. max(this) ≤ max(other)).
Parameters
other
this
Returns
boolean
le()
ts
le(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:247
true if this is less than or equal to other in MEOS total ordering.
Parameters
other
this
Returns
boolean
lt()
ts
lt(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:242
true if this is strictly less than other in MEOS total ordering.
Parameters
other
this
Returns
boolean
minus()
ts
minus(other): MeosSet<T> | null;Defined in: core/types/collections/base/MeosSet.ts:214
Returns the part of this not in other, or null if the result is empty. The caller is responsible for calling free on the result.
Parameters
other
this
Returns
MeosSet<T> | null
ne()
ts
ne(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:237
true if this and other differ in at least one element.
Parameters
other
this
Returns
boolean
numValues()
ts
numValues(): number;Defined in: core/types/collections/base/MeosSet.ts:100
Number of elements in this set.
Returns
number
overlaps()
ts
overlaps(other): boolean;Defined in: core/types/collections/base/MeosSet.ts:152
true if this and other share at least one element.
Parameters
other
this
Returns
boolean
startValue()
ts
abstract startValue(): T;Defined in: core/types/collections/base/MeosSet.ts:126
Returns the smallest (first) value in the set.
Returns
T
toSpan()
ts
toSpan(): number;Defined in: core/types/collections/base/MeosSet.ts:113
Returns the bounding span of this set as a raw WASM pointer. Use the appropriate Span constructor to obtain a typed object.
Returns
number
toSpanSet()
ts
toSpanSet(): number;Defined in: core/types/collections/base/MeosSet.ts:121
Returns this set converted to a SpanSet as a raw WASM pointer. Use the appropriate SpanSet constructor to obtain a typed object.
Returns
number
toString()
ts
abstract toString(): string;Defined in: core/types/collections/base/MeosSet.ts:85
Returns the WKT string representation (e.g. {1, 3, 7}).
Returns
string
union()
ts
union(other): this;Defined in: core/types/collections/base/MeosSet.ts:223
Returns the union of this and other. The caller is responsible for calling free on the result.
Parameters
other
this
Returns
this
valueN()
ts
abstract valueN(n): T | null;Defined in: core/types/collections/base/MeosSet.ts:135
Returns the n-th value (0-based index).
Parameters
n
number
0-based index (MEOS internally uses 1-based indexing).
Returns
T | null