GROUP_BY_TIME
Description
Converts vector to a grouped vector, by gouping by timespans, so that we have a list of events per timespan. The timespan either is fixed on the latest event, or can be fixed on another time if specified.
GROUP_BY_TIME(Vector<Event>, Scalar<Timespan>)
Groups the events in the given vector in spans defined by timespan, starting from the latest event.
Parameters
Parameter | Description |
---|---|
vector | A vector of type Event |
timespan | A timespan in which the events should be grouped |
Returns
A GroupedVector of type <Time, Event>.
GROUP_BY_TIME(Vector<Event>, Scalar<Timespan>, Scalar<Time>)
Group the vector in the given timespans starting at the given time.
Parameters
Parameter | Description |
---|---|
vector | A vector of type Event |
timespan | A timespan in which the events should be grouped |
time | The time form which we want to start grouping. |
Returns
A GroupedVector of type <Time, Event>.
Examples
Group events in 1h spans starting from latest event
Group events in 1d spans on full day spans (i.e. 00:00-23:59)
Last updated