Class IntSet
- All Implemented Interfaces:
Base
,Collection
,Number
,TemporalObject
``TextSet`` objects can be created with a single argument of type string as in MobilityDB.
>>> IntSet(string='{1, 3, 56}')
Another possibility is to create a ``TextSet`` object from a list of strings or integers.
>>> IntSet(elements=[1, '2', 3, '56'])
- Author:
- ARIJIT SAMAL
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
------------------------- Topological Operations --------------------------------jnr.ffi.Pointer
createInner
(jnr.ffi.Pointer inner) jnr.ffi.Pointer
createStringInner
(String str) float
/** Returns the distance between "this" and "other".element_n
(int n) Returns the n-th element in "this".elements()
Returns the last element in "this".jnr.ffi.Pointer
------------------------- Accessors -------------------------------------intersection
(Object other) Returns the intersection of "this" and "other".boolean
Returns whether "this" is strictly to the left of "other".boolean
is_over_or_left
(Object other) Returns whether "this" is to the left of "other" allowing overlap.boolean
is_over_or_right
(Object other) Returns whether "this" is to the right of "other" allowing overlap.boolean
Returns whether "this" is strictly to the right of "other".Returns the difference of "this" and "other".scale
(int width) Returns a new "IntSet" instance with all elements scaled to so that the encompassing span has width "width".shift
(int delta) Returns a new "IntSet" instance with all elements shifted by "delta".shift_scale
(int delta, int width) Returns a new "IntSet" instance with all elements shifted by "delta" and scaled to so that the encompassing span has width "width".Returns the first element in "this".jnr.ffi.Pointer
subtract_from
(int other) Returns the difference of "other" and "this".to_span()
Returns a span that encompasses "this".Returns a SpanSet that contains a Span for each element in "this".toString()
Return the string representation of the content of "this".Returns the union of "this" and "other".Methods inherited from class types.collections.base.Set
add, as_hexwkb, as_wkb, contains, copy, elements, eq, from_hexwkb, from_wkb, greaterThan, greaterThanOrEqual, hash, is_adjacent, is_contained_in, is_left, is_over_or_left, is_over_or_right, is_right, length, lessThan, lessThanOrEqual, mul, notEquals, num_elements, overlaps, rsub, sub, subtract_from, to_span, to_spanset
-
Field Details
-
_inner
private final jnr.ffi.Pointer _inner
-
-
Constructor Details
-
IntSet
public IntSet(jnr.ffi.Pointer inner) -
IntSet
-
-
Method Details
-
createStringInner
- Specified by:
createStringInner
in classSet<Integer>
-
createInner
public jnr.ffi.Pointer createInner(jnr.ffi.Pointer inner) - Specified by:
createInner
in classSet<Integer>
-
toString
Return the string representation of the content of "this".MEOS Functions:
- intset_out
-
to_spanset
Returns a SpanSet that contains a Span for each element in "this".MEOS Functions:
- set_to_spanset
- Returns:
- A new
IntSpanSet
instance
-
to_span
Returns a span that encompasses "this".MEOS Functions:
- set_span
- Returns:
- A
IntSpan
instance
-
to_floatset
-
get_inner
public jnr.ffi.Pointer get_inner()------------------------- Accessors ------------------------------------- -
start_element
Returns the first element in "this".MEOS Functions:
- intset_start_value
- Specified by:
start_element
in classSet<Integer>
- Returns:
- A
Integer
instance
-
end_element
Returns the last element in "this".MEOS Functions:
- intset_end_value
- Specified by:
end_element
in classSet<Integer>
- Returns:
- A
Integer
instance
-
element_n
Description copied from class:Set
Returns the n-th element in "this". -
elements
-
shift
Returns a new "IntSet" instance with all elements shifted by "delta".MEOS Functions:
- intset_shift_scale
- Parameters:
delta
- The value to shift by.- Returns:
- A new
IntSet
instance
-
scale
Returns a new "IntSet" instance with all elements scaled to so that the encompassing span has width "width".MEOS Functions:
- intset_shift_scale
- Parameters:
width
- The new width.- Returns:
- A new
IntSet
instance
-
shift_scale
Returns a new "IntSet" instance with all elements shifted by "delta" and scaled to so that the encompassing span has width "width".MEOS Functions:
- intset_shift_scale
- Parameters:
delta
- The value to shift by.width
- The new width.- Returns:
- A new
IntSet
instance
-
contains
------------------------- Topological Operations --------------------------------- Throws:
Exception
-
is_left
Returns whether "this" is strictly to the left of "other". That is, "this" ends before "other" starts.MEOS Functions:
- left_set_set
- left_intset_int
- Parameters:
other
- object to compare with- Returns:
- True if left, False otherwise
- Throws:
Exception
-
is_over_or_left
Returns whether "this" is to the left of "other" allowing overlap. That is, "this" ends before "other" ends (or at the same value).MEOS Functions:
- overleft_set_set
- overleft_intset_int
- Parameters:
other
- object to compare with- Returns:
- True if is over or left, False otherwise
- Throws:
Exception
-
is_right
Returns whether "this" is strictly to the right of "other". That is, "this" ends after "other" starts.MEOS Functions:
- right_set_set
- right_intset_int
- Parameters:
other
- object to compare with- Returns:
- True if right, False otherwise
- Throws:
Exception
-
is_over_or_right
Returns whether "this" is to the right of "other" allowing overlap. That is, "this" starts before "other" ends (or at the same value).MEOS Functions:
- overright_set_set
- overright_intset_int
- Parameters:
other
- object to compare with- Returns:
- True if is over or right, False otherwise
- Throws:
Exception
-
intersection
Returns the intersection of "this" and "other".MEOS Functions:
- intersection_set_set
- intersection_intset_int
-
minus
Returns the difference of "this" and "other".MEOS Functions:
- minus_set_set
- minus_intset_int
-
subtract_from
public jnr.ffi.Pointer subtract_from(int other) Returns the difference of "other" and "this".MEOS Functions:
- minus_int_intset
-
union
Returns the union of "this" and "other".MEOS Functions:
- union_set_set
- union_intset_int
-
distance
/** Returns the distance between "this" and "other".MEOS functions:
- distance_intset_int
- Parameters:
other
- object to compare with- Returns:
- A float value
- Throws:
Exception
-