object TimeSeriesMerger
- Alphabetic
- By Inheritance
- TimeSeriesMerger
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[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 finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mergeEntries[T, R](in: => Seq[TSEntry[T]], mergeOp: (T) => Option[R], allNone: T, reduceOp: (T, T) => T, compress: Boolean): Seq[TSEntry[R]]
Takes a sequence of entries that are possibly overlapping in time and returns a sequence where all overlapping entries have first been reduced to a single value (
reduceOp) and then merged to the new type (mergeOp).Takes a sequence of entries that are possibly overlapping in time and returns a sequence where all overlapping entries have first been reduced to a single value (
reduceOp) and then merged to the new type (mergeOp).- in
sequence of entries that can overlap in time by are strictly ordered by timestamp
- mergeOp
operator from the entry type to the final type or None
- allNone
the value to use for the merge operator when no entry is defined
- reduceOp
reduces overlapping entry-values to a single one
- compress
specifies whether the entries should be validated and compressed by a TSEntryFitter. This should only be omitted if the entries will be passed to a TimeSeriesBuilder subsequently.
- returns
the sequence of merged but not validated/compressed TSEntries of the result type
- Note
Because this function is agnostic of the type it can (as an example) work on tuples of any length. This allows us to encode merges of any arity with the following tuple encoding: The tuples have a length equal to the number of TimeSeries' to merge. Each tuple corresponds to one original TSEntry. Example: if there are three TimeSeries to merge
tsA,tsBandtsCthen aTSEntry(ts, v, d)oftsCwill be converted to an entry of the following form:TSEntry(ts, (None, None, Some(v)), d)
Overlapping entries from different TimeSeries will be split where necessary and, subsequently, all entries covering the same time will be reduced to single one where more than one position of the tuple has a Some. For example:
TSEntry(ts, (Some(va), None, Some(vc)), d)
means that at the time
tsuntilts + dthetsAhas valuevaand thetsChas valuevc. The contained tuple now corresponds to the argument of themergeOp; it can simply be applied.
- def mergeEntries[A, B, C, R](a: Seq[TSEntry[A]], b: Seq[TSEntry[B]], c: Seq[TSEntry[C]], compress: Boolean)(op: (Option[A], Option[B], Option[C]) => Option[R]): Seq[TSEntry[R]]
See mergeEntries.
See mergeEntries. The same as mergeEntries for two sequences but for three.
- def mergeEntries[A, B, R](a: Seq[TSEntry[A]], b: Seq[TSEntry[B]], compress: Boolean = true)(op: (Option[A], Option[B]) => Option[R]): Seq[TSEntry[R]]
Merge two time series together, using the provided merge operator.
Merge two time series together, using the provided merge operator.
The passed TSEntry sequences will be merged according to the merge operator, which will always be applied to one of the following:
- two defined TSEntries with exactly the same domain of definition
- a defined entry from A and None from B
- a defined entry from B and None from A
- No defined entry from A nor B.
Overlapping TSEntries in the sequences a and b are trimmed to fit one of the aforementioned cases before being passed to the merge function.
For example,
- if 'x' and '-' respectively represent the undefined and defined parts of a TSEntry
- '|' delimits the moment on the time axis where a change in definition occurs either in the present entry or in the one with which it is currently being merged
- 'result' is the sequence resulting from the merge
We apply the merge function in the following way:
a_i: xxx|---|---|xxx|xxx b_j: xxx|xxx|---|---|xxx
result: (1) (2) (3) (4) (5)
(1),(5) : op(None, None) (2) : op(Some(a_i.value), None) (3) : op(Some(a_i.value), Some(b_j.value)) (4) : op(None, Some(b_j.value))
Assumes a and b to be ORDERED!
- compress
specifies whether the entries should be validated and compressed by a TSEntryFitter. This should only be omitted if the entries will be passed to a TimeSeriesBuilder subsequently.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()