Learn R Programming

netUtils (version 0.8.3)

graph_cartesian: Cartesian product of two graphs

Description

Compute the Cartesian product of two graphs

Usage

graph_cartesian(g, h)

Value

Cartesian product as igraph object

Arguments

g

An igraph object

h

An igraph object

Author

David Schoch

Details

See https://en.wikipedia.org/wiki/Cartesian_product_of_graphs

Examples

Run this code
library(igraph)
g <- make_ring(4)
h <- make_full_graph(2)
graph_cartesian(g, h)

Run the code above in your browser using DataLab