You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be useful to have a standard interface for programmatic structure. Here I give the basic structure, but StructTypes related features can be added to the functions.
struct_define(struct_data::StructConstructor) # defines a struct based on the datamutable struct StructConstructor
name::Symbol
fields_names::Vector{Symbol}
fields_types::Vector{Union{DataType, Symbol, Missing}}end# a constructor for when we know the name and number of fields:functionStructConstructor(nfields::Integer)
fields_names =Vector{Symbol}(undef, nfields)
fields_names =Vector{Union{DataType, Symbol, Missing}}(undef, nfields)
returnStructConstructor(:TempName, fields_names, fields_names)
endfunctionStructConstructor(name::Symbol, nfields::Integer)
fields_names =Vector{Symbol}(undef, nfields)
fields_names =Vector{Union{DataType, Symbol, Missing}}(undef, nfields)
returnStructConstructor(name, fields_names, fields_names)
end
I think it would be useful to have a standard interface for programmatic structure. Here I give the basic structure, but StructTypes related features can be added to the functions.
1-time function
functions API:
Example
over-time method
functions API:
Example
We can more feature such as
Related packages:
The text was updated successfully, but these errors were encountered: