Vector types

This sections contains a list of the different supported vector types accompanied with the functions specific to those types.

Compact vectors

The abstract type for vectors with a finite number of non-zero elements is

CompactInfiniteVector

There are two types that support compact vectors. The second one is fully typed.

InfiniteVectors.CompactInfiniteVectorType
mutable struct CompactInfiniteVector{T} <: AbstractFiniteNZInfiniteVector{T}

A CompactInfiniteVector contains a sequence of nonzero elements starting at a given offset.

CompactInfiniteVector(a::AbstractVector{T}, offset = 0)

Construct a CompactInfiniteVector with indices starting at offset.

Examples

julia> CompactInfiniteVector(1:3,-1)
CompactInfiniteVector{Int64} with indices ℤ:
[  …, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, …  ]
source
InfiniteVectors.FixedInfiniteVectorType
struct FixedInfiniteVector{L,OFS,T} <: AbstractFiniteNZInfiniteVector{T}

A FixedInfiniteVector is a fully typed sequence of nonzero elements starting at a given offset.

FixedInfiniteVector(a::AbstractVector{T}, offset = 0)

Construct a FixedInfiniteVector with indices starting at offset.

Examples

julia> FixedInfiniteVector(1:3,-1)
FixedInfiniteVector{3,-1,Int64} with indices ℤ:
[  …, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, …  ]
source

For the dirac delta a special constructor is present.

InfiniteVectors.δFunction
δ(n::Int)

Construct Dirac delts, i.e., a bi-infinite vector with δ(k)=1, if k=n, and δ(k)=0, otherwise.

source

Functions specific to compact vectors

InfiniteVectors.subvectorFunction
subvector(vec::CompactInfiniteVector) = vec.subvec

The vector of values at eachnonzeroindex

source
subvector(vec::AbstractPeriodicInfiniteVector)

The vector that goes from 0 to P-1, where P is the period of vec"

source

Periodic vectors

InfiniteVectors.PeriodicInfiniteVectorType
mutable struct PeriodicInfiniteVector{T} <: AbstractPeriodicInfiniteVector{T}

A doubly infinite vector that has a period.

PeriodicInfiniteVector(a::AbstractVector{T})

Construct a PeriodicInfiniteVector. The first element of a becomes the element at index zero, the second one at index 1.

Examples

julia> PeriodicInfiniteVector(1:3)
PeriodicInfiniteVector{Int64} with indices ℤ:
[  …, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, …  ]
source

Functions specific to periodic vectors