Learn R Programming

QuACN (version 1.8.0)

energy: Graph energy

Description

This method calculates the energy of a graph.

Usage

energy(g)

Arguments

g
a graph as a graphNEL object.

Value

floating point value.

Examples

Run this code

library(graph)
set.seed(123)
g <- randomEGraph(as.character(1:6), 0.35)

energy(g)

Run the code above in your browser using DataLab