% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MxExpectationRAM.R
\name{omxGetRAMDepth}
\alias{omxGetRAMDepth}
\title{omxGetRAMDepth}
\usage{
omxGetRAMDepth(A, maxdepth = nrow(A) - 1)
}
\arguments{
\item{A}{MxMatrix object}

\item{maxdepth}{Numeric. maximum depth to check}
}
\description{
Get the potency of a matrix for inversion speed-up
}
\details{
This function is used internally by the \link{mxExpectationRAM} function
to determine how far to expand \eqn{(I-A)^{-1} = I + A + A^2 + A^3 + ...}.  It is
similarly used by \link{mxExpectationLISREL} in expanding \eqn{(I-B)^{-1} = I + B + B^2 + B^3 + ...}.
In many situations \eqn{A^2} is a zero matrix (nilpotent of order 2).  So when \eqn{A} has large
dimension it is much faster to compute \eqn{I+A} than \eqn{(I-A)^{-1}}.
}
