% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_edge_frequencies.R
\name{compute_edge_frequencies}
\alias{compute_edge_frequencies}
\title{Compute Edge Frequencies in Populations}
\usage{
compute_edge_frequencies(populations)
}
\arguments{
\item{populations}{A list where each element is a population containing a list of graphs (adjacency matrices).}
}
\value{
A list containing edge counts and edge proportions for each population.
}
\description{
This function computes the frequency of each edge (connection between nodes)
across all graphs within each population.
}
\examples{
# Generate synthetic populations
control_graphs <- generate_category_graphs(
  n_graphs = 5,
  n_nodes = 10,
  n_communities = 2,
  base_intra_prob = 0.8,
  base_inter_prob = 0.2,
  intra_prob_variation = 0.05,
  inter_prob_variation = 0.05,
  seed = 1
)
patient_graphs <- generate_category_graphs(
  n_graphs = 5,
  n_nodes = 10,
  n_communities = 2,
  base_intra_prob = 0.6,
  base_inter_prob = 0.4,
  intra_prob_variation = 0.05,
  inter_prob_variation = 0.05,
  seed = 2
)
populations <- list(Control = control_graphs, Patient = patient_graphs)

# Compute edge frequencies
frequencies <- compute_edge_frequencies(populations)
# View edge counts for the first population
edge_counts_control <- frequencies$edge_counts[,,1]
print(edge_counts_control)
}
