View source: R/11-grafos-NPdif.R
plot_cut | R Documentation |
Plot of a cut in a graph.
plot_cut(K, G)
K |
Cut to be plotted; an output list returned by some cut-building function, see below. |
G |
Graph on which to superimpose the cut. |
It plots a graph, then superimposes a cut, drawing the associated vertex set in a different color.
This function is called for its side effect of plotting.
Cesar Asensio
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.
K10 <- make_full_graph(10) # Max cut of size 25
c0 <- build_cut_random(K10)
plot_cut(c0, K10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.