Create different types of well-defined graphs
These functions creates a long list of different types of well-defined graphs, that is, their structure is not based on any randomisation. All of these functions are shallow wrappers around a range of igraph::make_*
functions but returns tbl_graph
rather than igraph
objects.
create_ring(n, directed = FALSE, mutual = FALSE) create_path(n, directed = FALSE, mutual = FALSE) create_chordal_ring(n, w) create_de_bruijn(alphabet_size, label_size) create_empty(n, directed = FALSE) create_bipartite(n1, n2, directed = FALSE, mode = "out") create_citation(n) create_complete(n) create_notable(name) create_kautz(alphabet_size, label_size) create_lattice(dim, directed = FALSE, mutual = FALSE, circular = FALSE) create_star(n, directed = FALSE, mutual = FALSE, mode = "out") create_tree(n, children, directed = TRUE, mode = "out")
n, n1, n2
: The number of nodes in the graphdirected
: Should the graph be directedmutual
: Should mutual edges be created in case of the graph being directedw
: A matrix specifying the additional edges in the chordan ring. See igraph::make_chordal_ring()
alphabet_size
: The number of unique letters in the alphabet used for the graphlabel_size
: The number of characters in each nodemode
: In case of a directed, non-mutual, graph should the edges flow 'out'
or 'in'
name
: The name of a notable graph. See a complete list in igraph::make_graph()
dim
: The dimensions of the latticecircular
: Should each dimension in the lattice wrap aroundchildren
: The number of children each node has in the tree (if possible)A tbl_graph
create_ring()
: Create a simple ring graphcreate_path()
: Create a simple pathcreate_chordal_ring()
: Create a chordal ringcreate_de_bruijn()
: Create a de Bruijn graph with the specified alphabet and label sizecreate_empty()
: Create a graph with no edgescreate_bipartite()
: Create a full bipartite graphcreate_citation()
: Create a full citation graphcreate_complete()
: Create a complete graph (a graph where all nodes are connected)create_notable()
: Create a graph based on its name. See igraph::make_graph()
create_kautz()
: Create a Kautz graph with the specified alphabet and label sizecreate_lattice()
: Create a multidimensional grid of nodescreate_star()
: Create a star graph (A single node in the center connected to all other nodes)create_tree()
: Create a tree graph# Create a complete graph with 10 nodes create_complete(10)
Useful links