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")
A tbl_graph
The number of nodes in the graph
Should the graph be directed
Should mutual edges be created in case of the graph being directed
A matrix specifying the additional edges in the chordan ring. See
igraph::make_chordal_ring()
The number of unique letters in the alphabet used for the graph
The number of characters in each node
In case of a directed, non-mutual, graph should the edges flow
'out'
or 'in'
The name of a notable graph. See a complete list in igraph::make_graph()
The dimensions of the lattice
Should each dimension in the lattice wrap around
The number of children each node has in the tree (if possible)
create_ring()
: Create a simple ring graph
create_path()
: Create a simple path
create_chordal_ring()
: Create a chordal ring
create_de_bruijn()
: Create a de Bruijn graph with the specified alphabet and label size
create_empty()
: Create a graph with no edges
create_bipartite()
: Create a full bipartite graph
create_citation()
: Create a full citation graph
create_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 size
create_lattice()
: Create a multidimensional grid of nodes
create_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)
Run the code above in your browser using DataLab