\HeaderA{forceSymmetric}{Force a Matrix to 'symmetricMatrix' Without Symmetry Checks}{forceSymmetric}
\aliasA{forceSymmetric,corMatrix,character-method}{forceSymmetric}{forceSymmetric,corMatrix,character.Rdash.method}
\aliasA{forceSymmetric,corMatrix,missing-method}{forceSymmetric}{forceSymmetric,corMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,CsparseMatrix,ANY-method}{forceSymmetric}{forceSymmetric,CsparseMatrix,ANY.Rdash.method}
\aliasA{forceSymmetric,denseMatrix,character-method}{forceSymmetric}{forceSymmetric,denseMatrix,character.Rdash.method}
\aliasA{forceSymmetric,denseMatrix,missing-method}{forceSymmetric}{forceSymmetric,denseMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dpoMatrix,character-method}{forceSymmetric}{forceSymmetric,dpoMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dpoMatrix,missing-method}{forceSymmetric}{forceSymmetric,dpoMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dppMatrix,character-method}{forceSymmetric}{forceSymmetric,dppMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dppMatrix,missing-method}{forceSymmetric}{forceSymmetric,dppMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dsCMatrix,character-method}{forceSymmetric}{forceSymmetric,dsCMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dsCMatrix,missing-method}{forceSymmetric}{forceSymmetric,dsCMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dspMatrix,character-method}{forceSymmetric}{forceSymmetric,dspMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dspMatrix,missing-method}{forceSymmetric}{forceSymmetric,dspMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dsRMatrix,character-method}{forceSymmetric}{forceSymmetric,dsRMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dsRMatrix,missing-method}{forceSymmetric}{forceSymmetric,dsRMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dsTMatrix,character-method}{forceSymmetric}{forceSymmetric,dsTMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dsTMatrix,missing-method}{forceSymmetric}{forceSymmetric,dsTMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,dsyMatrix,character-method}{forceSymmetric}{forceSymmetric,dsyMatrix,character.Rdash.method}
\aliasA{forceSymmetric,dsyMatrix,missing-method}{forceSymmetric}{forceSymmetric,dsyMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,lsCMatrix,character-method}{forceSymmetric}{forceSymmetric,lsCMatrix,character.Rdash.method}
\aliasA{forceSymmetric,lsCMatrix,missing-method}{forceSymmetric}{forceSymmetric,lsCMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,lspMatrix,character-method}{forceSymmetric}{forceSymmetric,lspMatrix,character.Rdash.method}
\aliasA{forceSymmetric,lspMatrix,missing-method}{forceSymmetric}{forceSymmetric,lspMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,lsRMatrix,character-method}{forceSymmetric}{forceSymmetric,lsRMatrix,character.Rdash.method}
\aliasA{forceSymmetric,lsRMatrix,missing-method}{forceSymmetric}{forceSymmetric,lsRMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,lsTMatrix,character-method}{forceSymmetric}{forceSymmetric,lsTMatrix,character.Rdash.method}
\aliasA{forceSymmetric,lsTMatrix,missing-method}{forceSymmetric}{forceSymmetric,lsTMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,lsyMatrix,character-method}{forceSymmetric}{forceSymmetric,lsyMatrix,character.Rdash.method}
\aliasA{forceSymmetric,lsyMatrix,missing-method}{forceSymmetric}{forceSymmetric,lsyMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,matrix,ANY-method}{forceSymmetric}{forceSymmetric,matrix,ANY.Rdash.method}
\aliasA{forceSymmetric,Matrix,missing-method}{forceSymmetric}{forceSymmetric,Matrix,missing.Rdash.method}
\aliasA{forceSymmetric,nsCMatrix,character-method}{forceSymmetric}{forceSymmetric,nsCMatrix,character.Rdash.method}
\aliasA{forceSymmetric,nsCMatrix,missing-method}{forceSymmetric}{forceSymmetric,nsCMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,nspMatrix,character-method}{forceSymmetric}{forceSymmetric,nspMatrix,character.Rdash.method}
\aliasA{forceSymmetric,nspMatrix,missing-method}{forceSymmetric}{forceSymmetric,nspMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,nsRMatrix,character-method}{forceSymmetric}{forceSymmetric,nsRMatrix,character.Rdash.method}
\aliasA{forceSymmetric,nsRMatrix,missing-method}{forceSymmetric}{forceSymmetric,nsRMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,nsTMatrix,character-method}{forceSymmetric}{forceSymmetric,nsTMatrix,character.Rdash.method}
\aliasA{forceSymmetric,nsTMatrix,missing-method}{forceSymmetric}{forceSymmetric,nsTMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,nsyMatrix,character-method}{forceSymmetric}{forceSymmetric,nsyMatrix,character.Rdash.method}
\aliasA{forceSymmetric,nsyMatrix,missing-method}{forceSymmetric}{forceSymmetric,nsyMatrix,missing.Rdash.method}
\aliasA{forceSymmetric,sparseMatrix,ANY-method}{forceSymmetric}{forceSymmetric,sparseMatrix,ANY.Rdash.method}
\keyword{array}{forceSymmetric}
\begin{Description}\relax
Force \code{x} (inheriting from \code{\LinkA{Matrix}{Matrix.Rdash.class}} class) to
\code{\LinkA{symmetricMatrix}{symmetricMatrix.Rdash.class}}, \bold{without} a symmetry check
(which \emph{is} applied for all \code{as(x, "symmetricMatrix")}
alikes).
\end{Description}
\begin{Usage}
\begin{verbatim}
forceSymmetric(x, uplo)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a (classed) square matrix.
\item[\code{uplo}] optional string, \code{"U"} or \code{"L"}.
The default is \code{"U"} unless \code{x} already has a \code{uplo}
slot (i.e., when it is \code{\LinkA{symmetricMatrix}{symmetricMatrix.Rdash.class}},
or  \code{\LinkA{triangularMatrix}{triangularMatrix.Rdash.class}}), where the default will
be \code{x@uplo}.
\end{ldescription}
\end{Arguments}
\begin{Value}
a square matrix inheriting from class
\code{\LinkA{symmetricMatrix}{symmetricMatrix.Rdash.class}}.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{symmpart}{symmpart}} for the symmetric part, or the coercions
\code{as(x, <symmetricMatrix class>)}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 ## Hilbert matrix
 i <- 1:6
 h6 <- 1/outer(i - 1L, i, "+")
 sd <- sqrt(diag(h6))
 hh <- t(h6/sd)/sd # theoretically symmetric
 isSymmetric(hh, tol=0) # FALSE; hence
 try( as(hh, "symmetricMatrix") ) # fails, but this works fine:
 H6 <- forceSymmetric(hh)

 ## result can be pretty surprising:
 (M <- Matrix(1:36, 6))
 forceSymmetric(M) # symmetric, hence very different in lower triangle
 (tm <- tril(M))
 forceSymmetric(tm)
\end{ExampleCode}
\end{Examples}

