ostk.physics.time.Interval¶
- class Interval(
- self,
- start_instant: ostk.physics.time.Instant,
- end_instant: ostk.physics.time.Instant,
- type: ostk.mathematics.object.RealInterval.Type,
- start_instant: ostk.physics.time.Instant,
Bases:
objectTime interval.
Constructor.
- Parameters:
start_instant (Instant) -- Start instant.
end_instant (Instant) -- End instant.
type (Interval.Type) -- Interval type.
Attributes
Check if the interval contains an instant.
Check if the interval contains another interval.
Generate a grid of instants with a given time step.
Get the center instant.
Get the duration.
Get the end instant.
Get the intersection with another interval.
Get the lower bound.
Get the start instant.
Get the type of the interval.
Get the union with another interval.
Get the upper bound.
Check if the interval intersects another interval.
Check if interval is degenerate, i.e. its lower and upper bounds are the equal.
Get the datetime span.
Convert the interval to a string.
- class Type(
- value,
- names=None,
- *,
- module=None,
- qualname=None,
- type=None,
- start=1,
- boundary=None,
- names=None,
Bases:
Enum
- centered = <nanobind.nb_func object>¶
- clip = <nanobind.nb_func object>¶
- closed = <nanobind.nb_func object>¶
- contains_instant¶
Check if the interval contains an instant.
- contains_interval¶
Check if the interval contains another interval.
- generate_grid¶
Generate a grid of instants with a given time step.
- get_gaps = <nanobind.nb_func object>¶
- get_intersection_with¶
Get the intersection with another interval.
- Parameters:
(Interval) -- Another interval.
- Returns:
Intersection interval, or None if there is no intersection.
- Return type:
Interval | None
- get_type¶
Get the type of the interval.
- Returns:
The type of the interval.
- Return type:
- get_union_with¶
Get the union with another interval.
- Parameters:
(Interval) -- Another interval.
- Returns:
Union interval, or None if there is no single-interval union.
- Return type:
Interval | None
- half_open_left = <nanobind.nb_func object>¶
- half_open_right = <nanobind.nb_func object>¶
- intersects¶
Check if the interval intersects another interval.
- is_degenerate¶
Check if interval is degenerate, i.e. its lower and upper bounds are the equal.
- Returns:
True if degenerate.
- Return type:
- logical_and = <nanobind.nb_func object>¶
- logical_or = <nanobind.nb_func object>¶
- merge = <nanobind.nb_func object>¶
- open = <nanobind.nb_func object>¶
- parse = <nanobind.nb_func object>¶
- sort = <nanobind.nb_func object>¶
- to_datetime_span¶
Get the datetime span.