% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/centrality.R
\name{centrality_prestige_domain_proximity}
\alias{centrality_prestige_domain_proximity}
\title{Domain Proximity Prestige}
\usage{
centrality_prestige_domain_proximity(x, ...)
}
\arguments{
\item{x}{Directed network input (matrix, igraph, cograph_network, tna object).}

\item{...}{Additional arguments passed to \code{\link{centrality}}.}
}
\value{
Named numeric vector of domain proximity prestige values in
\eqn{[0, 1]}.
}
\description{
Distance-weighted variant of domain prestige. For each directed node
\eqn{v}:
\deqn{PD(v) = R_v^2 / (D_v \cdot (n - 1))}
where \eqn{R_v} is the number of other nodes that reach \eqn{v}, and
\eqn{D_v} is the sum of geodesic distances from those reachers to
\eqn{v}. A node that is reachable quickly from many others scores high;
unreachable nodes score 0.
}
\details{
Bit-exact match against \code{sna::prestige(cmode = "domain.proximity")}
on strongly connected directed graphs. Directed-only; returns \code{NA}
with a warning on undirected input.
}
\section{Divergence from sna on disconnected graphs}{

sna's formula computes \code{(counts > 0) * gdist} element-wise and then
sums to get the denominator. For any pair where \code{gdist = Inf}
(unreachable), R evaluates \code{FALSE * Inf = NaN}, so the entire
denominator becomes \code{NaN} and sna zeros every node via
\code{p[is.nan(p)] <- 0}. cograph masks with \code{is.finite()} before
summing, producing mathematically correct values on any directed graph,
including those with disconnected components.
}

\examples{
# Directed 3-cycle: each node is reached by both others at distance 1 and 2
adj <- matrix(c(0,1,0, 0,0,1, 1,0,0), 3, 3, byrow = TRUE)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_prestige_domain_proximity(adj)
}
\references{
Wasserman, S., & Faust, K. (1994). \emph{Social Network Analysis: Methods
and Applications}. Cambridge University Press.
}
\seealso{
\code{\link{centrality}}, \code{\link{centrality_prestige_domain}}
for the unweighted count, \code{\link{centrality_reaching_local}}
for the dual out-reachability measure.
}
