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

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

Numeric.Classes.Indexing

Description

 

Synopsis

Documentation

class Indexable a whereSource

Type class for array-like data type which support O(1) access by integer index starting from zero.

Associated Types

type IndexVal a :: *Source

Methods

size :: a -> IntSource

Size of table.

unsafeIndex :: a -> Int -> IndexVal aSource

O(1) Index table without range cheking.

(!) :: a -> Int -> IndexVal aSource

O(1) Safe indexing. Calls error if index is out of range.

Instances

Indexable UniformMesh 
Indexable (Vector a) 
Unbox a => Indexable (Vector a) 
Storable a => Indexable (Vector a) 
(Mesh mesh, ~ * (IndexVal mesh) Double) => Indexable (CubicSpline mesh) 
(Mesh mesh, ~ * (IndexVal mesh) Double) => Indexable (LinearInterp mesh) 

validIndex :: Indexable a => a -> Int -> BoolSource

Check that index is valid