Package types.basic.tnumber
Interface TNumber
- All Known Implementing Classes:
TFloatInst
,TFloatSeq
,TFloatSeqSet
,TIntInst
,TIntSeq
,TIntSeqSet
public interface TNumber
Base interface that encompasses the Temporal float and Temporal integer interfaces.
- Author:
- ARIJIT SAMAL
-
Method Summary
Modifier and TypeMethodDescriptiondefault TNumber
Returns a new temporal object with the values of `self` plus `other`.default TNumber
Returns a new temporal object with the values of `self` multiplied by `other`.default TNumber
Returns a new temporal object with the values of `self` plus `other`.default TNumber
Returns a new temporal object with the values of `self` multiplied by `other`.default TNumber
Returns a new temporal object with the values of `other` minus `self`.default TNumber
Returns a new temporal object with the values of `other` divided by `self`.default TNumber
Returns a new temporal object with the values of `self` minus `other`.default TNumber
Returns a new temporal object with the values of `self` divided by `other`.default TNumber
abs()
Returns the absolute value of "this".default TNumber
Returns a new temporal object with the values of "this" plus "other".default TNumber
Returns a new temporal object with the values of "this" restricted to the value or time "other".default TBox
Returns the bounding box of "this".private jnr.ffi.Pointer
createEmptyPointerArray
(jnr.ffi.Runtime runtime, int size) Splits `self` into fragments with respect to value buckets Args: start: Start value of the first value bucket.default TNumber
Returns the value difference between consecutive instants of "this".default TFloat
Returns the temporal distance between "this" and "other".default TNumber
Returns a new temporal object with the values of "this" divided by "other".jnr.ffi.Pointer
default float
integral()
Returns the integral of "this".default boolean
is_left
(TemporalObject other) Returns whether the bounding box of "this" is left to the bounding box of "other".default boolean
is_over_or_left
(TemporalObject other) Returns whether the bounding box of "this" is over or left to the bounding box of "other".default boolean
is_over_or_right
(TemporalObject other) Returns whether the bounding box of "this" is over or right to the bounding box of "other".default boolean
is_right
(TemporalObject other) Returns whether the bounding box of "this" is right to the bounding box of "other".default TNumber
Returns a new temporal object with the values of "this" restricted to the complement of the value or time "other".default TNumber
Returns a new temporal object with the values of "this" multiplied by "other".default float
nearest_approach_distance
(Object other) Returns the nearest approach distance between "this" and "other".default TNumber
Returns a new temporal object with the values of "this" plus "other".default TNumber
Returns a new temporal object with the values of "this" divided by "other".default TNumber
Returns a new temporal object with the values of "this" multiplied "other".default TNumber
Returns a new temporal object with the values of "this" minus "other".default TNumber
scale_value
(Object width) Returns a new :class:`TNumber` scaled so the value dimension has width ``width``.default TNumber
shift_scale_value
(Object shift, Object width) Returns a new :class:`TNumber` with the value dimension shifted by ``shift`` and scaled so the value dimension has width ``width``.default TNumber
shift_value
(Object delta) Returns a new :class:`TNumber` with the value dimension shifted by ``delta``.default TNumber
Returns a new temporal object with the values of "this" minus "other".default float
Returns the time weighted average of "this".value_split
(int size, int start) value_time_split
(Object duration, int value_size, int value_start, Object time_start) Splits `self` into fragments with respect to value and tstzspan buckets.
-
Method Details
-
getNumberInner
jnr.ffi.Pointer getNumberInner() -
getCustomType
String getCustomType() -
getTemporalType
TemporalType getTemporalType() -
bounding_tbox
Returns the bounding box of "this".MEOS Functions:
- tbox_tnumber
- Returns:
- The bounding box of "this".
- Throws:
SQLException
-
integral
default float integral()Returns the integral of "this".MEOS Function:
- tnumber_integral
- Returns:
- The integral of "this".
-
time_weighted_average
default float time_weighted_average()Returns the time weighted average of "this".MEOS Function:
- tnumber_twavg
- Returns:
- The time weighted average of "this".
-
shift_value
Returns a new :class:`TNumber` with the value dimension shifted by ``delta``. Args: delta: value to shift MEOS Functions: tint_shift_value, tfloat_shift_value- Throws:
Exception
-
scale_value
Returns a new :class:`TNumber` scaled so the value dimension has width ``width``. Args: width: value representing the width of the new temporal number MEOS Functions: tint_scale_value, tfloat_scale_value- Throws:
Exception
-
shift_scale_value
Returns a new :class:`TNumber` with the value dimension shifted by ``shift`` and scaled so the value dimension has width ``width``. Args: shift: value to shift width: value representing the width of the new temporal number MEOS Functions: tint_shift_scale_value, tfloat_shift_scale_value- Throws:
Exception
-
at
Returns a new temporal object with the values of "this" restricted to the value or time "other".MEOS Functions:
- temporal_at_values
- tnumber_at_span
- tnumber_at_spanset
- tnumber_at_tbox
- temporal_at_timestamp
- temporal_at_timestampset
- temporal_at_period
- temporal_at_periodset
- Parameters:
other
- A time or value object to restrict the values of "this" to.- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
minus
Returns a new temporal object with the values of "this" restricted to the complement of the value or time "other".MEOS Functions:
- temporal_minus_values
- tnumber_minus_span
- tnumber_minus_spanset
- tnumber_minus_tbox
- temporal_minus_timestamp
- temporal_minus_timestampset
- temporal_minus_period
- temporal_minus_periodset
- Parameters:
other
- A time or value object to restrict the values of "this" to * the complement of.- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
is_left
Returns whether the bounding box of "this" is left to the bounding box of "other".- Parameters:
other
- A box or a temporal object to compare to "this".- Returns:
- True if left, False otherwise.
- Throws:
SQLException
-
is_over_or_left
Returns whether the bounding box of "this" is over or left to the bounding box of "other".- Parameters:
other
- A box or a temporal object to compare to "this".- Returns:
- True if over or left, False otherwise.
- Throws:
SQLException
-
is_right
Returns whether the bounding box of "this" is right to the bounding box of "other".- Parameters:
other
- A box or a temporal object to compare to "this".- Returns:
- True if right, False otherwise.
- Throws:
SQLException
-
is_over_or_right
Returns whether the bounding box of "this" is over or right to the bounding box of "other".- Parameters:
other
- A box or a temporal object to compare to "this".- Returns:
- True if over or right, False otherwise.
- Throws:
SQLException
-
add
Returns a new temporal object with the values of "this" plus "other".MEOS FUNCTIONS:
- add_tin_int
- add_tfloat_float
- add_tnumber_tnumber
- Parameters:
other
- AInteger
,Float
orTNumber
to add * to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
radd
Returns a new temporal object with the values of "this" plus "other".MEOS Functions:
- add_int_tint
- add_float_tfloat
- Parameters:
other
- AInteger
orFloat
to add to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
sub
Returns a new temporal object with the values of "this" minus "other".MEOS Functions:
- sub_tint_int
- sub_tfloat_float
- sub_tnumber_tnumber
- Parameters:
other
- AInteger
,Float
orTNumber
to add * * to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
rsub
Returns a new temporal object with the values of "this" minus "other".MEOS Functions:
- sub_int_tint
- sub_float_tfloat
- Parameters:
other
- AInteger
orFloat
to add to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
mul
Returns a new temporal object with the values of "this" multiplied by "other".MEOS Functions:
- mult_tint_int
- mult_tfloat_float
- mult_tnumber_tnumber
- Parameters:
other
- AInteger
,Float
orTNumber
to add * * to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
rmul
Returns a new temporal object with the values of "this" multiplied "other".MEOS Functions:
- mult_int_tint
- mult_float_tfloat
- Parameters:
other
- AInteger
orFloat
to add to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
div
Returns a new temporal object with the values of "this" divided by "other".MEOS Functions:
- div_tint_int
- div_tfloat_float
- div_tnumber_tnumber
- Parameters:
other
- AInteger
,Float
orTNumber
to add * * to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
rdiv
Returns a new temporal object with the values of "this" divided by "other".MEOS Functions:
- div_int_tint
- div_float_tfloat
- Parameters:
other
- AInteger
orFloat
to add to "this".- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
OperationNotSupportedException
-
_add
Returns a new temporal object with the values of `self` plus `other`. Args: other: A :class:`int`, :class:`float` or :class:`TNumber` to add to `self`. Returns: A new temporal object of the same subtype as `self`.- Throws:
OperationNotSupportedException
-
_radd
Returns a new temporal object with the values of `self` plus `other`. Args: other: A :class:`int` or :class:`float` to add to `self`. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: add_int_tint, add_float_tfloat- Throws:
OperationNotSupportedException
-
_sub
Returns a new temporal object with the values of `self` minus `other`. Args: other: A :class:`int`, :class:`float` or :class:`TNumber` to subtract from `self`. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: sub_tint_int, sub_tfloat_float, sub_tnumber_tnumber- Throws:
OperationNotSupportedException
-
_rsub
Returns a new temporal object with the values of `other` minus `self`. Args: other: A :class:`int` or :class:`float` to subtract `self` to. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: sub_int_tint, sub_float_tfloat- Throws:
OperationNotSupportedException
-
_mul
Returns a new temporal object with the values of `self` multiplied by `other`. Args: other: A :class:`int`, :class:`float` or :class:`TNumber` to multiply `self` by. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: mult_tint_int, mult_tfloat_float, mult_tnumber_tnumber- Throws:
OperationNotSupportedException
-
_rmul
Returns a new temporal object with the values of `self` multiplied by `other`. Args: other: A :class:`int` or :class:`float` to multiply by `self`. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: mult_int_tint, mult_float_tfloat- Throws:
OperationNotSupportedException
-
_trueDiv
Returns a new temporal object with the values of `self` divided by `other`. Args: other: A :class:`int`, :class:`float` or :class:`TNumber` to divide `self` by. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: div_tint_int, div_tfloat_float, div_tnumber_tnumber- Throws:
OperationNotSupportedException
-
_rTrueDiv
Returns a new temporal object with the values of `other` divided by `self`. Args: other: A :class:`int` or :class:`float` to divide by `self`. Returns: A new temporal object of the same subtype as `self`. MEOS Functions: div_int_tint, div_float_tfloat- Throws:
OperationNotSupportedException
-
abs
Returns the absolute value of "this".MEOS Functions:
- tnumber_abs
- Returns:
- A new
TNumber
instance.
-
delta_value
Returns the value difference between consecutive instants of "this".MEOS Functions:
- tnumber_delta_value
- Returns:
- A new
TNumber
instance.
-
distance
Returns the temporal distance between "this" and "other".MEOS Functions:
- distance_tfloat_float
- distance_tnumber_tnumber
- Parameters:
other
- AInteger
,Float
orTNumber
to * compare to "this".- Returns:
- A
TFloat
with the distance between "this" and "other". - Throws:
OperationNotSupportedException
-
nearest_approach_distance
Returns the nearest approach distance between "this" and "other".MEOS Functions: nad_tfloat_float nad_tfloat_tfloat nad_tnumber_tbox
-
createEmptyPointerArray
private jnr.ffi.Pointer createEmptyPointerArray(jnr.ffi.Runtime runtime, int size) Splits `self` into fragments with respect to value buckets Args: start: Start value of the first value bucket. size: Size of the value buckets. Returns: A list of temporal ints. MEOS Functions: tint_value_split -
value_split
-
value_time_split
default List<TNumber> value_time_split(Object duration, int value_size, int value_start, Object time_start) Splits `self` into fragments with respect to value and tstzspan buckets. Args: value_size: Size of the value buckets. duration: Duration of the tstzspan buckets. value_start: Start value of the first value bucket. If None, the start value used by default is 0 time_start: Start time of the first tstzspan bucket. If None, the start time used by default is Monday, January 3, 2000. Returns: A list of temporal integers. MEOS Functions:
-