goat-1.0.0: Time Series Compression

Copyright(c) Daniel Lovasko 2016-2017
LicenseBSD3
MaintainerDaniel Lovasko <daniel.lovasko@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.Goat.Story

Description

The Story type provides an easy-to-use high-level interface to a time series object. This module implements the building of the time series structure and enables interval queries that return value points.

Synopsis

Documentation

data Story Source #

Representation of a time series object. The constructor arguments are as follows: * time window size * current time window number * times fluid * values fluid

Instances

Show Story Source #

Pretty-printing for the Story type.

Methods

showsPrec :: Int -> Story -> ShowS #

show :: Story -> String #

showList :: [Story] -> ShowS #

storyAppend Source #

Arguments

:: Story

old story

-> (Word32, Float)

time & value

-> Maybe Story

new story

Add new time/value pair to the story. The function will return Nothing in case that the value was invalid (NaN or Infinity) or when the time was invalid with respect to previously added times (breaking the series monotonicity).

storyDump Source #

Arguments

:: Story

story

-> [(Word32, Float)]

times & values

Output a list of all time/value pairs stored in the story.

storyNew Source #

Arguments

:: Word32

time window size

-> Word32

current time window number

-> Story

new story

Create a new empty story. The ratio of raw/compressed sections is 12/74. These fields will be configurable in the future versions of the module.

storyQuery Source #

Arguments

:: Story

story

-> (Word32, Word32)

interval

-> [(Word32, Float)]

times & values

Query the story for time/value pairs within the specified time limit.