Safe Haskell | None |
---|
Outside
covers subwords for outside calculations. These types of
calculations requires quite weird index movements if you want to stay with
usual grammars. This remains true if grammars are transformed to Chomsky
normal form, only that in said form it is easier to write down the
recursions.
TODO basically untested!
Documentation
Outside
inverts the usual subword (i,j) system.
TODO do I need to store N ?
Eq Outside | |
Ord Outside | |
Show Outside | |
Arbitrary Outside | |
NFData Outside | |
Unbox Outside | |
Vector Vector Outside | |
MVector MVector Outside | |
Arbitrary z => Arbitrary (:. z Outside) | |
Shape sh => Shape (:. sh Outside) | Some weird things are going on here. Adding subwords (i,j) and (k,l) yields (i+k,j+l). Normally i==k==0 when calculating space requirements. If you have a subword (3,10) and want the next outer one add (-1,1) and you get what you want. We make NO(!) check that the final subword contains only non-negative indices. |
ExtShape sh => ExtShape (:. sh Outside) |
upperTri :: Outside -> IntSource
Size of an upper triangle starting at i
and ending at j
. (0,N) what
be the normal thing to use. Internally, we stell upper triangular matrices.
subwordIndex :: Outside -> Outside -> IntSource
subwordFromIndex :: Outside -> Int -> OutsideSource