hmatrix-0.15.2.1: Linear algebra and numerical computation

Copyright(c) Alberto Ruiz 2009
LicenseGPL
MaintainerAlberto Ruiz <aruiz@um.es>
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

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 b Source

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

app1 :: f -> Adapt1 f t1 Source

app2 :: f -> Adapt2 f t1 r1 t2 Source

app3 :: f -> Adapt3 f t1 r1 t2 r2 t3 Source

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

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

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

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

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

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

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

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) -> y infixl 0 Source

postfix function application (flip ($))

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

access to Vector elements without range checking

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