Learn R Programming

gor (version 2.0)

plot_cut: Cut plotting

Description

Plot of a cut in a graph.

Usage

plot_cut(K, G)

Value

This function is called for its side effect of plotting.

Arguments

K

Cut to be plotted; an output list returned by some cut-building function, see below.

G

Graph on which to superimpose the cut.

Author

Cesar Asensio

Details

It plots a graph, then superimposes a cut, drawing the associated vertex set in a different color.

See Also

build_cut_random builds a random cut, build_cut_greedy builds a cut using a greedy algorithm, improve_cut_flip uses local search to improve a cut obtained by other methods, compute_cut_weight computes cut size, weight and edges.

Examples

Run this code
library(igraph)
K10 <- make_full_graph(10)   # Max cut of size 25
c0 <- build_cut_random(K10)
plot_cut(c0, K10)

Run the code above in your browser using DataLab