TimeSeriesAPI » History » Version 2

« Previous - Version 2/5 (diff) - Next » - Current version
M. Rolf, 12/16/2011 02:51 PM


TimeSeriesAPI

Things that sucked at old TimeSeries datatype

  • Strict timestamp constraint
    • Critical when appending frenquently with local-time
  • No coherent abstraction for one 'entry'
  • boost::ptime very expensive
  • restricted to RealVectorPtr values
  • attach vs. append naming (concat)
  • interpolation logic fails semantically for certain data types (e.g. 'rotations')
  • No iterators

Things that were important in old TimeSeries datatype

  • map function
  • XML Serialization
  • Plain file persistency
  • 'logging' possible with 'local-time append'

Possible Improvements

  • Explicit 'local-time' append
    • Append 'Generator' for timestamps (e.g. 'now' or 'plus x seconds')
  • Implement Duration logic: values 'valid' for a certain time (relative)

nemo::TimeSeries issues

  • Vector dimensions constrainable????
  • Default TimestampType pretty useless
    • Use no default and switch ordering of template params <TimeStamp,Value>
  • operator[] ?????
    ts = series.timestamps[index]
    series.timestamps.set(index, ts)
    
    val = series.values[index]
    series.values.set(index, val)
    
    val = series[ts]
    series.set(ts, val)
    
    • Current 'compromiss'
    • operator[] only for reading
    • Split index-access into separated timestamps/values accessors
    • Possible future way for write access: ReadWriteRef logic like in MathVector
      vectorSeries.values[i] = vector
      vector = vectorSeries.values[i]
      ((Vector)vectorSeries.values[i]).vectorMember()
      
    • The only problem: member calls not transparently possible
      vectorSeries.values[i].vectorMember() // compile error through ReadWriteRef