object TimeSeries
- Alphabetic
- By Inheritance
- TimeSeries
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[T](entries: Seq[TSEntry[T]]): TimeSeries[T]
An safe constructor of
TimeSeries
An safe constructor of
TimeSeries
The given entries are sorted, compressed (if needed) and returned as a time series. If the sequence is empty, then it returns an
EmptyTimeSeries
. If the sequence is made of only one entry, then it returns it.- T
The time series' underlying parameter
- entries
A sequence of entries which all have a different timestamp
- returns
A well initialized time series
- Note
All entries should have different timestamps.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fillAndCompress[T](first: TSEntry[T], second: TSEntry[T], fillValue: T): Seq[TSEntry[T]]
Returns a Sequence of entries such that there is no discontinuity between current.timestamp and next.definedUntil, filling the gap between the entries and compression them if necessary.
- def fillGaps[T](in: Seq[TSEntry[T]], fillValue: T): Seq[TSEntry[T]]
For any collection of TSEntries of size 2 and more, intersperses entries containing fillValue between any two non-contiguous entries.
For any collection of TSEntries of size 2 and more, intersperses entries containing fillValue between any two non-contiguous entries.
Assumes the passed entries to be both properly fitted (no overlapping domains) and compressed (no contiguous entries containing the same value).
The result will be properly fitted and compressed as well.
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def groupEntries[T](entries: Stream[TSEntry[T]], maxNumberOfEntries: Int): Stream[(Long, Stream[TSEntry[T]])]
Groups the entries in the stream into substreams that each contain at most maxNumberOfEntries.
Groups the entries in the stream into substreams that each contain at most maxNumberOfEntries.
- entries
as a stream
- maxNumberOfEntries
contained by each substream of the result
- returns
a stream of (bucket-start, bucket-entries)
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def intersectLooseDomains[T](tss: Seq[TimeSeries[T]]): TimeDomain
Computes the intersection of the passed time series' loose domains
Computes the intersection of the passed time series' loose domains
- T
The underlying type of the time series
- tss
A sequence of time series
- returns
The intersection of the LooseDomains
- Note
If there is an empty time series, then the intersection will be None.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mergeEntries[A, B, C](a: Seq[TSEntry[A]])(b: Seq[TSEntry[B]])(op: (Option[A], Option[B]) => Option[C]): Seq[TSEntry[C]]
- See also
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newBuilder[T](compress: Boolean = true): TimeSeriesBuilder[T]
- returns
the default timeseries builder implementation
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def ofOrderedEntriesSafe[T](xs: Seq[TSEntry[T]], compress: Boolean = true): TimeSeries[T]
Construct using a time series
TimeSeriesBuilder
given an ordered list of entriesConstruct using a time series
TimeSeriesBuilder
given an ordered list of entriesThe correct underlying implementation will be chosen (EmptyTimeSeries, TSEntry or VectorTimeSeries). As we are using a
TimeSeriesBuilder
, the entries will be compressed if possible.- T
The underlying type of the time series
- xs
A sequence of TSEntries which HAS to be chronologically ordered (w.r.t. their timestamps) and well-formed (no duplicated timestamps)
- compress
A flag specifying whether the entries should be compressed or not.
- returns
A compressed time series with a correct implementation
- Note
No two entries can have the same timestamp, an exception will be thrown if it's the case.
- def ofOrderedEntriesUnsafe[T](xs: Seq[TSEntry[T]], isCompressed: Boolean = false, isDomainContinous: Boolean = false): TimeSeries[T]
Construct a time series using an ordered Seq of TSEntries
Construct a time series using an ordered Seq of TSEntries
The correct underlying implementation will be used depending of the Seq's size (i.e. EmptyTimeSeries, TSEntry, or a VectorTimeSeries)
- T
The underlying type of the time series
- xs
A sequence of TSEntries which HAS to be chronologically ordered (w.r.t. their timestamps) and well-formed (no duplicated timestamps)
- isCompressed
Flags whether the xs' have been compressed in their construction. Will be passed to the underlying implementation.
- isDomainContinous
Flags whether all the entries span a continuous time domain without holes. Will be passed to the underlying implementation.
- returns
A time series with a correct implementation
- Note
The sequence has to be chronologically ordered, otherwise the time series might not behave correctly. In general, you should use a
TimeSeries.newBuilder
. Furthermore, no two entries should have the same timestamp. Finally, entries will NOT be compressed.
- def sample[T](entries: Seq[TSEntry[T]], start: Long, sampleRate: Long, useClosestInWindow: Boolean): Seq[TSEntry[T]]
See TimeSeries.sample() in the trait.
See TimeSeries.sample() in the trait. Implements the sampling on a stream of entries with lazy stream evaluation.
- def splitEntriesLongerThan[T](entries: Seq[TSEntry[T]], entryMaxLength: Long): Seq[TSEntry[T]]
Splits up all entries in the input that are longer than the given maximal length.
Splits up all entries in the input that are longer than the given maximal length.
- entryMaxLength
to use for splitting
- returns
a sequence of entries guaranteed to be shorter than the given maximal length
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unionLooseDomains[T](tss: Seq[TimeSeries[T]]): TimeDomain
Computes the union of the passed time series' loose domains
Computes the union of the passed time series' loose domains
- T
The underlying type of the time series
- tss
A sequence of time series
- returns
The union of the LooseDomains
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()