Safe Haskell | None |
---|
Functions specialised for arrays of dimension 2.
Documentation
Check if an index lies inside the given extent.
As opposed to inRange
from Data.Array.Repa.Index,
this is a short-circuited test that checks that lowest dimension first.
Check if an index lies outside the given extent.
As opposed to inRange
from Data.Array.Repa.Index,
this is a short-circuited test that checks the lowest dimension first.
Given the extent of an array, clamp the components of an index so they lie within the given array. Outlying indices are clamped to the index of the nearest border element.
:: (Source r1 a, Source r2 a) | |
=> DIM2 | Extent of array. |
-> Int | Width of border. |
-> Array r1 DIM2 a | Array for internal elements. |
-> Array r2 DIM2 a | Array for border elements. |
-> Array (P r1 (P r2 (P r2 (P r2 (P r2 X))))) DIM2 a |
Make a 2D partitioned array from two others, one to produce the elements in the internal region, and one to produce elements in the border region. The two arrays must have the same extent. The border must be the same width on all sides.