Portability | portable |
---|---|
Stability | experimental |
Maintainer | Aleksey Khudyakov <alexey.skladnoy@gmail.com> |
1-dimensional meshes. Used by Numeric.Tools.Interpolation
.
- class Indexable a => Mesh a where
- meshLowerBound :: a -> Double
- meshUpperBound :: a -> Double
- meshFindIndex :: a -> Double -> Int
- data UniformMesh
- uniformMesh :: (Double, Double) -> Int -> UniformMesh
- uniformMeshStep :: UniformMesh -> Double
Meshes
class Indexable a => Mesh a whereSource
Class for 1-dimensional meshes. Mesh is ordered set of points. Each instance must guarantee that every next point is greater that previous and there is at least 2 points in mesh.
meshLowerBound :: a -> DoubleSource
Low bound of mesh
meshUpperBound :: a -> DoubleSource
Upper bound of mesh
meshFindIndex :: a -> Double -> IntSource
Find such index for value that
mesh ! i <= x && mesh ! i+1 > x
Will return invalid index if value is out of range.
Uniform mesh
data UniformMesh Source
Uniform mesh
:: (Double, Double) | Lower and upper bound |
-> Int | Number of points |
-> UniformMesh |
Create uniform mesh
uniformMeshStep :: UniformMesh -> DoubleSource
Distance between points