% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3_core.R
\name{length.HDF5Matrix}
\alias{length.HDF5Matrix}
\title{Length of an HDF5Matrix}
\usage{
\method{length}{HDF5Matrix}(x)
}
\arguments{
\item{x}{An \code{HDF5Matrix} object.}
}
\value{
A single integer: \code{nrow(x) * ncol(x)}.
}
\description{
Returns the total number of elements in an \code{HDF5Matrix} object,
defined as \code{prod(dim(x))} — consistent with the behaviour of
\code{base::length()} for ordinary R matrices.
}
\examples{
\donttest{
tmp <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(tmp, "data/m", data = matrix(1:100, 10, 10))
length(X)   # 100
close(X); unlink(tmp)
}

}
