hmatrix-0.14.0.0: Linear algebra and numerical computation

Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz <aruiz@um.es>
Safe HaskellSafe-Infered

Data.Packed.Development

Description

The library can be easily extended with additional foreign functions using the tools in this module. Illustrative usage examples can be found in the examples/devel folder included in the package.

Synopsis

Documentation

vec :: Storable t => Vector t -> (((CInt -> Ptr t -> t1) -> t1) -> IO b) -> IO bSource

mat :: Storable t => Matrix t -> (((CInt -> CInt -> Ptr t -> t1) -> t1) -> IO b) -> IO bSource

app1 :: f -> Adapt1 f t1Source

app2 :: f -> Adapt2 f t1 r1 t2Source

app3 :: f -> Adapt3 f t1 r1 t2 r2 t3Source

app4 :: f -> Adapt4 f t1 r1 t2 r2 t3 r3 t4Source

app5 :: f -> Adapt5 f t1 r1 t2 r2 t3 r3 t4 r4 t5Source

app6 :: f -> Adapt6 f t1 r1 t2 r2 t3 r3 t4 r4 t5 r5 t6Source

app7 :: f -> Adapt7 f t1 r1 t2 r2 t3 r3 t4 r4 t5 r5 t6 r6 t7Source

app8 :: f -> Adapt8 f t1 r1 t2 r2 t3 r3 t4 r4 t5 r5 t6 r6 t7 r7 t8Source

app9 :: f -> Adapt9 f t1 r1 t2 r2 t3 r3 t4 r4 t5 r5 t6 r6 t7 r7 t8 r8 t9Source

app10 :: f -> Adapt10 f t1 r1 t2 r2 t3 r3 t4 r4 t5 r5 t6 r6 t7 r7 t8 r8 t9 r9 t10Source

unsafeFromForeignPtr

Arguments

:: Storable a 
=> ForeignPtr a

pointer

-> Int

offset

-> Int

length

-> Vector a 

O(1) Create a vector from a ForeignPtr with an offset and a length.

The data may not be modified through the ForeignPtr afterwards.

If your offset is 0 it is more efficient to use unsafeFromForeignPtr0.

unsafeToForeignPtr :: Storable a => Vector a -> (ForeignPtr a, Int, Int)

O(1) Yield the underlying ForeignPtr together with the offset to the data and its length. The data may not be modified through the ForeignPtr.

check :: String -> IO CInt -> IO ()Source

check the error code

(//) :: x -> (x -> y) -> ySource

postfix function application (flip ($))

at' :: Storable a => Vector a -> Int -> aSource

access to Vector elements without range checking

atM' :: Storable a => Matrix a -> Int -> Int -> aSource