% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PageRank.R
\name{PageRank}
\alias{PageRank}
\title{(Personalized) PageRank}
\usage{
PageRank(
  A,
  damping = 0.85,
  personalization = NULL,
  max_iter = 1000L,
  tol = 1e-08
)
}
\arguments{
\item{A}{Square non-negative matrix (adjacency or weight matrix).
Columns are normalized internally to form a column-stochastic matrix.}

\item{damping}{Damping factor (default: 0.85). Probability of following a link.}

\item{personalization}{Optional personalization vector of length \code{nrow(A)}.
If NULL, uniform distribution is used (standard PageRank).
Personalized PageRank biases the random jumps toward this distribution.}

\item{max_iter}{Maximum number of power iterations (default: 1000)}

\item{tol}{Convergence tolerance on L1 norm change (default: 1e-8)}
}
\value{
A list with components:
  \describe{
    \item{vector}{PageRank vector (sums to 1)}
    \item{iter}{Number of iterations until convergence}
    \item{converged}{Logical, whether the algorithm converged}
  }
}
\description{
Computes the PageRank vector for a given adjacency or transition matrix
using power iteration.
}
\examples{
# Simple web graph
A <- matrix(c(0,1,1,0, 1,0,0,1, 0,1,0,1, 1,0,1,0), 4, 4)
pr <- PageRank(A)
pr$vector
}
