<!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>linbox: RationalSolver< Ring, Field, RandomPrime, MethodTraits > Class Template 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 --> <script type="text/javascript"> function hasClass(ele,cls) { return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); } function addClass(ele,cls) { if (!this.hasClass(ele,cls)) ele.className += " "+cls; } function removeClass(ele,cls) { if (hasClass(ele,cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); ele.className=ele.className.replace(reg,' '); } } function toggleVisibility(linkObj) { var base = linkObj.getAttribute('id'); var summary = document.getElementById(base + '-summary'); var content = document.getElementById(base + '-content'); var trigger = document.getElementById(base + '-trigger'); if ( hasClass(linkObj,'closed') ) { summary.style.display = 'none'; content.style.display = 'block'; trigger.src = 'open.png'; removeClass(linkObj,'closed'); addClass(linkObj,'opened'); } else if ( hasClass(linkObj,'opened') ) { summary.style.display = 'block'; content.style.display = 'none'; trigger.src = 'closed.png'; removeClass(linkObj,'opened'); addClass(linkObj,'closed'); } return false; } </script> <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">linbox</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="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</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="annotated.html"><span>Data Structures</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespace_lin_box.html">LinBox</a> </li> <li class="navelem"><a class="el" href="class_lin_box_1_1_rational_solver.html">RationalSolver</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">RationalSolver< Ring, Field, RandomPrime, MethodTraits > Class Template Reference<div class="ingroups"><a class="el" href="group__padic.html">p-adic lifting for linear system solutions.</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="LinBox::RationalSolver" --> <p>Interface for the different specialization of p-adic lifting based solvers. <a href="class_lin_box_1_1_rational_solver.html#details">More...</a></p> <p><code>#include <rational-solver.h></code></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memTemplParams" colspan="2">template<class IMatrix , class Vector1 , class Vector2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rational_solver.html#a89640f4898c268599ab5a20041c08665">solve</a> (Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, const bool side, int maxPrimes=DEFAULT_MAXPRIMES) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Solve a linear system <code>Ax=b</code> over quotient field of a ring giving a random solution if the system is singular and consistent, giving the unique solution if the system is non-singular. <a href="#a89640f4898c268599ab5a20041c08665"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class IMatrix , class Vector1 , class Vector2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rational_solver.html#afd380fe51259c50e3e7314f8d5da6aeb">solveNonsingular</a> (Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, int maxPrimes=DEFAULT_MAXPRIMES) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Solve a nonsingular linear system <code>Ax=b</code> over quotient field of a ring, giving the unique solution of the system. <a href="#afd380fe51259c50e3e7314f8d5da6aeb"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class IMatrix , class Vector1 , class Vector2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_lin_box_1_1_rational_solver.html#af93d887b2581b66c1085688fc965aa99">solveSingular</a> (Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, int maxPrimes=DEFAULT_MAXPRIMES) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">brief Solve a singular linear system <code>Ax=b</code> over quotient field of a ring, giving a random solution if the system is singular and consistent. <a href="#af93d887b2581b66c1085688fc965aa99"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><h3>template<class Ring, class Field, class RandomPrime, class MethodTraits = DixonTraits><br/> class LinBox::RationalSolver< Ring, Field, RandomPrime, MethodTraits ></h3> <p>Interface for the different specialization of p-adic lifting based solvers. </p> <p>The following type are abstract in the implementation and can be change during the instanciation of the class:</p> <ul> <li>Ring: ring over which entries are defined</li> <li>Field: finite field for p-adic lifting</li> <li>RandomPrime: generator of random primes</li> <li>MethodTraits: type of subalgorithm to use in p-adic lifting (default is DixonTraits)</li> </ul> </div><hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a89640f4898c268599ab5a20041c08665"></a><!-- doxytag: member="LinBox::RationalSolver::solve" ref="a89640f4898c268599ab5a20041c08665" args="(Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, const bool side, int maxPrimes=DEFAULT_MAXPRIMES) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> solve </td> <td>(</td> <td class="paramtype">Vector1 & </td> <td class="paramname"><em>num</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Integer & </td> <td class="paramname"><em>den</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const IMatrix & </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Vector2 & </td> <td class="paramname"><em>b</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const bool </td> <td class="paramname"><em>side</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>maxPrimes</em> = <code>DEFAULT_MAXPRIMES</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Solve a linear system <code>Ax=b</code> over quotient field of a ring giving a random solution if the system is singular and consistent, giving the unique solution if the system is non-singular. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">num</td><td>Vector of numerators of the solution </td></tr> <tr><td class="paramname">den</td><td>The common denominator. 1/den * num is the rational solution of <code>Ax=b</code>. </td></tr> <tr><td class="paramname">A</td><td>Matrix of linear system </td></tr> <tr><td class="paramname">b</td><td>Right-hand side of system </td></tr> <tr><td class="paramname">maxPrimes</td><td>maximum number of moduli to try </td></tr> <tr><td class="paramname">side</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>status of solution </dd></dl> </div> </div> <a class="anchor" id="afd380fe51259c50e3e7314f8d5da6aeb"></a><!-- doxytag: member="LinBox::RationalSolver::solveNonsingular" ref="afd380fe51259c50e3e7314f8d5da6aeb" args="(Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, int maxPrimes=DEFAULT_MAXPRIMES) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> solveNonsingular </td> <td>(</td> <td class="paramtype">Vector1 & </td> <td class="paramname"><em>num</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Integer & </td> <td class="paramname"><em>den</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const IMatrix & </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Vector2 & </td> <td class="paramname"><em>b</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>maxPrimes</em> = <code>DEFAULT_MAXPRIMES</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Solve a nonsingular linear system <code>Ax=b</code> over quotient field of a ring, giving the unique solution of the system. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">num</td><td>Vector of numerators of the solution </td></tr> <tr><td class="paramname">den</td><td>The common denominator. 1/den * num is the rational solution of <code>Ax=b</code>. </td></tr> <tr><td class="paramname">A</td><td>Matrix of linear system </td></tr> <tr><td class="paramname">b</td><td>Right-hand side of system </td></tr> <tr><td class="paramname">maxPrimes</td><td>maximum number of moduli to try</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>status of solution </dd></dl> </div> </div> <a class="anchor" id="af93d887b2581b66c1085688fc965aa99"></a><!-- doxytag: member="LinBox::RationalSolver::solveSingular" ref="af93d887b2581b66c1085688fc965aa99" args="(Vector1 &num, Integer &den, const IMatrix &A, const Vector2 &b, int maxPrimes=DEFAULT_MAXPRIMES) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__padic.html#gabf95d1fb4fcd12ca89717f0be14212a1">SolverReturnStatus</a> solveSingular </td> <td>(</td> <td class="paramtype">Vector1 & </td> <td class="paramname"><em>num</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">Integer & </td> <td class="paramname"><em>den</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const IMatrix & </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const Vector2 & </td> <td class="paramname"><em>b</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>maxPrimes</em> = <code>DEFAULT_MAXPRIMES</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div> <div class="memdoc"> <p>brief Solve a singular linear system <code>Ax=b</code> over quotient field of a ring, giving a random solution if the system is singular and consistent. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">num</td><td>Vector of numerators of the solution </td></tr> <tr><td class="paramname">den</td><td>The common denominator. 1/den * num is the rational solution of <code>Ax=b</code>. </td></tr> <tr><td class="paramname">A</td><td>Matrix of linear system </td></tr> <tr><td class="paramname">b</td><td>Right-hand side of system </td></tr> <tr><td class="paramname">maxPrimes</td><td>maximum number of moduli to try</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>status of solution </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="rational-solver_8h.html">rational-solver.h</a></li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Aug 30 2011 for linbox 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>