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

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

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.

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

Check that index is valid