Copyright | (c) Sam Stites 2017 |
---|---|
License | BSD3 |
Maintainer | sam@stites.io |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- minall :: Tensor d -> HsReal
- maxall :: Tensor d -> HsReal
- medianall :: Tensor d -> HsReal
- sumall :: Tensor d -> HsAccReal
- prodall :: Tensor d -> HsAccReal
- min :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls))))
- max :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls))))
- median :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls))))
- minIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat]))
- min1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1]))
- maxIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat]))
- max1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1]))
- max2d0 :: (KnownDim m, KnownNat n, KnownDim n) => Tensor '[n, m] -> KeepDim -> (Tensor '[1, m], Maybe (IndexTensor '[1, m]))
- max2d1 :: (KnownDim n, KnownDim m, KnownNat m) => Tensor '[n, m] -> KeepDim -> (Tensor '[n, 1], Maybe (IndexTensor '[n, 1]))
- medianIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat]))
- median1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1]))
- sum :: Dimensions d' => Tensor d -> Word -> KeepDim -> Tensor d'
- rowsum :: All KnownDim '[r, c] => Tensor '[r, c] -> Tensor '[1, c]
- colsum :: All KnownDim '[r, c] => Tensor '[r, c] -> Tensor '[r, 1]
- _prod :: Tensor d -> Tensor d -> Word -> Maybe KeepDim -> IO ()
Documentation
min :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls)))) Source #
Static call to min
max :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls)))) Source #
Static call to max
median :: forall d n ix rs ls. All Dimensions '[d, rs ++ ('[1] ++ ls)] => All KnownNat '[n, ix] => All KnownDim '[n, ix] => (Length d > ix) ~ True => '(rs, n :+ ls) ~ SplitAt ix d => Tensor d -> Dim ix -> KeepDim -> (Tensor (rs ++ ('[1] ++ ls)), Maybe (IndexTensor (rs ++ ('[1] ++ ls)))) Source #
Static call to median
minIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat])) Source #
Convenience method for min
min1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1])) Source #
Convenience method for min
maxIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat])) Source #
Convenience method for max
max1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1])) Source #
Convenience method for max
over vectors
max2d0 :: (KnownDim m, KnownNat n, KnownDim n) => Tensor '[n, m] -> KeepDim -> (Tensor '[1, m], Maybe (IndexTensor '[1, m])) Source #
Convenience method for max
over matricies
max2d1 :: (KnownDim n, KnownDim m, KnownNat m) => Tensor '[n, m] -> KeepDim -> (Tensor '[n, 1], Maybe (IndexTensor '[n, 1])) Source #
Convenience method for max
over matricies
medianIndex1d :: (KnownNat n, KnownDim n) => Tensor (n ': ([] :: [Nat])) -> IndexTensor (1 ': ([] :: [Nat])) Source #
Convenience method for median
median1d :: (KnownNat n, KnownDim n) => Tensor '[n] -> KeepDim -> (Tensor '[1], Maybe (IndexTensor '[1])) Source #
Convenience method for median
rowsum :: All KnownDim '[r, c] => Tensor '[r, c] -> Tensor '[1, c] Source #
convenience function for sum