% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robustness.R
\name{robustness_auc}
\alias{robustness_auc}
\title{Calculate Area Under Robustness Curve (AUC)}
\usage{
robustness_auc(x)
}
\arguments{
\item{x}{A robustness result from \code{\link{robustness}}.}
}
\value{
Numeric AUC value between 0 and 1.
}
\description{
Computes the area under the robustness curve using trapezoidal integration.
Higher AUC indicates a more robust network. Maximum AUC is 1.0.
}
\examples{
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::sample_pa(30, m = 2, directed = FALSE)

  rob_btw <- robustness(g, measure = "betweenness")
  rob_rnd <- robustness(g, measure = "random", n_iter = 20)

  cat("Betweenness attack AUC:", round(robustness_auc(rob_btw), 3), "\n")
  cat("Random failure AUC:", round(robustness_auc(rob_rnd), 3), "\n")
}
}
