numeric-tools-0.1.0.1: Collection of numerical tools for integration, differentiation etc.

Portabilityportable
Stabilityexperimental
MaintainerAleksey Khudyakov <alexey.skladnoy@gmail.com>

Numeric.Tools.Mesh

Contents

Description

1-dimensional meshes. Used by Numeric.Tools.Interpolation.

Synopsis

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.

Methods

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.

Instances

Uniform mesh

uniformMeshSource

Arguments

:: (Double, Double)

Lower and upper bound

-> Int

Number of points

-> UniformMesh 

Create uniform mesh

uniformMeshStep :: UniformMesh -> DoubleSource

Distance between points