free-vector-spaces-0.1.5.0: Instantiate the classes from the vector-space package with types from linear

Copyright(c) Justus Sagemüller 2016
LicenseGPL v3
Maintainer(@) sagemueller $ geo.uni-koeln.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.VectorSpace.Free.Sequence

Description

 

Synopsis

Documentation

data GSequence array n Source #

The space of possibly-infinite sequences, isomorphic to the space of all lists but implemented more efficiently (with exponentially-growing chunks of unboxed data, so the overhead is amortised). In other words, this is a type of spine-lazy but element-strict arrays.

This space is dual to FinSuppSeq, which is completely strict.

Constructors

Sequence 

Fields

  • sequenceHeads :: !(array n)

    Length must be at most minimumChunkSize in the outer constructor and double in each deeper layer. (Specification subject to future change!) If the length at depth 𝑑 is less than 2^𝑑, the remaining entries are treated as zeroes.

  • sequenceRemain :: GSequence array n
     
SoloChunk 

Fields

Instances

(Unbox n, Num n) => IsList (Sequence n) Source # 

Associated Types

type Item (Sequence n) :: * #

Methods

fromList :: [Item (Sequence n)] -> Sequence n #

fromListN :: Int -> [Item (Sequence n)] -> Sequence n #

toList :: Sequence n -> [Item (Sequence n)] #

Functor (GSequence Vector) Source # 

Methods

fmap :: (a -> b) -> GSequence Vector a -> GSequence Vector b #

(<$) :: a -> GSequence Vector b -> GSequence Vector a #

(Unbox n, Show n, Num n) => Show (Sequence n) Source # 

Methods

showsPrec :: Int -> Sequence n -> ShowS #

show :: Sequence n -> String #

showList :: [Sequence n] -> ShowS #

(Num n, Unbox n) => AffineSpace (Sequence n) Source # 

Associated Types

type Diff (Sequence n) :: * #

Methods

(.-.) :: Sequence n -> Sequence n -> Diff (Sequence n) #

(.+^) :: Sequence n -> Diff (Sequence n) -> Sequence n #

(Num n, Unbox n) => HasBasis (Sequence n) Source # 

Associated Types

type Basis (Sequence n) :: * #

(Num n, Unbox n) => VectorSpace (Sequence n) Source # 

Associated Types

type Scalar (Sequence n) :: * #

Methods

(*^) :: Scalar (Sequence n) -> Sequence n -> Sequence n #

(Num n, Unbox n) => AdditiveGroup (Sequence n) Source # 
type Item (Sequence n) Source # 
type Item (Sequence n) = n
type Diff (Sequence n) Source # 
type Diff (Sequence n) = Sequence n
type Basis (Sequence n) Source # 
type Basis (Sequence n) = Int
type Scalar (Sequence n) Source # 
type Scalar (Sequence n) = n