ADPfusion-0.2.1.0: Efficient, high-level dynamic programming.

Safe HaskellNone

ADP.Fusion.Region

Contents

Synopsis

Regions of unlimited size

data Region x Source

Constructors

Region !(Vector x) 

Instances

(Monad m, Unbox x, Elms ls Subword, MkStream m ls Subword) => MkStream m (:!: ls (Region x)) Subword 
Build (Region x) 
(ValidIndex ls Subword, Unbox xs) => ValidIndex (:!: ls (Region xs)) Subword 
Elms ls Subword => Elms (:!: ls (Region x)) Subword 

Regions of unlimited size

data SRegion x Source

Constructors

SRegion !Int !Int !(Vector x) 

Instances

(Monad m, Unbox x, Elms ls Subword, MkStream m ls Subword) => MkStream m (:!: ls (SRegion x)) Subword

TODO Check that all inner / outer sized calculations are correct

NOTE mkStream/Inner gives a size hint of Nothing, as in purely inner cases, min/max boundaries are determined solely from the running rightmost index from the next inner component.

NOTE the filter in mkStream/Outer is still necessary to check for lowerbound>0 conditions. We could send the lower bound down with another size hint, but this only makes sense if you have use cases, where the lower bound is a lot higher than 0. Otherwise the current code is simpler.

TODO use drop instead of filter: still condition, but large lower bounds are captured

TODO remove mkStream/Outer : filter and test if one condition less gives much better runtimes.

Build (SRegion x) 
(ValidIndex ls Subword, Unbox xs) => ValidIndex (:!: ls (SRegion xs)) Subword 
Elms ls Subword => Elms (:!: ls (SRegion x)) Subword