% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resistance_distance_matrix.R
\name{resistance_distance_matrix}
\alias{resistance_distance_matrix}
\title{Compute the resistance distance matrix of a connected undirected graph}
\usage{
resistance_distance_matrix(adj_matrix)
}
\arguments{
\item{adj_matrix}{A symmetric adjacency matrix (0/1, no self-loops) representing
a connected undirected graph.}
}
\value{
A symmetric matrix \code{R} where \code{R[i,j]} is the resistance distance
  between vertices \code{i} and \code{j}. Diagonal entries are 0.
}
\description{
For a connected undirected graph, the resistance distance between two vertices
is defined as the effective resistance when each edge is replaced by a unit resistor.
It can be computed from the Moore–Penrose pseudoinverse of the graph Laplacian.
}
\examples{
# Example: a path graph with 3 vertices
adj <- matrix(c(0,1,0,
                1,0,1,
                0,1,0), nrow = 3, byrow = TRUE)
R <- resistance_distance_matrix(adj)
print(R)
}
\references{
D.J.Klein and M.Randic, “Resistance distance,” Journal of Mathematical." Chemistry 12, 81–95 (1993).
}
