<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>M4RI: pls.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">M4RI <span id="projectnumber">1.0.1</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#define-members">Defines</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">pls.h File Reference</div> </div> </div> <div class="contents"> <p>PLS and PLUQ matrix decomposition routines. <a href="#details">More...</a></p> <div class="textblock"><code>#include "<a class="el" href="misc_8h_source.html">misc.h</a>"</code><br/> <code>#include "<a class="el" href="packedmatrix_8h_source.html">packedmatrix.h</a>"</code><br/> <code>#include "<a class="el" href="permutation_8h_source.html">permutation.h</a>"</code><br/> </div> <p><a href="pls_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="define-members"></a> Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#ac9a31146b806f0db717920fa472435ae">PLS_CUTOFF</a>   MIN(524288,CPU_L2_CACHE>>3)</td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#a017f9dbe05b60725671ae89549d98a60">mzd_pluq</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Q, const int cutoff)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLUQ matrix decomposition. <a href="#a017f9dbe05b60725671ae89549d98a60"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#a38b8d2b1e8f69e12c1bf82fd1aee65d7">mzd_pls</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Q, const int cutoff)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLS matrix decomposition. <a href="#a38b8d2b1e8f69e12c1bf82fd1aee65d7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#af6fe16806955595667a725cc99327c67">_mzd_pluq</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Q, const int cutoff)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLUQ matrix decomposition. <a href="#af6fe16806955595667a725cc99327c67"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#a4b549dbec55805e4b281314a2a097799">_mzd_pls</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Qt, const int cutoff)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLS matrix decomposition. <a href="#a4b549dbec55805e4b281314a2a097799"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#aa7d66c08df4664362d709207c37a5b88">_mzd_pluq_naive</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Q)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLUQ matrix decomposition (naive base case). <a href="#aa7d66c08df4664362d709207c37a5b88"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="pls_8h.html#a39d1ac2a8d7636dad30f5ce6029972e6">_mzd_pls_naive</a> (<a class="el" href="structmzd__t.html">mzd_t</a> *A, <a class="el" href="structmzp__t.html">mzp_t</a> *P, <a class="el" href="structmzp__t.html">mzp_t</a> *Qt)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PLS matrix decomposition (naive base case). <a href="#a39d1ac2a8d7636dad30f5ce6029972e6"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>PLS and PLUQ matrix decomposition routines. </p> <dl class="author"><dt><b>Author:</b></dt><dd>Clement Pernet <<a href="mailto:clement.pernet@gmail.com">clement.pernet@gmail.com</a>> </dd></dl> </div><hr/><h2>Define Documentation</h2> <a class="anchor" id="ac9a31146b806f0db717920fa472435ae"></a><!-- doxytag: member="pls.h::PLS_CUTOFF" ref="ac9a31146b806f0db717920fa472435ae" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define PLS_CUTOFF   MIN(524288,CPU_L2_CACHE>>3)</td> </tr> </table> </div> <div class="memdoc"> <p>Crossover point for PLUQ factorization. </p> </div> </div> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a4b549dbec55805e4b281314a2a097799"></a><!-- doxytag: member="pls.h::_mzd_pls" ref="a4b549dbec55805e4b281314a2a097799" args="(mzd_t *A, mzp_t *P, mzp_t *Qt, const int cutoff)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t _mzd_pls </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Qt</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"><em>cutoff</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLS matrix decomposition. </p> <p>See <a class="el" href="pls_8h.html#a38b8d2b1e8f69e12c1bf82fd1aee65d7" title="PLS matrix decomposition.">mzd_pls()</a> for details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input matrix </td></tr> <tr><td class="paramname">P</td><td>Output row <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">Qt</td><td>Output column <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">cutoff</td><td>Minimal dimension for Strassen recursion.</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#a38b8d2b1e8f69e12c1bf82fd1aee65d7" title="PLS matrix decomposition.">mzd_pls()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> </div> </div> <a class="anchor" id="a39d1ac2a8d7636dad30f5ce6029972e6"></a><!-- doxytag: member="pls.h::_mzd_pls_naive" ref="a39d1ac2a8d7636dad30f5ce6029972e6" args="(mzd_t *A, mzp_t *P, mzp_t *Qt)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t _mzd_pls_naive </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Qt</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLS matrix decomposition (naive base case). </p> <p>See <a class="el" href="pls_8h.html#a38b8d2b1e8f69e12c1bf82fd1aee65d7" title="PLS matrix decomposition.">mzd_pls()</a> for details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input matrix </td></tr> <tr><td class="paramname">P</td><td>Output row <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">Qt</td><td>Output column <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#a38b8d2b1e8f69e12c1bf82fd1aee65d7" title="PLS matrix decomposition.">mzd_pls()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> </div> </div> <a class="anchor" id="af6fe16806955595667a725cc99327c67"></a><!-- doxytag: member="pls.h::_mzd_pluq" ref="af6fe16806955595667a725cc99327c67" args="(mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t _mzd_pluq </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Q</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"><em>cutoff</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLUQ matrix decomposition. </p> <p>See <a class="el" href="pls_8h.html#a017f9dbe05b60725671ae89549d98a60" title="PLUQ matrix decomposition.">mzd_pluq()</a> for details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input matrix </td></tr> <tr><td class="paramname">P</td><td>Output row <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">Q</td><td>Output column <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">cutoff</td><td>Minimal dimension for Strassen recursion.</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#a017f9dbe05b60725671ae89549d98a60" title="PLUQ matrix decomposition.">mzd_pluq()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> </div> </div> <a class="anchor" id="aa7d66c08df4664362d709207c37a5b88"></a><!-- doxytag: member="pls.h::_mzd_pluq_naive" ref="aa7d66c08df4664362d709207c37a5b88" args="(mzd_t *A, mzp_t *P, mzp_t *Q)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t _mzd_pluq_naive </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Q</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLUQ matrix decomposition (naive base case). </p> <p>See <a class="el" href="pls_8h.html#a017f9dbe05b60725671ae89549d98a60" title="PLUQ matrix decomposition.">mzd_pluq()</a> for details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input matrix </td></tr> <tr><td class="paramname">P</td><td>Output row <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix </td></tr> <tr><td class="paramname">Q</td><td>Output column <a class="el" href="structmzp__t.html" title="Permutations.">mzp_t</a> matrix</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#a017f9dbe05b60725671ae89549d98a60" title="PLUQ matrix decomposition.">mzd_pluq()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> </div> </div> <a class="anchor" id="a38b8d2b1e8f69e12c1bf82fd1aee65d7"></a><!-- doxytag: member="pls.h::mzd_pls" ref="a38b8d2b1e8f69e12c1bf82fd1aee65d7" args="(mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t mzd_pls </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Q</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"><em>cutoff</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLS matrix decomposition. </p> <p>Computes the PLS matrix decomposition using a block recursive algorithm.</p> <p>Returns (P,L,S,Q) satisfying PLS = A where P is a permutation matrix of dimension m x m, L is m x r unit lower triangular and S is an r x n matrix which is upper triangular except that its columns are permuted, that is S = UQ for U r x n upper triangular and Q is a n x n permutation matrix. The matrix L and S are stored in place over A.</p> <p>P and Q must be preallocated but they don't have to be identity permutations. If cutoff is zero a value is chosen automatically. It is recommended to set cutoff to zero for most applications.</p> <p>This is the wrapper function including bounds checks. See <a class="el" href="pls_8h.html#a4b549dbec55805e4b281314a2a097799" title="PLS matrix decomposition.">_mzd_pls()</a> for implementation details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input m x n matrix </td></tr> <tr><td class="paramname">P</td><td>Output row permutation of length m </td></tr> <tr><td class="paramname">Q</td><td>Output column permutation matrix of length n </td></tr> <tr><td class="paramname">cutoff</td><td>Minimal dimension for Strassen recursion.</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#a4b549dbec55805e4b281314a2a097799" title="PLS matrix decomposition.">_mzd_pls()</a> <a class="el" href="pls_8h.html#af6fe16806955595667a725cc99327c67" title="PLUQ matrix decomposition.">_mzd_pluq()</a> <a class="el" href="pls__mmpf_8h.html#a94da38af4b319a275c30144b87bbe35e" title="PLUQ matrix decomposition of A using Gray codes.">_mzd_pluq_mmpf()</a> <a class="el" href="echelonform_8h.html#ad74a55508998928aa34782263166db19" title="(Reduced) row echelon form using PLUQ factorisation.">mzd_echelonize_pluq()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> </div> </div> <a class="anchor" id="a017f9dbe05b60725671ae89549d98a60"></a><!-- doxytag: member="pls.h::mzd_pluq" ref="a017f9dbe05b60725671ae89549d98a60" args="(mzd_t *A, mzp_t *P, mzp_t *Q, const int cutoff)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">size_t mzd_pluq </td> <td>(</td> <td class="paramtype"><a class="el" href="structmzd__t.html">mzd_t</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>P</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structmzp__t.html">mzp_t</a> * </td> <td class="paramname"><em>Q</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int </td> <td class="paramname"><em>cutoff</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>PLUQ matrix decomposition. </p> <p>Returns (P,L,U,Q) satisfying PLUQ = A where P and Q are two permutation matrices, of dimension respectively m x m and n x n, L is m x r unit lower triangular and U is r x n upper triangular.</p> <p>P and Q must be preallocated but they don't have to be identity permutations. If cutoff is zero a value is chosen automatically. It is recommended to set cutoff to zero for most applications.</p> <p>The row echelon form (not reduced) can be read from the upper triangular matrix U. See <a class="el" href="echelonform_8h.html#ad74a55508998928aa34782263166db19" title="(Reduced) row echelon form using PLUQ factorisation.">mzd_echelonize_pluq()</a> for details.</p> <p>This is the wrapper function including bounds checks. See <a class="el" href="pls_8h.html#af6fe16806955595667a725cc99327c67" title="PLUQ matrix decomposition.">_mzd_pluq()</a> for implementation details.</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">A</td><td>Input m x n matrix </td></tr> <tr><td class="paramname">P</td><td>Output row permutation of length m </td></tr> <tr><td class="paramname">Q</td><td>Output column permutation matrix of length n </td></tr> <tr><td class="paramname">cutoff</td><td>Minimal dimension for Strassen recursion.</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="pls_8h.html#af6fe16806955595667a725cc99327c67" title="PLUQ matrix decomposition.">_mzd_pluq()</a> <a class="el" href="pls__mmpf_8h.html#a94da38af4b319a275c30144b87bbe35e" title="PLUQ matrix decomposition of A using Gray codes.">_mzd_pluq_mmpf()</a> <a class="el" href="echelonform_8h.html#ad74a55508998928aa34782263166db19" title="(Reduced) row echelon form using PLUQ factorisation.">mzd_echelonize_pluq()</a></dd></dl> <dl class="user"><dt><b>Ignores offset atrtribute of packedmatrix.</b></dt><dd></dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Rank of A. </dd></dl> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="testsuite_2test_pluq_8c-example.html#a8">testsuite/test_pluq.c</a>.</dd> </dl> </div> </div> </div> <hr class="footer"/><address class="footer"><small>Generated on Sat Apr 23 2011 for M4RI by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>