diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a1d5e5f..62f6863 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-04T16:02:34","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-11-04T16:02:59","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 3d8171d..c25cf94 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,18 +1,18 @@ -PTYQoL.jl · PTYQoL

PTYQoL.jl

PTYQoL.fieldsMethod
@generated fields(::Type{T}) where T = fieldnames(T)

The same as fieldnames, but is @generated so is fast.

source
PTYQoL.fracpochhammerMethod
fracpochhammer(a, b, n)

Calculate the fraction of two Pochhammer symbols $\frac{(a)_n}{(b)_n}$ by multiplying the fractions. This approach reduces the risk of overflow/underflow when $n$ is large.

Examples

julia> fracpochhammer(1, 2, 3) # (1 * 2 * 3) / (2 * 3 * 4)
+PTYQoL.jl · PTYQoL

PTYQoL.jl

PTYQoL.fieldsMethod
@generated fields(::Type{T}) where T = fieldnames(T)

The same as fieldnames, but is @generated so is fast.

source
PTYQoL.fracpochhammerMethod
fracpochhammer(a, b, n)

Calculate the fraction of two Pochhammer symbols $\frac{(a)_n}{(b)_n}$ by multiplying the fractions. This approach reduces the risk of overflow/underflow when $n$ is large.

Examples

julia> fracpochhammer(1, 2, 3) # (1 * 2 * 3) / (2 * 3 * 4)
 0.25
fracpochhammer(a, b, stepa, stepb, n)

Similar to fracpochhammer(a, b, n), except that the steps of the Pochhammer symbols are not necessarily $1$.

Examples

julia> fracpochhammer(1, 2, 0.5, 1, 3) # (1 * 1.5 * 2) / (2 * 3 * 4)
-0.125
source
PTYQoL.isaliasMethod
isalias(type)

Check if a type is alias.

Examples

julia> isalias(Vector)
+0.125
source
PTYQoL.isaliasMethod
isalias(type)

Check if a type is alias.

Examples

julia> isalias(Vector)
 true
 
 julia> isalias(Array)
-false
source
PTYQoL.seealsoMethod
seealso(s...)

Produce the "See also" parts of docstrings.

julia> seealso(sin)
+false
source
PTYQoL.seealsoMethod
seealso(s...)

Produce the "See also" parts of docstrings.

julia> seealso(sin)
 "See also [`sin`](@ref)."
 
 julia> seealso(sin, cos)
 "See also [`sin`](@ref) and [`cos`](@ref)."
 
 julia> seealso(sin, cos, tan)
-"See also [`sin`](@ref), [`cos`](@ref) and [`tan`](@ref)."
source
PTYQoL.@Vararg1Macro
@Vararg1

Use before a function definition to let x::T... means at least one (instead of zero by Julia default) of type T. This can be used to avoid ambiguity as all Vararg{T} overlap at zero argument.

Example

julia> mysum1(x::Int...) = x
+"See also [`sin`](@ref), [`cos`](@ref) and [`tan`](@ref)."
source
PTYQoL.@Vararg1Macro
@Vararg1

Use before a function definition to let x::T... means at least one (instead of zero by Julia default) of type T. This can be used to avoid ambiguity as all Vararg{T} overlap at zero argument.

Example

julia> mysum1(x::Int...) = x
 mysum1 (generic function with 1 method)
 
 julia> mysum1() # works for 0 argument
@@ -31,7 +31,7 @@
 mysum2 (generic function with 2 methods)
 
 julia> mysum2()
-ERROR: MethodError: no method matching mysum2()
source
PTYQoL.@struct_allMacro
@struct_all(TYP, op)
 @struct_all(TYP, ops...)

Define the operator of the type TYP by applying the operator to each field and return true only when all the results are true. See also @struct_any, @struct_copy and @struct_map.

Example

julia> struct Foo
        a
        b
@@ -55,7 +55,7 @@
 julia> @struct_all Foo Base.:(==) Base.isequal Base.isapprox Base.isfinite
 
 julia> x==y, isequal(x,y), isapprox(x,y), isfinite(x)
-(true, true, true, true)
source
PTYQoL.@struct_anyMacro
@struct_any(TYP, op)
 @struct_any(TYP, ops...)

Define the binary operator of the type TYP by applying the operator to each field and return true when any of the results is true. See also @struct_all, @struct_copy and @struct_map.

Example

julia> struct Foo
        a
        b
@@ -73,7 +73,7 @@
 julia> @struct_any Foo Base.isinf Base.isnan
 
 julia> isinf(x), isnan(x)
-(true, true)
source
PTYQoL.@struct_mapMacro
@struct_map(TYP, op)
 @struct_map(TYP, ops...)

Define the function(s) of the type TYP by applying the function(s) to each field and generate a new TYP with the values. The generated function(s) are somehow faster than the naive implementation. See also @struct_all, @struct_any and @struct_copy.

Example

julia> struct Foo
        a
        b
@@ -99,4 +99,4 @@
 julia> @struct_map(Foo, Base.exp, Base.sin, Base.:+)
 
 julia> exp(x), sin(x), x+x
-(Foo(2.718281828459045, 2.718281828459045), Foo(0.8414709848078965, 0.8414709848078965), Foo(2, 2))
source
+(Foo(2.718281828459045, 2.718281828459045), Foo(0.8414709848078965, 0.8414709848078965), Foo(2, 2))
source
diff --git a/dev/objects.inv b/dev/objects.inv index 629d56c..2a78d70 100644 --- a/dev/objects.inv +++ b/dev/objects.inv @@ -1,5 +1,5 @@ # Sphinx inventory version 2 # Project: PTYQoL -# Version: 0.2.9 +# Version: 0.2.10 # The remainder of this file is compressed using zlib. xS[K0~߯8}kt`OB|f6#MB7VCNw9 e";0Y%4x^ՖOӘ0jmw QhSN\z)Q..ƪO84YTqC&WJ L&Eea Rg9&׭+R5<5`P}tN7"UJoEQ–/SL7#p`qo0f0gؠgamI}T!uYgB5rY"UOzx/k:OVʮz=H<.q ٠~i(;Oj B=W8Wǜ~R0=nW_/3O$IT :.G)GxC&o \ No newline at end of file