AutoVectors.AutoVectorType
AutoVector(def=0.0,mini::Integer=1,maxi::Integer=0,miniloc::Integer=0)
AutoVector(f::Function,mini::Integer=1,maxi::Integer=0,miniloc::Integer=0)
AutoVector(v::Vector,mini::Integer=1,maxi::Integer=0,miniloc::Integer=0)

Frequently you just use

v = AutoVector(), defaulting to Float64, size 0

or v = AutoVector(0), defaulting to Int64, size 0

An AutoVector expands when written to outside its range. Reading outside its range does not expand the range, and gives def.

Arguments:

def–default element, usually 0.0. Determines the type T of AutoVector{T}

mini and maxi give the index range of the created AutoVector (logical indices, not index in data vector)

miniloc is the location of mini-1 within the data vector, default 0 (data index)

You can initialize an AutoVector with the default, from a function, or by putting in a vector. Most functions and constructors deal with logical indices, Data indices refers to location within the data vector dat, which should not be something to worry about normally.

AutoVectors.applyshiftMethod
applyshift(x::AutoVector,offset::Integer)

Create a new AutoVector shifted to left by offset, sharing the same data array.

AutoVectors.avdotMethod
avdot(x::AutoVector,y::AutoVector)

Dot product (with no complex conjugating), sumi xi y_i over the intersection of ranges.

AutoVectors.avrangeMethod
avrange(v::AutoVector)

The logical range as mini:maxi. A synonym is arange.

AutoVectors.avtripconvMethod
avtripconv(u::AutoVector,g::AutoVector,v::AutoVector)

Same as avdot(convolve(u,g),v)

AutoVectors.avtripleMethod
avtriple(x::AutoVector,y::AutoVector,z::AutoVector)

Triple dot product (with no complex conjugating), sumi xi yi zi over the intersection of ranges.

AutoVectors.avvecMethod
avvec(v::AutoVector)

avvec(v) creates a standard Vector with all values from mini to maxi; the new Vector does not know mini; it only knows its length, given by maxi-mini+1.

AutoVectors.convolveFunction
convolve(x::AutoVector,y::AutoVector,cut=1.0e-14)		# use absolute cutoff

Convolve with cutoff; no writing of elements if abs(value) < cut

AutoVectors.doprintMethod
doprint([file descriptor],v::AutoVector; spacing = 1)

Print all the elements to standard output or a file, with indices scaled by spacing.

AutoVectors.fastMethod
fast(v::AutoVector,i)

fast(v,i) is like accessing v[i], but without the check for being outside the logical range. If i is outside, fast may or may not throw a standard range exception depending on whether i lands outside the data vector's range. For use when i is known to be inside the logical range. Combined with @inbounds, there will be no range checking at all, for optimal speed.

AutoVectors.fftavMethod
fftav(f::AutoVector{Float64},delta)

For a real function f(x) defined by sampling on a uniform grid with spacing delta, returns a tuple (F, freqsp, len), where F is the Fourier Transform as an AutoVector(ComplexF64), freqsp is the frequency spacing of F, and len the length of the vector used in the FFT (to be used in ifftav). Implicitly, the function is assumed to be zero outside the range of the input. The normalizations are different from the usual discrete FT conventions, incorporating the spacing, and corresponding to a continuous integral. The FT is defined as

$F(k) = \frac{1}{\sqrt{2 \pi}} \int dx e^{-i k x} f(x)$

AutoVectors.ifftavMethod

ifftav(F::AutoVector{ComplexF64},freqspacing,maxind)

For a function F_i defined on a uniform frequency grid with spacing freqspacing, returns the Inverse Fourier Transform.

$f(x) = \frac{1}{\sqrt{2 \pi}} \int dk e^{i k x} F(k)$

AutoVectors.makeAutoVectorOfVecsMethod
makeAutoVectorOfVecs(veczero::Vector,mini::Integer,maxi::Integer)

Create an AutoVector that holds Vectors as elements, an AutoVecotr of Vectors. The zero default Vector is veczero.

AutoVectors.makeautoMethod
makeauto(v::Vector{T};offset=nothing, firstindex=nothing, cutoff=0.0) where T

Make an AutoVector out of a Vector, producing a new data vector. If offset is supplied, shifts data to left by offset. If firstindex is supplied, it makes mini=firstindex. You can't specify both offset and firstindex. With cutoff nonzero, elements are only put in if abs(el) > cutoff. To put in a part of a Vector at a particular range, say putting elements 2 to 4 at positions 5 to 7, do this: makeauto(v[2:4],firstindex=5)

AutoVectors.olaprangeMethod
olaprange(v::AutoVector,w::AutoVector)

olaprange(v,w) gives range of overlapping indices of AutoVectors v and w, given as a:b.

AutoVectors.reverse_indMethod
reverse_ind(x::AutoVector)

A reflection about the origin; the new AutoVector goes from -maxi to -mini.

AutoVectors.shrink!Method
shrink!(x::AutoVector,cut)

Adjust mini and maxi to omit tails where all elements are less than cut in absolute value.

AutoVectors.subavMethod
subav(x::AutoVector,newmini::Integer,newmaxi::Integer)

Create a new AutoVector with the indicated range, sharing the same data array

Base.:*Method

Multiply all elements of a AutoVector by a Float64

Base.:*Method
*(coef::Vector{Float64},v::Vector{AutoVector{Float64}})

Add a vector of AutoVectors together scaled by coefficients

Base.:+Method

Add a Float64 to all elements of a AutoVector

Base.:-Method

Subtract AutoVectors

Base.:-Method

Subtract a Float64 from all elements of a AutoVector{Float64}

Base.lengthMethod
length(v::AutoVector)

Logical length.

Base.setindex!Method

Assign the value, but outside bounds forces resizing and adjustment of mini or maxi

LinearAlgebra.axpy!Method
axpy!(y::AutoVector,a::Float64,x::AutoVector, cutoff::Float64)	# y += a * x with cutoff for writing