Skip to content

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.

source
TemporalSheaves._extension_message Method
julia
_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 loaded

  • fn - name of the function that requires pkg

  • io - the IO stream to print the message to

Returns

  • nothing (prints to io as a side effect)

Examples

julia
julia> _extension_message("Graphs", "my_function", stdout)
source
TemporalSheaves.get_timepoints Method
julia
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 schema

    • Anything else (like an empty string) returns all time points associated to a schema

Returns

  • Vector of Ob{:generator} objects

Examples

julia
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_t1
source
TemporalSheaves.op Method
julia
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 p that reverses the Hom's of the presentation

Examples

julia
julia> op_of_p = op(p);
source
TemporalSheaves.subobject_graph_embedding Method
julia
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_classifier function.

Arguments

  • cons::DataType - an ACSet DataType that 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
julia> s, c = zigzag(c);

julia> subobs = subobject_graph_embedding(c);
source
TemporalSheaves.zigzag! Method
julia
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 - if true make the underlying schema associated to the ZigZag category opposite; if false, the schema remains unchanged (default: true)

Returns

  • sch::Presentation - a Presentation representing the schema for n number of time_points

  • cons::DataType - an ACSet DataType that represents the constructor built by @acset_type

Examples

Create a ZigZag with 2 time points:

julia
julia> s, c = zigzag!(2);
source
TemporalSheaves.zigzag Method
julia
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 - if true make the underlying schema associated to the ZigZag category opposite; if false, the schema remains unchanged (default: true)

Returns

  • sch::Presentation - a Presentation representing the schema for n number of time_points

  • cons::DataType - an ACSet DataType that represents the constructor built by @acset_type

Examples

Create a ZigZag with 2 time points:

julia
julia> s, c = zigzag(2);
source