EVOLUTION-MANAGER
Edit File: weighted_cliques.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Functions to find weighted cliques, ie. weighted complete...</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for weighted_cliques {igraph}"><tr><td>weighted_cliques {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Functions to find weighted cliques, ie. weighted complete subgraphs in a graph</h2> <h3>Description</h3> <p>These functions find all, the largest or all the maximal weighted cliques in an undirected graph. The weight of a clique is the sum of the weights of its edges. </p> <h3>Usage</h3> <pre> weighted_cliques( graph, vertex.weights = NULL, min.weight = 0, max.weight = 0, maximal = FALSE ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph, directed graphs will be considered as undirected ones, multiple edges and loops are ignored.</p> </td></tr> <tr valign="top"><td><code>vertex.weights</code></td> <td> <p>Vertex weight vector. If the graph has a <code>weight</code> vertex attribute, then this is used by default. If the graph does not have a <code>weight</code> vertex attribute and this argument is <code>NULL</code>, then every vertex is assumed to have a weight of 1. Note that the current implementation of the weighted clique finder supports positive integer weights only.</p> </td></tr> <tr valign="top"><td><code>min.weight</code></td> <td> <p>Numeric constant, lower limit on the weight of the cliques to find. <code>NULL</code> means no limit, ie. it is the same as 0.</p> </td></tr> <tr valign="top"><td><code>max.weight</code></td> <td> <p>Numeric constant, upper limit on the weight of the cliques to find. <code>NULL</code> means no limit.</p> </td></tr> <tr valign="top"><td><code>maximal</code></td> <td> <p>Specifies whether to look for all weighted cliques (<code>FALSE</code>) or only the maximal ones (<code>TRUE</code>).</p> </td></tr> </table> <h3>Details</h3> <p><code>weighted_cliques</code> find all complete subgraphs in the input graph, obeying the weight limitations given in the <code>min</code> and <code>max</code> arguments. </p> <p><code>largest_weighted_cliques</code> finds all largest weighted cliques in the input graph. A clique is largest if there is no other clique whose total weight is larger than the weight of this clique. </p> <p><code>max_weighted_cliques</code> finds all maximal weighted cliques in the input graph. A weighted clique is maximal if it cannot be extended to a clique with larger total weight. The largest weighted cliques are always maximal, but a maximal weighted clique is not necessarily the largest. </p> <p><code>count_max_weighted_cliques</code> counts the maximal weighted cliques. </p> <p><code>weighted_clique_num</code> calculates the weight of the largest weighted clique(s). </p> <h3>Value</h3> <p><code>weighted_cliques</code> and <code>largest_weighted_cliques</code> return a list containing numeric vectors of vertex IDs. Each list element is a weighted clique, i.e. a vertex sequence of class <code><a href="V.html">igraph.vs</a></code>. </p> <p><code>weighted_clique_num</code> and <code>count_max_weighted_cliques</code> return an integer scalar. </p> <h3>Author(s)</h3> <p>Tamas Nepusz <a href="mailto:ntamas@gmail.com">ntamas@gmail.com</a> and Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>See Also</h3> <p><code><a href="ivs.html">ivs</a></code> </p> <h3>Examples</h3> <pre> g <- make_graph("zachary") V(g)$weight <- 1 V(g)[c(1,2,3,4,14)]$weight <- 3 weighted_cliques(g) weighted_cliques(g, maximal=TRUE) largest_weighted_cliques(g) weighted_clique_num(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>