Copyright | (c) Daniel Lovasko 2016-2017 |
---|---|
License | BSD3 |
Maintainer | Daniel Lovasko <daniel.lovasko@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data Fluid r c = Fluid (Int, Int) [[r]] [c]
- fluidAppend :: Fluid r c -> r -> Fluid r c
- fluidDump :: Frame r c => Fluid r c -> [r]
- fluidFirst :: Fluid r c -> Maybe r
- fluidHeads :: Frame r c => Fluid r c -> [Maybe r]
- fluidNew :: (Int, Int) -> Fluid r c
- fluidSelect :: Frame r c => Fluid r c -> [Bool] -> [r]
- fluidShift :: Frame r c => Fluid r c -> Fluid r c
Documentation
Management of fluid transitions between compressed and uncompresed state. The constructor arguments are as follows: * section lengths * raw section * compressed section
Add new value to the fluid. Internally this function is _prepending_ in front of all existing values.
Dump all stored values in the uncompressed form.
fluidFirst :: Fluid r c -> Maybe r Source #
Obtain the first element stored in the frame.
Obtain the first elements of each section blocks. Empty frames and lists are represented as Nothing.
Return raw values stored within specified block indices.