Copyright | (c) Nils Alex 2020 |
---|---|
License | MIT |
Maintainer | nils.alex@fau.de |
Safe Haskell | Safe |
Language | Haskell2010 |
Scalar types for usage as Tensor values.
Documentation
Linear combination represented as mapping from variable number to prefactor.
Polynomial: Can be constant, affine, or something of higher rank which is not yet implemented.
Const !a | constant value |
Affine !a !(Lin a) | constant value plus linear term |
NotSupported | higher rank |
Instances
Eq a => Eq (Poly a) Source # | |
(Num a, Eq a) => Num (Poly a) Source # | |
Ord a => Ord (Poly a) Source # | |
Show a => Show (Poly a) Source # | |
Generic (Poly a) Source # | |
NFData a => NFData (Poly a) Source # | |
Defined in Math.Tensor.LinearAlgebra.Scalar | |
type Rep (Poly a) Source # | |
Defined in Math.Tensor.LinearAlgebra.Scalar type Rep (Poly a) = D1 ('MetaData "Poly" "Math.Tensor.LinearAlgebra.Scalar" "safe-tensor-0.2.1.1-HV6XtoU04VwKCpzbN3KLoQ" 'False) (C1 ('MetaCons "Const" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)) :+: (C1 ('MetaCons "Affine" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Lin a))) :+: C1 ('MetaCons "NotSupported" 'PrefixI 'False) (U1 :: Type -> Type))) |
Produces an affine value \(c + a\cdot x_i\)