TemporalSheaves
Documentation for TemporalSheaves.
TemporalSheaves.TemporalSheaves Module
Package to work with temporal sheaves and associate them to data sources for computational applications of temporal sheaf theory.
sourceTemporalSheaves._extension_message Method
_extension_message(pkg, fn, io)Prints a styled message to io instructing the user to install and load a required package.
Arguments
pkg- name of the package that needs to be loadedfn- name of the function that requirespkgio- theIOstream to print the message to
Returns
nothing(prints toioas a side effect)
Examples
julia> _extension_message("Graphs", "my_function", stdout)TemporalSheaves.get_timepoints Method
get_timepoints(s::Presentation; type::Symbol = :discrete)Get time points associated to a given ZigZag schema.
Arguments
s::Presentation- a schema associated to a ZigZag schema
Keyword Arguments
type- what time points to return (default::discrete); options include::discrete- the discrete time points associated to a schema:cumulative- the cumulative time points associated to a schemaAnything else (like an empty string) returns all time points associated to a schema
Returns
- Vector of
Ob{:generator}objects
Examples
julia> s, c = zigzag(2);
julia> get_timepoints(s)
2-element Vector{Catlab.Theories.FreeSchema.Ob{:generator}}:
t0
t1
julia> get_timepoints(s, type = :cumulative)
1-element Vector{Catlab.Theories.FreeSchema.Ob{:generator}}:
t0_to_t1TemporalSheaves.op Method
op(p::Presentation)Compute the opposite of the schema associated to a Presentation.
Arguments
p::Presentation- a presentation of a ZigZag schema
Returns
- A copy of
pthat reverses theHom's of the presentation
Examples
julia> op_of_p = op(p);TemporalSheaves.subobject_graph_embedding Method
subobject_graph_embedding(cons)Computes the subobjects associated to a ZigZag and interprets them as graph embeddings associated to the underlying graph of the constructor's schema.
Note: If you want raw subobjects, please see the
subobject_classifierfunction.
Arguments
cons::DataType- an ACSetDataTypethat represents the constructor built by@acset_type
Returns
- Vector of subobjects as graph embeddings (specifically,
NamedGraph's).
Examples
Compute the subobjects on the ZigZag schema
julia> s, c = zigzag(c);
julia> subobs = subobject_graph_embedding(c);TemporalSheaves.zigzag! Method
zigzag!(time_points::Int; opposite::Bool = true)Generates a discrete representation of the discrete subunit interval category (referred to as the ZigZag category) for n time points prepared for combinatorial data.
Arguments
time_points::Int- how many time points to represent
Keyword Arguments
opposite::Bool- iftruemake the underlying schema associated to the ZigZag category opposite; iffalse, the schema remains unchanged (default:true)
Returns
sch::Presentation- aPresentationrepresenting the schema fornnumber oftime_pointscons::DataType- an ACSetDataTypethat represents the constructor built by@acset_type
Examples
Create a ZigZag with 2 time points:
julia> s, c = zigzag!(2);TemporalSheaves.zigzag Method
zigzag(time_points::Int; opposite::Bool = true)Generates a discrete representation of the discrete subunit interval category (referred to as the ZigZag category) for n time points.
Arguments
time_points::Int- how many time points to represent
Keyword Arguments
opposite::Bool- iftruemake the underlying schema associated to the ZigZag category opposite; iffalse, the schema remains unchanged (default:true)
Returns
sch::Presentation- aPresentationrepresenting the schema fornnumber oftime_pointscons::DataType- an ACSetDataTypethat represents the constructor built by@acset_type
Examples
Create a ZigZag with 2 time points:
julia> s, c = zigzag(2);