Docstrings
PseudostableRecurrences.AbstractLinearRecurrence
— TypeAbstractLinearRecurrence{T} <: AbstractRecurrence{T}
A recurrence where the results are linear w.r.t. the initial conditions. To support pseudostablization, the following methods are needed:
rdiv!(::AbstractLinearRecurrence, x::Number)
: divides the system byx
. It is used to prevent overflow.LinearAlgebra.norm(step!(::AbstractLinearRecurrence), Inf)
: computes the ∞-norm of a step. It is used to get the amplification of the system.
PseudostableRecurrences.AbstractLinearRecurrencePlan
— TypeAbstractLinearRecurrencePlan <: AbstractRecurrencePlan
A recurrence plan where the results are linear w.r.t. the initial conditions. Pseudostablization algorithm on linear recurrences is implemented.
PseudostableRecurrences.AbstractRecurrence
— TypeAbstractRecurrence{T}
The abstract type where a recurrence instance runs. It needs to support the following methods:
step!(::AbstractRecurrence)
: step forward the recurrence. Returnsnothing
if the recurrence terminates, otherwise returns a view of the stepping result.
PseudostableRecurrences.AbstractRecurrencePlan
— TypeAbstractRecurrencePlan
The abstract type of recurrence plans. A recurrence plan should include all the information that can perform a recurrence with a precision. It needs to support the following methods:
init(::AbstractRecurrencePlan; T=Float64, init=:default)
: generates anAbstractRecurrence
object where the actual recurrence runs on. Returns a vector of the view of the initial steps as well.T
is the underlying type where the precision is implied.init
tells how the initial values are generated. Must support:default
for the forward recurrence to run. It is also suggested to support:rand
for the pseudostablization algorithm.
PseudostableRecurrences.StencilRecurrence
— TypeStencilRecurrence{N,T,S,
+Docstrings · PseudostableRecurrences Docstrings
PseudostableRecurrences.AbstractLinearRecurrence
— TypeAbstractLinearRecurrence{T} <: AbstractRecurrence{T}
A recurrence where the results are linear w.r.t. the initial conditions. To support pseudostablization, the following methods are needed:
rdiv!(::AbstractLinearRecurrence, x::Number)
: divides the system by x
. It is used to prevent overflow.LinearAlgebra.norm(step!(::AbstractLinearRecurrence), Inf)
: computes the ∞-norm of a step. It is used to get the amplification of the system.
sourcePseudostableRecurrences.AbstractLinearRecurrencePlan
— TypeAbstractLinearRecurrencePlan <: AbstractRecurrencePlan
A recurrence plan where the results are linear w.r.t. the initial conditions. Pseudostablization algorithm on linear recurrences is implemented.
sourcePseudostableRecurrences.AbstractRecurrence
— TypeAbstractRecurrence{T}
The abstract type where a recurrence instance runs. It needs to support the following methods:
step!(::AbstractRecurrence)
: step forward the recurrence. Returns nothing
if the recurrence terminates, otherwise returns a view of the stepping result.
sourcePseudostableRecurrences.AbstractRecurrencePlan
— TypeAbstractRecurrencePlan
The abstract type of recurrence plans. A recurrence plan should include all the information that can perform a recurrence with a precision. It needs to support the following methods:
init(::AbstractRecurrencePlan; T=Float64, init=:default)
: generates an AbstractRecurrence
object where the actual recurrence runs on. Returns a vector of the view of the initial steps as well.T
is the underlying type where the precision is implied. init
tells how the initial values are generated. Must support :default
for the forward recurrence to run. It is also suggested to support :rand
for the pseudostablization algorithm.
sourcePseudostableRecurrences.StencilRecurrence
— TypeStencilRecurrence{N,T,S,
COEF<:NTuple{S,AbstractArray{T,N}},
TB<:AbstractArray{T,N},}
- (stencil, coef, buffer, slicestart, sliceend, lastind)
Properties
For coef
and slicesupport
, tt's suggested to use lazy arrays for performance.
stencil::NTuple{S, CartesianIndex{N}}
: The relative index of the stencil. Can contain (0,0)
(see coef
)coef::COEF<:NTuple{S,AbstractArray{T,N}}
: The coefficient associated with each relative index. The one associated with CartesianIndex(0,0)
refers to a constant added to that entry. It's suggested to use lazy arrays for performance.buffer::CircularArray{T,N,TB<:AbstractArray{T,N}}
: a buffer to store temp results. slicestart::MVector{N, Int}
and sliceend::MVector{N, Int}
: marks the current range of entries to be determined. Technically NTuple{N-1, Int}
should work, but Julia
doesn't support computed type parameters.lastslice::Int
: marks the index of the slice where the recurrence terminates.
sourcePseudostableRecurrences.StencilRecurrencePlan
— TypeStencilRecurrencePlan{N, S, COEF<:NTuple{S,Function}, INIT<:Function} <: AbstractLinearRecurrencePlan
Properties
stencil::SVector{S, CartesianIndex{N}}
: The relative index of the stencil. Can contain (0,0)
(see coef
)coef::COEF<:NTuple{S,Function}
: The coefficient associated with each relative index. The one associated with CartesianIndex(0,0)
refers to a constant added to that entry. The functions should be in the form f(I..., T)
where I
is the index of the stencil and T
is the suggested return type. Coefficients should be at least as accurate as T
. Exact-value types such as Irrational
, Rational
or Integer
would do the job, and if that's not possible, BigFloat
would work as well.init::INIT<:Function
: the function used for initial values. The functions should be in the form f(I..., T)
where I
is the size of the array and T
is the eltype.size::Dims{N}
: the size of the whole array.offset::NTuple{N,Int}
: the very first index where the recurrence starts at.
sourcePseudostableRecurrences.precision_shift
— Methodprecision_shift(P::AbstractLinearRecurrencePlan)
Estimates log2
of the amplification of P
by performing a full recurrence based on random initial conditions.
sourceSettings
This document was generated with Documenter.jl version 1.2.1 on Wednesday 31 January 2024. Using Julia version 1.6.7.
+ (stencil, coef, buffer, slicestart, sliceend, lastind)
Properties
For coef
and slicesupport
, tt's suggested to use lazy arrays for performance.
stencil::NTuple{S, CartesianIndex{N}}
: The relative index of the stencil. Can contain(0,0)
(seecoef
)coef::COEF<:NTuple{S,AbstractArray{T,N}}
: The coefficient associated with each relative index. The one associated withCartesianIndex(0,0)
refers to a constant added to that entry. It's suggested to use lazy arrays for performance.buffer::CircularArray{T,N,TB<:AbstractArray{T,N}}
: a buffer to store temp results.slicestart::MVector{N, Int}
andsliceend::MVector{N, Int}
: marks the current range of entries to be determined. TechnicallyNTuple{N-1, Int}
should work, butJulia
doesn't support computed type parameters.lastslice::Int
: marks the index of the slice where the recurrence terminates.
PseudostableRecurrences.StencilRecurrencePlan
— TypeStencilRecurrencePlan{N, S, COEF<:NTuple{S,Function}, INIT<:Function} <: AbstractLinearRecurrencePlan
Properties
stencil::SVector{S, CartesianIndex{N}}
: The relative index of the stencil. Can contain(0,0)
(seecoef
)coef::COEF<:NTuple{S,Function}
: The coefficient associated with each relative index. The one associated withCartesianIndex(0,0)
refers to a constant added to that entry. The functions should be in the formf(I..., T)
whereI
is the index of the stencil andT
is the suggested return type. Coefficients should be at least as accurate asT
. Exact-value types such asIrrational
,Rational
orInteger
would do the job, and if that's not possible,BigFloat
would work as well.init::INIT<:Function
: the function used for initial values. The functions should be in the formf(I..., T)
whereI
is the size of the array andT
is the eltype.size::Dims{N}
: the size of the whole array.offset::NTuple{N,Int}
: the very first index where the recurrence starts at.
PseudostableRecurrences.precision_shift
— Methodprecision_shift(P::AbstractLinearRecurrencePlan)
Estimates log2
of the amplification of P
by performing a full recurrence based on random initial conditions.
PseudostableRecurrences.slicetype
— Methodslicetype(T)
Get the type of a slice of T
Examples
julia> using PseudostableRecurrences: slicetype
+
+julia> slicetype(Matrix{Float64})
+Vector{Float64} (alias for Array{Float64, 1})
+
+julia> slicetype(UnitRange{Int})
+Int64
+
+julia> slicetype(BitArray{3})
+BitMatrix (alias for BitArray{2})