Wolfram Research

Function Repository Resource:

GraphFoliations (1.1.0) current version: 1.3.0 »

Source Notebook

Enumerate possible foliations of a directed acyclic graph

Contributed by: Nikolay Murzin

ResourceFunction["GraphFoliations"][g]

returns foliations of a graph g.

Details and Options

ResourceFunction["GraphFoliations"] recursively generates foliations by popping sources off the given graph and reattaching them back in all possible ways.
ResourceFunction["GraphFoliations"] takes the following options:
"IncludePermutations"Falsewhether to include all permutations of slices for disconnected vertices
"BundleFoliations"Falsewhether to bundle all newly added vertices into one foliation or try all combinations
"Direction"Bottomthe direction to start building foliations (Top or Bottom)
MaxItemsset the upper limit of returned foliations

Examples

Basic Examples (1) 

Enumerate foliations of a graph:

In[1]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{5, 3, 2, 6, 1, 4}, {{{1, 2}, {2, 3}, {2, 4}, {5, 3}, {3, 6}}, Null}, {VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 2.}, {-1., 1.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
          0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}],
             ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 2.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {-0.9697604790419162, 2.0302395209580837}],
             ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None,
ImageSize->{102.56495164862986`, Automatic}]\)]
Out[1]=

Options (4) 

IncludePermutations (1) 

This will return foliations with all possible slice permutations:

In[2]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
           0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}],
              ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\), "IncludePermutations" -> True] // Short
Out[2]=

BundleFoliations (1) 

Bundling of foliations will always try to combine vertices into one slice if possible:

In[3]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
          0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}],
             ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\), "BundleFoliations" -> True]
Out[3]=

Direction (1) 

Building foliations from bottom to top may result in different unbundled foliations:

In[4]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
           0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}],
              ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\), "IncludePermutations" -> True, "Direction" -> Bottom] // Short
Out[4]=
In[5]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
           0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}],
              ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\), "IncludePermutations" -> True, "Direction" -> Top] // Short
Out[5]=

MaxItems (1) 

Limit enumeration with an upper bound for returned results:

In[6]:=
ResourceFunction["GraphFoliations"][\!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm, GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
          0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}],
             ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\), MaxItems -> 10]
Out[6]=

Applications (1) 

Use foliations for LayeredLayoutGraph layers of a graph:

In[7]:=
With[{graph = \!\(\*
GraphicsBox[
NamespaceBox["NetworkGraphics",
DynamicModuleBox[{Typeset`graph = HoldComplete[
Graph[{1, 2, 3, 4, 5, 6, 7, 8}, {{{1, 2}, {1, 3}, {2, 4}, {3, 4}, {2, 5}, {3, 6}, {4, 7}, {5, 7}, {4, 8}}, Null}, {FormatType -> TraditionalForm,
            GraphLayout -> {"Dimension" -> 2}, VertexLabels -> {Automatic}}]]}, 
TagBox[GraphicsGroupBox[{
{Hue[0.6, 0.7, 0.5], Opacity[0.7], Arrowheads[Medium], ArrowBox[{{0., 3.}, {0., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 3.}, {1., 2.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 2.}, {-1., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {0., 1.}}, 0.030239520958083826`], ArrowBox[{{1., 2.}, {1., 1.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {-1., 0.}}, 0.030239520958083826`], ArrowBox[{{0., 1.}, {0., 0.}}, 0.030239520958083826`], ArrowBox[{{-1., 1.}, {-1., 0.}}, 0.030239520958083826`]}, 
{Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[
            0.7]}], {DiskBox[{0., 3.}, 0.030239520958083826], InsetBox["1", Offset[{2, 2}, {0.030239520958083826, 3.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 2.}, 0.030239520958083826], InsetBox["2", Offset[{2, 2}, {0.030239520958083826, 2.0302395209580837}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 2.}, 0.030239520958083826], InsetBox["3", Offset[{2, 2}, {1.030239520958084, 2.0302395209580837}],
               ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 1.}, 0.030239520958083826], InsetBox["4", Offset[{2, 2}, {0.030239520958083826, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 1.}, 0.030239520958083826], InsetBox["5", Offset[{2, 2}, {-0.9697604790419162, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{1., 1.}, 0.030239520958083826], InsetBox["6", Offset[{2, 2}, {1.030239520958084, 1.030239520958084}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{-1., 0.}, 0.030239520958083826], InsetBox["7", Offset[{2, 2}, {-0.9697604790419162, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}, {DiskBox[{0., 0.}, 0.030239520958083826], InsetBox["8", Offset[{2, 2}, {0.030239520958083826, 0.030239520958083826}], ImageScaled[{0, 0}],
BaseStyle->"Graphics"]}}}],
MouseAppearanceTag["NetworkGraphics"]],
AllowKernelInitialization->False]],
DefaultBaseStyle->{"NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]},
FormatType->TraditionalForm,
FrameTicks->None]\)},
 ResourceFunction["LayeredLayoutGraph"][graph, #] & /@ ResourceFunction["GraphFoliations"][graph, MaxItems -> 10]
 ]
Out[7]=

Version History

  • 1.3.0 – 18 July 2022
  • 1.2.0 – 06 May 2022
  • 1.1.0 – 08 November 2021

Related Resources

License Information