| Copyright | David Johnson (c) 2019-2026 |
|---|---|
| License | BSD 3 |
| Maintainer | David Johnson <code@dmj.io> |
| Stability | Experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
ArrayFire.Index
Description
Functions for indexing into an Array
Synopsis
- index :: Array a -> [Seq] -> Array a
- lookup :: Array a -> Array Int -> Int -> Array a
- assignSeq :: Array a -> [Seq] -> Array a -> Array a
- indexGen :: Array a -> [Index] -> Array a
- assignGen :: Array a -> [Index] -> Array a -> Array a
- afSpan :: Seq
- full :: Index
- class ToIndexList a where
- toIndexList :: a -> [Index]
- idx :: Seq -> Index
- (!) :: ToIndexList ix => Array a -> ix -> Array a
- (.~) :: ToIndexList ix => ix -> Array a -> Array a -> Array a
Documentation
Lookup an Array by keys along a specified dimension
Select the full extent of a dimension. Use in tuple indices where you want all elements along an axis.
arr ! (range 0 2, full, at 1)
class ToIndexList a where Source #
Convert index expressions to a list of Index.
Supports a single Index or tuples of up to four Index values
(matching ArrayFire's maximum of 4 dimensions).
Methods
toIndexList :: a -> [Index] Source #
Instances
| ToIndexList Index Source # | |
Defined in ArrayFire.Index Methods toIndexList :: Index -> [Index] Source # | |
| ToIndexList (Index, Index) Source # | |
Defined in ArrayFire.Index | |
| ToIndexList (Index, Index, Index) Source # | |
Defined in ArrayFire.Index | |
| ToIndexList (Index, Index, Index, Index) Source # | |
Defined in ArrayFire.Index | |