free-vector-spaces-0.1.4.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

type Sequence = GSequence Vector Source

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

chunkOffset :: !Int
 
soloChunk :: !(array n)

Length plus offset must be at most minimumChunkSize if this is the outer constructor and can double in each deeper layer.

Instances

(Unbox n, Num n) => IsList (Sequence n) Source 
Functor (GSequence Vector) Source 
(Unbox n, Show n, Num n) => Show (Sequence n) Source 
(Num n, Unbox n) => VectorSpace (Sequence n) Source 
(Num n, Unbox n) => AdditiveGroup (Sequence n) Source 
(Num n, Unbox n) => HasBasis (Sequence n) Source 
(Num n, Unbox n) => AffineSpace (Sequence n) Source 
type Item (Sequence n) = n Source 
type Scalar (Sequence n) = n Source 
type Basis (Sequence n) = Int Source 
type Diff (Sequence n) = Sequence n Source