% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_graph_adjacency.R
\name{get_graph_adjacency}
\alias{get_graph_adjacency}
\title{Extract adjacency matrix from graph object}
\usage{
get_graph_adjacency(graph_obj)
}
\arguments{
\item{graph_obj}{A graph object from \code{build_graph_from_mat} or \code{build_graph_from_df}.}
}
\value{
A numeric matrix with rownames and colnames set to node IDs (\code{name}).
}
\description{
Returns the adjacency matrix of the graph with node names as rownames and
colnames. Non-zero entries indicate edges; values correspond to edge weights
when the graph is weighted.
}
\examples{
data(ppi_example)
obj <- build_graph_from_df(
  df              = ppi_example$ppi,
  node_annotation = ppi_example$annotation
)
adj <- get_graph_adjacency(obj)
dim(adj)
adj[1:3, 1:3]
}
