Sheaf Interface

The Sheaf Interface defines the abstract API for all network sheaves in the package. All concrete sheaf types (e.g. EuclideanSheaf) implement this interface, providing the combinatorial data (graph, stalks, restriction maps) and the linear‑algebra operations needed to compute coboundaries, Laplacians, and perform linear‑algebraic tasks such as finding global sections.

Below is a quick reference of the most frequently used methods. For a deeper walk‑through, see the tutorial pages linked from the navigation bar.

Core abstract type

abstract type AbstractNetworkSheaf end

Represents a sheaf defined on a graph.

Conceptually, a network sheaf consists of:

  • an underlying graph,
  • vertex and edge stalk dimensions,
  • restriction maps for each incident vertex–edge pair.

Concrete subtypes must provide access to this structure through the methods listed below, but they are not required to use any particular internal representation.

Public API

FunctionBrief description
vertex_stalks(s::AbstractNetworkSheaf)Return a vector of dimensions of vertex stalks.
edge_stalks(s::AbstractNetworkSheaf)Return a dictionary mapping each edge to its stalk dimension.
edge_stalk_dimensions(s::AbstractNetworkSheaf)Return a vector of edge‑stalk dimensions ordered by graph edges.
underlying_graph(s::AbstractNetworkSheaf)Return the SimpleGraph on which the sheaf is defined.
get_vertex_stalk(s::AbstractNetworkSheaf, v::Int)Dimension of the stalk at vertex v.
get_edge_stalk(s::AbstractNetworkSheaf, v1::Int, v2::Int)Dimension of the stalk on edge (v1,v2).
get_restriction_map(s::AbstractNetworkSheaf, v1::Int, v2::Int)Return the restriction matrix from vertex v1 to the edge (v1,v2).
add_vertex_stalk!(s::AbstractNetworkSheaf, stalk_dim::Int)Append a new vertex with the given stalk dimension, updating the graph.
add_sheaf_edge!(s::AbstractNetworkSheaf, v1::Int, v2::Int, rm1, rm2)Add an edge between v1 and v2 together with its two restriction maps.
coboundary_map(s::AbstractNetworkSheaf)Construct the coboundary operator as a block‑sparse matrix.
sheaf_laplacian(s::AbstractNetworkSheaf)Return the Laplacian operator (as a function).

All of these functions are lightweight wrappers that delegate to the concrete implementation (e.g. EuclideanSheaf). They are exported from the package and documented automatically via @autodocs, so the reference page below contains the full signature list.

Minimal example

using CellularSheaves

# 1‑dimensional stalks (R) at each vertex
stalks = [1, 1, 1]

# create an empty Euclidean sheaf
F = EuclideanSheaf{Float64}(stalks)

# add an edge with identity restriction maps
add_sheaf_edge!(F, 1, 2, [1], [1])

See the Core Sheaf Workflows guide.

API Reference

CellularSheaves.NetworkSheaves.SheafInterface.AbstractNetworkSheafType
 AbstractNetworkSheaf

An abstract type for network sheaves. A network sheaf is a cellular sheaf on a graph, i.e. a sheaf on a 1-dimensional cell complex. It consists of: - A graph G = (V, E) - A stalk Sv for each vertex v in V - A stalk Se for each edge e in E - A restriction map r{e->v} : Se -> S_v for each incident vertex-edge pair (v, e)

source
CellularSheaves.NetworkSheaves.SheafInterface.add_sheaf_edge!Method
add_sheaf_edge!(
    s::AbstractNetworkSheaf,
    v1,
    v2,
    rm1,
    rm2
) -> Int64

Add a new edge to the network sheaf with specified restriction maps.

Arguments

  • s: The network sheaf to modify
  • v1: The first vertex of the edge
  • v2: The second vertex of the edge
  • rm1: The restriction map from vertex v1 to the edge
  • rm2: The restriction map from vertex v2 to the edge

Returns

  • Int: The number of edges in the sheaf after addition

See also

source
CellularSheaves.NetworkSheaves.SheafInterface.nullspace_trajectory_familyMethod
nullspace_trajectory_family(
    ts,
    z_p,
    null_basis;
    amplitude,
    include_negative
) -> Array{BlockArrays.BlockVector{_A, R} where R<:(AbstractVector{<:AbstractVector{_A}}), 1} where _A

Construct a basis-indexed family of feasible controlled trajectories from an affine feasible-space parameterization.

Arguments

  • ts: controlled trajectory object
  • z_p: particular feasible trajectory in public coordinates
  • null_basis: matrix whose columns span endpoint-preserving feasible perturbations

Returns

  • Vector of trajectory objects, one (or two, if signed) per basis column.
source
CellularSheaves.NetworkSheaves.SheafInterface.sheaf_laplacianMethod
sheaf_laplacian(
    s::AbstractNetworkSheaf
) -> CellularSheaves.NetworkSheaves.EuclideanSheaves.var"#sheaf_laplacian##0#sheaf_laplacian##1"{BlockSparseMatrixCSC{_A, Int64}} where _A

Compute the sheaf Laplacian of a network sheaf.

Arguments

  • s: The network sheaf

Returns

  • Function: The sheaf Laplacian operator (as a function that takes a vector and returns a vector)

See also

  • coboundary_map
  • sheaf_laplacian_matrix — computes the matrix representation of the sheaf Laplacian
source