Skip to content

Commit

Permalink
random TPS generator
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsignorelli committed Apr 29, 2024
1 parent 5f5b93a commit 84ee72c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ for (fname, felt) in ((:zeros, :zero), (:ones, :one))
end

# --- rand ---
"""
rand(::Type{T}; use::Union{Descriptor,TPS,ComplexTPS}=GTPSA.desc_current) where {T<:Union{TPS,ComplexTPS}}
Generate a `TPS`/`ComplexTPS` with all random coefficients.
"""
function rand(::Type{T}; use::Union{Descriptor,TPS,ComplexTPS}=GTPSA.desc_current) where {T<:Union{TPS,ComplexTPS}}
t = T(use=use)
len = length(t)
Expand Down

0 comments on commit 84ee72c

Please sign in to comment.