Skip to content

Commit

Permalink
added starting functorutils docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andersenwall committed Oct 1, 2024
1 parent 07b9f49 commit 13f2f0c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ makedocs(
"Decompositions"=>"pages/decompositions.md",
"Deciding Sheaves"=>"pages/decidingsheaves.md",
# "Junction Trees"=>"pages/junction_trees.md",
# "Functor Utils"=>"pages/functor_utils.md",
"Functor Utils"=>"pages/functor_utils.md",
# "Nested UWDs"=>"pages/nested_uwds.md",
"Library Reference"=>"api.md",
]
Expand Down
20 changes: 20 additions & 0 deletions docs/src/pages/functor_utils.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# [Functor Utils] (@id FunctorUtils)

Functor Utils only includes 4 functions and builds off of Decompositions.

We first define the forgetful functors vs.

```julia
function vs(X::Graph) FinSet(length(vertices(X))) end
function vs(f::ACSetTransformation) components(f)[1] end
```

We also define the functor skeleton taking set to the skeleton of the set.

```julia
function skeleton(s::FinSet) FinSet(length(s)) end
function skeleton(f::FinFunction)
(dd, cc) = (dom(f), codom(f))
= isempty(dd) ? Int[] : [findfirst(item -> item == f(x), collect(cc)) for x collect(dd)]
FinFunction(ℓ, skeleton(dd), skeleton(cc))
end
```

0 comments on commit 13f2f0c

Please sign in to comment.