BEGIN_HTML

<h2>SMatrix Package</h2>
<b>SMatrix</b> is a C++ package for high performance vector and matrix computations.<p>
It can be used only in problems when the size of the matrices is known at compile time, like in the tracking reconstruction of HEP experiments. It is based on a C++ technique, called expression templates, to achieve an high level optimization. The C++ templates can be used to implement vector and matrix expressions such that these expressions can be transformed at compile time to code which is equivalent to hand optimized code in a low-level language like FORTRAN or C (see for example ref. 1) <p>
The SMatrix has been developed initially by T. Glebe of the Max-Planck-Institut, Heidelberg, as part of the HeraB analysis framework. A subset of the original package has been now incorporated in the ROOT distribution, with the aim to provide to the LHC experiments a stand-alone and high performant matrix package for reconstruction. The API of the current package differs from the original one, in order to be compliant to the ROOT coding conventions. <p>
SMatrix contains generic <a class="el" href="http://www.cern.ch/mathlibs/sw/html/group__SMatrixSVector.html">Matrix and Vector classes</a> to describe matrix and vector of arbitrary dimensions and of arbitrary type. The classes are templated on the scalar type and on the size of the matrix (number of rows and columns) or the vector.
 Therefore, the size has to be known at compile time. SMatrix supports symmetric matrices using a storage class (<a class="el" href="http://www.cern.ch/mathlibs/sw/html/classROOT_1_1Math_1_1MatRepSym.html" title="Matrix storage representation for a symmetric matrix of dimension NxN This class...">ROOT::Math::MatRepSym</a>) which contains only the N*(N+1)/2 independent element of a NxN symmetric matrix. <br>
 It is not in the mandate of this package to provide a complete linear algebra functionality for these classes. What is provided are basic <a class="el" href="http://www.cern.ch/mathlibs/sw/html/group__MatrixFunctions.html">Matrix Template Functions</a> and <a class="el" href="http://www.cern.ch/mathlibs/sw/html/group__VectFunction.html">Vector Template Functions</a>, such as the matrix-matrix, matrix-vector, vector-vector operations, plus some extra functionality for square matrices, like inversion, which is based on the optimized Cramer method for squared matrices of size up to 6x6, and determinant calculation. <br>
 For a more detailed descriptions and usage examples see: <ul>
<li>
<a class="el" href="http://www.cern.ch/mathlibs/sw/html/SVectorDoc.html">SVector Class Properties</a> </li>
<li>
<a class="el" href="http://www.cern.ch/mathlibs/sw/html/SMatrixDoc.html">SMatrix Class Properties</a> </li>
<li>
<a class="el" href="http://www.cern.ch/mathlibs/sw/html/MatVecFunctions.html">Matrix and Vector Operators and Functions</a> </li>
</ul>
<p>
The SMatrix package contains only header files. Normally one does not need to build any library for using SMatrix, it consists of only header files. However, in the ROOT distribution a library, <em>libSmatrix</em> is produced containing the C++ dictionary information for vectors, symmetric and squared matrices for double, float and Double32_t types up to dimension 7. <br>
<p>
<h4>References</h4>
<p>
<ol>
<li>
T. Veldhuizen, <a href="http://osl.iu.edu/~tveldhui/papers/Expression-Templates/exprtmpl.html"><em>Expression Templates</em></a>, C++ Report, 1995. </li>
<li>
T. Glebe, <em>SMatrix - A high performance library for Vector/Matrix calculation and Vertexing</em>, HERA-B Software Note 01-134, December 2, 2003 (<a href="http://seal.web.cern.ch/seal/documents/mathlib/smatrix_herab.pdf">pdf</a>) </li>
<li><a href="ftp://root.cern.ch/root/doc/13MathLibraries.pdf">The Math Chapter in the Users Guide
    </a>describing the functionality of SMatrix
</li>

</ol>
<p>
<hr>
<p>
<strong>N.B.</strong>: For browsing the reference SMatrix documentation it is <strong>strongly  recommended</strong> 
to look  at <a href="http://www.cern.ch/mathlibs/sw/html/SMatrix.html">these online doc</a></strong>. The class documentation shown from the class links below is not complete, it is missing for example template methods. 
<hr>
<p>

END_HTML
