nuha-0.3.0.0: Multidimensional arrays, Linear algebra, Numerical analysis
Copyright(c) Johannes Kropp
LicenseBSD 3-Clause
MaintainerJohannes Kropp <jodak932@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Math.Nuha.Internal

Description

 
Synopsis

Documentation

cartProd :: [[Int]] -> [[Int]] Source #

cartesian product for a list of lists

fromIndexToMultiIndex :: [Int] -> Int -> [Int] Source #

unsafe function for convert an 1d index (of the holor values) to a multiindex of the holor

fromMultiIndexToIndex Source #

Arguments

:: [Int]

strides

-> [Int]

multiindex

-> Int

index

unsafe function for convert multiindex of the holor to a an 1d index (of the holor values)

fromShapeToStrides :: [Int] -> [Int] Source #

calculates the holor strides from the holor shape

fromShapeToMultiIndices :: [Int] -> [[Int]] Source #

calculates all possible multiindices for a holor from its shape

isValidIdx Source #

Arguments

:: Int

length

-> Int

idx

-> Bool 

tests if an index is valid

isValidMIdx Source #

Arguments

:: [Int]

shape

-> [Int]

multiindex

-> Bool 

tests if a multiindex is valid

isValidMIdcs Source #

Arguments

:: [Int]

shape

-> [[Int]]

multiindices

-> Bool 

tests if multiindices are valid