tidygraph (version 1.3.1)

graph_types: Querying graph types

Description

This set of functions lets the user query different aspects of the graph itself. They are all concerned with wether the graph implements certain properties and will all return a logical scalar.

Usage

graph_is_simple()

graph_is_directed()

graph_is_bipartite()

graph_is_connected()

graph_is_tree()

graph_is_forest()

graph_is_dag()

graph_is_chordal()

graph_is_complete()

graph_is_isomorphic_to(graph, method = "auto", ...)

graph_is_subgraph_isomorphic_to(graph, method = "auto", ...)

graph_is_eulerian(cyclic = FALSE)

Value

A logical scalar

Arguments

graph

The graph to compare structure to

method

The algorithm to use for comparison

...

Arguments passed on to the comparison methods. See igraph::is_isomorphic_to() and igraph::is_subgraph_isomorphic_to()

cyclic

should the eulerian path start and end at the same node

Functions

  • graph_is_simple(): Is the graph simple (no parallel edges)

  • graph_is_directed(): Is the graph directed

  • graph_is_bipartite(): Is the graph bipartite

  • graph_is_connected(): Is the graph connected

  • graph_is_tree(): Is the graph a tree

  • graph_is_forest(): Is the graph an ensemble of multiple trees

  • graph_is_dag(): Is the graph a directed acyclic graph

  • graph_is_chordal(): Is the graph chordal

  • graph_is_complete(): Is the graph fully connected

  • graph_is_isomorphic_to(): Is the graph isomorphic to another graph. See igraph::is_isomorphic_to()

  • graph_is_subgraph_isomorphic_to(): Is the graph an isomorphic subgraph to another graph. see igraph::is_subgraph_isomorphic_to()

  • graph_is_eulerian(): Can all the edges in the graph be reaches by a single path or cycle that only goes through each edge once

Examples

Run this code
gr <- create_tree(50, 4)

with_graph(gr, graph_is_tree())

Run the code above in your browser using DataLab