Taylor expansions in independent variables (support AbstractGraph)
API
FeynmanDiagram.Taylor — Module
TaylorSeriesA Julia package for Taylor expansions in one or more independent variables.
The basic constructors is TaylorSeries.
FeynmanDiagram.Taylor.ParamsTaylor — Type
ParamsTaylor
DataType holding the current parameters for `TaylorSeries`.
This part of code is adopted from TaylorSeries.jl (https://github.com/JuliaDiff/TaylorSeries.jl)Fields:
orders :: IntOrders (degree) of the polynomialsnum_vars :: IntNumber of variablesvariable_names :: Vector{String}Names of the variablesvariable_symbols :: Vector{Symbol}Symbols of the variables
These parameters can be changed using set_variables
FeynmanDiagram.Taylor.TaylorSeries — Type
mutable struct TaylorSeries{T}
A representation of a taylor series.Members:
name::Symbolname of the diagramcoeffs::Dict{Vector{Int},T}The taylor expansion coefficients. The integer array define the order of corresponding coefficient.
FeynmanDiagram.Taylor.TaylorSeries — Method
function TaylorSeries(::Type{T}, nv::Int) where {T}
Create a taylor series equal to variable with index nv. For example, if global variables are "x y", in put nv=2 generate series t=y.Arguments:
::Type{T}DataType of coefficients in taylor series.nv::IntIndex of variable.
FeynmanDiagram.Taylor.displayBigO — Method
displayBigO(d::Bool) --> nothingSet/unset displaying of the big 𝒪 notation in the output of Taylor1 and TaylorN polynomials. The initial value is true.
FeynmanDiagram.Taylor.getcoeff — Method
function getcoeff(g::TaylorSeries, order::Vector{Int})
Return the taylor coefficients with given order in taylor series g.Arguments:
gTaylor seriesorderOrder of target coefficients
FeynmanDiagram.Taylor.getderivative — Method
function getderivative(g::TaylorSeries, order::Vector{Int})
Return the derivative with given order in taylor series g.Arguments:
gTaylor seriesorderOrder of derivative
FeynmanDiagram.Taylor.set_variables — Method
set_variables([T::Type], names::String; [orders=get_orders(), numvars=-1])Return a TaylorSeries{T} vector with each entry representing an independent variable. names defines the output for each variable (separated by a space). The default type T is Float64, and the default for orders is the one defined globally.
If numvars is not specified, it is inferred from names. If only one variable name is defined and numvars>1, it uses this name with subscripts for the different variables.
julia> set_variables(Int, "x y z", orders=[4,4,4])
3-element Array{TaylorSeries.Taylor{Int},1}:
1 x + 𝒪(x⁵y⁵z⁵)
1 y + 𝒪(x⁵y⁵z⁵)
1 z + 𝒪(x⁵y⁵z⁵)FeynmanDiagram.Taylor.taylor_binomial — Method
function taylor_binomial(o1::Vector{Int}, o2::Vector{Int})
Return the taylor binomial prefactor when product two high-order derivatives with order o1 and o2.
# Arguments:
- `o1` Order of first derivative
- `o2` Order of second derivativeFeynmanDiagram.Taylor.taylor_factorial — Method
function taylor_factorial(o::Vector{Int})
Return the taylor factorial prefactor with order o.
# Arguments:
- `o` Order of the taylor coefficientFeynmanDiagram.Taylor.use_show_default — Method
use_Base_show(d::Bool) --> nothingUse Base.show_default method (default show method in Base), or a custom display. The initial value is false, so customized display is used.