// Compute each node's Opsahl generalized degree and normalize against the maximum in this collection (default) or, under normalization: 'size', against n − 1 — NetworkX's degreecentrality and igraph's normalized = TRUE (a lone node scores 1, as in NetworkX)
eles.degreeCentralityNormalized(options?: DegreeCentralityOptions): DegreeCentralityNormalizedResultCompute each node's Opsahl generalized degree and normalize against the maximum in this collection (default) or, under normalization: 'size', against n − 1 — NetworkX's degree_centrality and igraph's normalized = TRUE (a lone node scores 1, as in NetworkX). Directed in- and out-degree are normalized independently. Nodes outside the collection's captured subgraph read as zero.
| Name | Description |
|---|---|
options: DegreeCentralityOptions? |
|
Fields of options
| Name | Description |
|---|---|
root: Collection | null? | |
weight: WeightFn? | |
directed: boolean? | |
alpha: number? | 0 = count degree, 1 = weight sum (Opsahl's generalized degree) |
normalization: 'max' | 'size'? | read by |
DegreeCentralityNormalizedResulta degree(node) accessor, or indegree(node) and outdegree(node) accessors when directed. Each divides by its corresponding maximum or by n − 1; under 'max' results are in [0, 1] when weights and alpha produce nonnegative finite degrees. These numeric constraints are not validated.
Example
const result = eles.degreeCentralityNormalized();console.log(result.degree(cy.getElementById('b'))); // 1if normalization is neither 'max' nor 'size'
Also spelled eles.dcn, eles.degreeCentralityNormalised.