blas-0.7.6: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Elem.BLAS

Contents

Description

Type classes for elements with BLAS support.

Synopsis

Base element type class

class (AEq e, Storable e, Fractional e) => Elem e whereSource

The base class for elements.

Methods

conjugate :: e -> eSource

Get the complex conjugate of a value.

norm :: e -> DoubleSource

Get the magnitude of a value.

norm1 :: e -> DoubleSource

Get the l1 norm of a value.

fromReal :: Double -> eSource

Convert a double to an element.

maybeToReal :: e -> Maybe DoubleSource

Try to coerce a value to a double. This will fail unless the complex part is zero (according to a comparison by (~==)).

Instances

BLAS element types

class Elem a => BLAS1 a Source

Types with vector-vector operations.

class BLAS1 a => BLAS2 a Source

Types with matrix-vector operations.

class BLAS2 a => BLAS3 a Source

Types with matrix-matrix operations.

Re-export of Complex from Data.Complex