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 SummaryModifier and TypeMethodDescriptiondefault TNumberReturns a new temporal object with the values of `self` plus `other`.default TNumberReturns a new temporal object with the values of `self` multiplied by `other`.default TNumberReturns a new temporal object with the values of `self` plus `other`.default TNumberReturns a new temporal object with the values of `self` multiplied by `other`.default TNumberReturns a new temporal object with the values of `other` minus `self`.default TNumberReturns a new temporal object with the values of `other` divided by `self`.default TNumberReturns a new temporal object with the values of `self` minus `other`.default TNumberReturns a new temporal object with the values of `self` divided by `other`.default TNumberabs()Returns the absolute value of "this".default TNumberReturns a new temporal object with the values of "this" plus "other".default TNumberReturns a new temporal object with the values of "this" restricted to the value or time "other".default TBoxReturns the bounding box of "this".private jnr.ffi.PointercreateEmptyPointerArray(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 TNumberReturns the value difference between consecutive instants of "this".default TFloatReturns the temporal distance between "this" and "other".default TNumberReturns a new temporal object with the values of "this" divided by "other".jnr.ffi.Pointerdefault floatintegral()Returns the integral of "this".default booleanis_left(TemporalObject other) Returns whether the bounding box of "this" is left to the bounding box of "other".default booleanis_over_or_left(TemporalObject other) Returns whether the bounding box of "this" is over or left to the bounding box of "other".default booleanis_over_or_right(TemporalObject other) Returns whether the bounding box of "this" is over or right to the bounding box of "other".default booleanis_right(TemporalObject other) Returns whether the bounding box of "this" is right to the bounding box of "other".default TNumberReturns a new temporal object with the values of "this" restricted to the complement of the value or time "other".default TNumberReturns a new temporal object with the values of "this" multiplied by "other".default floatnearest_approach_distance(Object other) Returns the nearest approach distance between "this" and "other".default TNumberReturns a new temporal object with the values of "this" plus "other".default TNumberReturns a new temporal object with the values of "this" divided by "other".default TNumberReturns a new temporal object with the values of "this" multiplied "other".default TNumberReturns a new temporal object with the values of "this" minus "other".default TNumberscale_value(Object width) Returns a new :class:`TNumber` scaled so the value dimension has width ``width``.default TNumbershift_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 TNumbershift_value(Object delta) Returns a new :class:`TNumber` with the value dimension shifted by ``delta``.default TNumberReturns a new temporal object with the values of "this" minus "other".default floatReturns 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- 
getNumberInnerjnr.ffi.Pointer getNumberInner()
- 
getCustomTypeString getCustomType()
- 
getTemporalTypeTemporalType getTemporalType()
- 
bounding_tboxReturns the bounding box of "this".MEOS Functions: 
- tbox_tnumber
- Returns:
- The bounding box of "this".
- Throws:
- SQLException
 
- 
integraldefault float integral()Returns the integral of "this".MEOS Function: 
- tnumber_integral
- Returns:
- The integral of "this".
 
- 
time_weighted_averagedefault float time_weighted_average()Returns the time weighted average of "this".MEOS Function: 
- tnumber_twavg
- Returns:
- The time weighted average of "this".
 
- 
shift_valueReturns 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_valueReturns 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_valueReturns 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
 
- 
atReturns 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
 
- 
minusReturns 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_leftReturns 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_leftReturns 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_rightReturns 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_rightReturns 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
 
- 
addReturns a new temporal object with the values of "this" plus "other".MEOS FUNCTIONS: - add_tin_int
- add_tfloat_float
- add_tnumber_tnumber
 - Parameters:
- other- A- Integer,- Floator- TNumberto add * to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
raddReturns a new temporal object with the values of "this" plus "other".MEOS Functions: - add_int_tint
- add_float_tfloat
 - Parameters:
- other- A- Integeror- Floatto add to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
subReturns a new temporal object with the values of "this" minus "other".MEOS Functions: - sub_tint_int
- sub_tfloat_float
- sub_tnumber_tnumber
 - Parameters:
- other- A- Integer,- Floator- TNumberto add * * to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
rsubReturns a new temporal object with the values of "this" minus "other".MEOS Functions: - sub_int_tint
- sub_float_tfloat
 - Parameters:
- other- A- Integeror- Floatto add to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
mulReturns 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- A- Integer,- Floator- TNumberto add * * to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
rmulReturns a new temporal object with the values of "this" multiplied "other".MEOS Functions: - mult_int_tint
- mult_float_tfloat
 - Parameters:
- other- A- Integeror- Floatto add to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
divReturns 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- A- Integer,- Floator- TNumberto add * * to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
rdivReturns a new temporal object with the values of "this" divided by "other".MEOS Functions: - div_int_tint
- div_float_tfloat
 - Parameters:
- other- A- Integeror- Floatto add to "this".
- Returns:
- A new temporal object of the same subtype as "this".
- Throws:
- OperationNotSupportedException
 
- 
_addReturns 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
 
- 
_raddReturns 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
 
- 
_subReturns 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
 
- 
_rsubReturns 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
 
- 
_mulReturns 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
 
- 
_rmulReturns 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
 
- 
_trueDivReturns 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
 
- 
_rTrueDivReturns 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
 
- 
absReturns the absolute value of "this".MEOS Functions: 
- tnumber_abs
- Returns:
- A new TNumberinstance.
 
- 
delta_valueReturns the value difference between consecutive instants of "this".MEOS Functions: 
- tnumber_delta_value
- Returns:
- A new TNumberinstance.
 
- 
distanceReturns the temporal distance between "this" and "other".MEOS Functions: - distance_tfloat_float
- distance_tnumber_tnumber
 - Parameters:
- other- A- Integer,- Floator- TNumberto * compare to "this".
- Returns:
- A TFloatwith the distance between "this" and "other".
- Throws:
- OperationNotSupportedException
 
- 
nearest_approach_distanceReturns the nearest approach distance between "this" and "other".MEOS Functions: nad_tfloat_float nad_tfloat_tfloat nad_tnumber_tbox 
- 
createEmptyPointerArrayprivate 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_splitdefault 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:
 
-