blas-0.5: Bindings to the BLAS librarySource codeContentsIndex
Data.Matrix.Banded.IO
Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>
Contents
The mutable banded matrix data type
Creating new matrices
Views
Rows and columns
Diagonals
Operations
Converting to and from banded matrices
ForeignPtrs
Bandwith properties
Coercing
Unsafe operations
Description
Synopsis
data BMatrix t mn e = BM {
fptrOf :: !!(ForeignPtr e)
offsetOf :: !!Int
size1 :: !!Int
size2 :: !!Int
lowBW :: !!Int
upBW :: !!Int
ldaOf :: !!Int
isHerm :: !!Bool
}
type IOBanded = BMatrix Mut
module BLAS.Matrix.Base
module BLAS.Tensor.Base
module BLAS.Tensor.Dense.ReadOnly
module BLAS.Tensor.ReadOnly
module BLAS.Tensor.Mutable
newBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [((Int, Int), e)] -> IO (BMatrix t (m, n) e)
newBanded_ :: Elem e => (Int, Int) -> (Int, Int) -> IO (BMatrix t (m, n) e)
newListsBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [[e]] -> IO (BMatrix t (m, n) e)
rowView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)
colView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)
getRow :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r n e)
getCol :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r m e)
diag :: Elem e => BMatrix t (m, n) e -> Int -> DVector t k e
module Data.Matrix.Banded.Operations
toForeignPtr :: BMatrix t (m, n) e -> (ForeignPtr e, Int, (Int, Int), (Int, Int), Int, Bool)
fromForeignPtr :: ForeignPtr e -> Int -> (Int, Int) -> (Int, Int) -> Int -> Bool -> BMatrix t (m, n) e
bandwidth :: BMatrix t (m, n) e -> (Int, Int)
numLower :: BMatrix t (m, n) e -> Int
numUpper :: BMatrix t (m, n) e -> Int
coerceBanded :: BMatrix t mn e -> BMatrix t kl e
unsafeNewBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [((Int, Int), e)] -> IO (BMatrix t (m, n) e)
unsafeWithElemPtr :: Elem e => BMatrix t (m, n) e -> (Int, Int) -> (Ptr e -> IO a) -> IO a
unsafeRowView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)
unsafeColView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)
unsafeGetRow :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r n e)
unsafeGetCol :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r m e)
unsafeDiag :: Elem e => BMatrix t (m, n) e -> Int -> DVector t k e
unsafeFreeze :: BMatrix t mn e -> Banded mn e
unsafeThaw :: BMatrix t mn e -> IOBanded mn e
The mutable banded matrix data type
data BMatrix t mn e Source
Constructors
BM
fptrOf :: !!(ForeignPtr e)
offsetOf :: !!Int
size1 :: !!Int
size2 :: !!Int
lowBW :: !!Int
upBW :: !!Int
ldaOf :: !!Int
isHerm :: !!Bool
show/hide Instances
Matrix (BMatrix t)
BLAS2 e => RMatrix (BMatrix s) e
BLAS2 e => IMatrix (BMatrix Imm) e
BLAS1 e => Scalable (BMatrix Imm ((,) m n)) e
BLAS1 e => ITensor (BMatrix Imm ((,) m n)) ((,) Int Int) e
BLAS1 e => RTensor (BMatrix t ((,) m n)) ((,) Int Int) e IO
BLAS1 e => MTensor (BMatrix Mut ((,) m n)) ((,) Int Int) e IO
(BLAS1 e, Eq e) => Eq (BMatrix Imm ((,) m n) e)
BLAS1 e => Show (BMatrix Imm ((,) m n) e)
(BLAS1 e, AEq e) => AEq (BMatrix Imm ((,) m n) e)
type IOBanded = BMatrix MutSource
module BLAS.Matrix.Base
module BLAS.Tensor.Base
module BLAS.Tensor.Dense.ReadOnly
module BLAS.Tensor.ReadOnly
module BLAS.Tensor.Mutable
Creating new matrices
newBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [((Int, Int), e)] -> IO (BMatrix t (m, n) e)Source
newBanded_ :: Elem e => (Int, Int) -> (Int, Int) -> IO (BMatrix t (m, n) e)Source
newListsBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [[e]] -> IO (BMatrix t (m, n) e)Source
Views
Rows and columns
rowView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)Source
colView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)Source
getRow :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r n e)Source
getCol :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r m e)Source
Diagonals
diag :: Elem e => BMatrix t (m, n) e -> Int -> DVector t k eSource
Operations
module Data.Matrix.Banded.Operations
Converting to and from banded matrices
ForeignPtrs
toForeignPtr :: BMatrix t (m, n) e -> (ForeignPtr e, Int, (Int, Int), (Int, Int), Int, Bool)Source
fromForeignPtr :: ForeignPtr e -> Int -> (Int, Int) -> (Int, Int) -> Int -> Bool -> BMatrix t (m, n) eSource
Bandwith properties
bandwidth :: BMatrix t (m, n) e -> (Int, Int)Source
numLower :: BMatrix t (m, n) e -> IntSource
numUpper :: BMatrix t (m, n) e -> IntSource
Coercing
coerceBanded :: BMatrix t mn e -> BMatrix t kl eSource
Coerce the phantom shape type from one type to another.
Unsafe operations
unsafeNewBanded :: BLAS1 e => (Int, Int) -> (Int, Int) -> [((Int, Int), e)] -> IO (BMatrix t (m, n) e)Source
unsafeWithElemPtr :: Elem e => BMatrix t (m, n) e -> (Int, Int) -> (Ptr e -> IO a) -> IO aSource
unsafeRowView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)Source
unsafeColView :: Elem e => BMatrix t (m, n) e -> Int -> (Int, DVector t k e, Int)Source
unsafeGetRow :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r n e)Source
unsafeGetCol :: BLAS1 e => BMatrix t (m, n) e -> Int -> IO (DVector r m e)Source
unsafeDiag :: Elem e => BMatrix t (m, n) e -> Int -> DVector t k eSource
unsafeFreeze :: BMatrix t mn e -> Banded mn eSource
unsafeThaw :: BMatrix t mn e -> IOBanded mn eSource
Produced by Haddock version 2.3.0