% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3_factorizations.R
\name{solve.HDF5Matrix}
\alias{solve.HDF5Matrix}
\title{Matrix inverse of a symmetric positive-definite HDF5Matrix via Cholesky}
\usage{
\method{solve}{HDF5Matrix}(
  a,
  b,
  full_matrix = TRUE,
  overwrite = FALSE,
  threads = -1L,
  block_size = NULL,
  compression = NULL,
  ...
)
}
\arguments{
\item{a}{An \code{HDF5Matrix} (square, symmetric positive-definite).}

\item{b}{Not supported for \code{HDF5Matrix}; must be missing.}

\item{full_matrix}{Logical. Return full symmetric inverse.  Default \code{TRUE}.}

\item{overwrite}{Logical. Overwrite existing result.  Default \code{FALSE}.}

\item{threads}{Integer. OpenMP threads (-1 = auto).}

\item{block_size}{Integer or NULL. Elements per block.  NULL = auto.}

\item{compression}{Integer (0-9) or NULL. gzip compression level for the
result dataset.  NULL uses the global option set by
\code{\link{hdf5matrix_options}} (default 6).  Use \code{0} to disable
compression (faster for benchmarks).}

\item{...}{Ignored (for S3 compatibility).}
}
\value{
\code{HDF5Matrix} containing the matrix inverse.
}
\description{
Computes the matrix inverse of a symmetric positive-definite HDF5Matrix
using Cholesky decomposition + back-substitution.  Equivalent to
\code{base::solve(A)} for SPD matrices.
}
\examples{
\donttest{
tmp <- tempfile(fileext = ".h5")

X  <- hdf5_create_matrix(tmp, "data/X", data = matrix(rnorm(10000), 100, 100))

X   <- hdf5_matrix(tmp, "data/X")
AtA <- crossprod(X)              # HDF5Matrix, square SPD
inv <- solve(AtA)               # inverse of AtA

hdf5_close_all()
unlink(tmp)
}

}
