Title: | Deal with Bratteli Graphs |
---|---|
Description: | Utilities for Bratteli graphs. A tree is an example of a Bratteli graph. The package provides a function which generates a 'LaTeX' file that renders the given Bratteli graph. It also provides functions to compute the dimensions of the vertices, the intrinsic kernels and the intrinsic distances. Intrinsic kernels and distances were introduced by Vershik (2014) <doi:10.1007/s10958-014-1958-0>. |
Authors: | Stéphane Laurent [aut, cre] |
Maintainer: | Stéphane Laurent <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-11-18 06:10:26 UTC |
Source: | https://github.com/stla/brattelir |
Dimensions of the vertices of a Bratteli graph.
bratteliDimensions(Mn, N)
bratteliDimensions(Mn, N)
Mn |
a function returning for each integer |
N |
the level up to which the dimensions are wanted |
The dimensions of the vertices in a list.
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliDimensions(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliDimensions(Euler, 4)
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliDimensions(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliDimensions(Euler, 4)
Intrinsic distances on a Bratteli graph
bratteliDistances(Mn, N)
bratteliDistances(Mn, N)
Mn |
a function returning for each integer |
N |
the level up to which the distances are wanted |
The distance matrices in a list.
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliDistances(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliDistances(Euler, 4)
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliDistances(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliDistances(Euler, 4)
Generate a LaTeX file containing TikZ code that renders a picture of a Bratteli graph.
bratteliGraph( outfile, Mn, N, edgelabels = NA, vertexlabels = "colnames", colorpath = NA, rootlabel = "\\varnothing", latex = TRUE, xscale = 50, yscale = 50, bending = 1, hor = FALSE, mirror = FALSE, northsouth = FALSE )
bratteliGraph( outfile, Mn, N, edgelabels = NA, vertexlabels = "colnames", colorpath = NA, rootlabel = "\\varnothing", latex = TRUE, xscale = 50, yscale = 50, bending = 1, hor = FALSE, mirror = FALSE, northsouth = FALSE )
outfile |
path to the output file |
Mn |
a function returning for each integer |
N |
the level up to which the graph is wanted |
edgelabels |
|
vertexlabels |
|
colorpath |
an index of a path to be colored, or |
rootlabel |
a label for the root vertex of the graph |
latex |
Boolean, whether to enclose all labels between dollars |
xscale , yscale
|
scaling factors for the graph |
bending |
curvature when there are multiple edges |
hor |
Boolean, whether to render a horizontal graph |
mirror |
Boolean, whether to "reverse" the graph |
northsouth |
Boolean, whether to draw the edges with endpoints at the bottom and the top of the vertex labels |
No return value; called to generate the LaTeX file.
Central kernels of a Bratteli graph.
bratteliKernels(Mn, N)
bratteliKernels(Mn, N)
Mn |
a function returning for each integer |
N |
the level up to which the kernels are wanted |
The kernels in a list.
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliKernels(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliKernels(Euler, 4)
# the Pascal graph #### Pascal <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- 1 } M } bratteliKernels(Pascal, 4) # the Euler graph #### Euler <- function(n) { M <- matrix(0, nrow = n+1, ncol = n+2) for(i in 1:(n+1)) { M[i, ][c(i, i+1L)] <- c(i, n+2-i) } M } bratteliKernels(Euler, 4)