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.Fluid

Description

By using the Frame abstraction, the Fluid type achieves transition between the raw and compressed states for both TimeFrame and ValueFrame. It is intended for internal use only.

Synopsis

Documentation

data Fluid r c Source #

Management of fluid transitions between compressed and uncompresed state. The constructor arguments are as follows: * section lengths * raw section * compressed section

Constructors

Fluid (Int, Int) [[r]] [c] 

Instances

Show (Fluid r c) Source #

Pretty-printing of the Fluid type.

Methods

showsPrec :: Int -> Fluid r c -> ShowS #

show :: Fluid r c -> String #

showList :: [Fluid r c] -> ShowS #

fluidAppend Source #

Arguments

:: Fluid r c

old fluid

-> r

new value

-> Fluid r c

new fluid

Add new value to the fluid. Internally this function is _prepending_ in front of all existing values.

fluidDump Source #

Arguments

:: Frame r c 
=> Fluid r c

fluid

-> [r]

uncompressed values

Dump all stored values in the uncompressed form.

fluidFirst :: Fluid r c -> Maybe r Source #

Obtain the first element stored in the frame.

fluidHeads Source #

Arguments

:: Frame r c 
=> Fluid r c

fluid

-> [Maybe r]

block heads

Obtain the first elements of each section blocks. Empty frames and lists are represented as Nothing.

fluidNew Source #

Arguments

:: (Int, Int)

section lengths

-> Fluid r c

new fluid

Create a new fluid.

fluidSelect Source #

Arguments

:: Frame r c 
=> Fluid r c

fluid

-> [Bool]

block presence

-> [r]

raw values

Return raw values stored within specified block indices.

fluidShift Source #

Arguments

:: Frame r c 
=> Fluid r c

old fluid

-> Fluid r c

new fluid

Shift one uncompressed component into the compressed ones and create a new empty uncompressed component.