Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 99cb5ede6a5329071fbeecc8218deb35 > files > 549

eigen3-doc-3.2-3.mga4.noarch.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Eigen: PartialPivLU&lt; MatrixType &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css"   rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
<!-- <script type="text/javascript"> -->
<!-- </script> -->
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- <a name="top"></a> -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.2.0</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classEigen_1_1PartialPivLU.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1PartialPivLU-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">PartialPivLU&lt; MatrixType &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__LU__Module.html">LU module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename MatrixType&gt;<br/>
class Eigen::PartialPivLU&lt; MatrixType &gt;</h3>

<p>LU decomposition of a matrix with partial pivoting, and related features. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">MatrixType</td><td>the type of the matrix of which we are computing the LU decomposition</td></tr>
  </table>
  </dd>
</dl>
<p>This class represents a LU decomposition of a <b>square</b> <b>invertible</b> matrix, with partial pivoting: the matrix A is decomposed as A = PLU where L is unit-lower-triangular, U is upper-triangular, and P is a permutation matrix.</p>
<p>Typically, partial pivoting LU decomposition is only considered numerically stable for square invertible matrices. Thus LAPACK's dgesv and dgesvx require the matrix to be square and invertible. The present class does the same. It will assert that the matrix is square, but it won't (actually it can't) check that the matrix is invertible: it is your task to check that you only use this decomposition on invertible matrices.</p>
<p>The guaranteed safe alternative, working for all matrices, is the full pivoting LU decomposition, provided by class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a>.</p>
<p>This is <b>not</b> a rank-revealing LU decomposition. Many features are intentionally absent from this class, such as rank computation. If you need these features, use class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a>.</p>
<p>This LU decomposition is suitable to invert invertible matrices. It is what <a class="el" href="classEigen_1_1MatrixBase.html#aa2834da4c855fa35fed8c4030f79f9da">MatrixBase::inverse()</a> uses in the general case. On the other hand, it is <b>not</b> suitable to determine whether a given matrix is invertible.</p>
<p>The data of the LU decomposition can be directly accessed through the methods <a class="el" href="classEigen_1_1PartialPivLU.html#ad69664a62ab4d3026566d0d4a261b187">matrixLU()</a>, <a class="el" href="classEigen_1_1PartialPivLU.html#ade18e5e1ca30e702fd1165e88933b342">permutationP()</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classEigen_1_1MatrixBase.html#a734707779b0449ea429d4ae42c3350f6">MatrixBase::partialPivLu()</a>, <a class="el" href="classEigen_1_1MatrixBase.html#ad63cea11a4bf220298dce4489a1704c7">MatrixBase::determinant()</a>, <a class="el" href="classEigen_1_1MatrixBase.html#aa2834da4c855fa35fed8c4030f79f9da">MatrixBase::inverse()</a>, MatrixBase::computeInverse(), class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa47f041dae554fe1f135e2794ae914a7"><td class="memItemLeft" align="right" valign="top">internal::traits&lt; MatrixType &gt;<br class="typebreak"/>
::Scalar&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#aa47f041dae554fe1f135e2794ae914a7">determinant</a> () const </td></tr>
<tr class="separator:aa47f041dae554fe1f135e2794ae914a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac51c61887a242ecfd26c3c0016899515"><td class="memItemLeft" align="right" valign="top">const internal::solve_retval<br class="typebreak"/>
&lt; <a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a>, typename <br class="typebreak"/>
MatrixType::IdentityReturnType &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#ac51c61887a242ecfd26c3c0016899515">inverse</a> () const </td></tr>
<tr class="separator:ac51c61887a242ecfd26c3c0016899515"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69664a62ab4d3026566d0d4a261b187"><td class="memItemLeft" align="right" valign="top">const MatrixType &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#ad69664a62ab4d3026566d0d4a261b187">matrixLU</a> () const </td></tr>
<tr class="separator:ad69664a62ab4d3026566d0d4a261b187"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d7a9d72398abac8981ef23456c648e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#a89d7a9d72398abac8981ef23456c648e">PartialPivLU</a> ()</td></tr>
<tr class="memdesc:a89d7a9d72398abac8981ef23456c648e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default Constructor.  <a href="#a89d7a9d72398abac8981ef23456c648e">More...</a><br/></td></tr>
<tr class="separator:a89d7a9d72398abac8981ef23456c648e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10cf6cb398968eb0b1e0c5359ace2406"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#a10cf6cb398968eb0b1e0c5359ace2406">PartialPivLU</a> (Index size)</td></tr>
<tr class="memdesc:a10cf6cb398968eb0b1e0c5359ace2406"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default Constructor with memory preallocation.  <a href="#a10cf6cb398968eb0b1e0c5359ace2406">More...</a><br/></td></tr>
<tr class="separator:a10cf6cb398968eb0b1e0c5359ace2406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad06a748eafce01ae965e5f8cc75e6b45"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#ad06a748eafce01ae965e5f8cc75e6b45">PartialPivLU</a> (const MatrixType &amp;matrix)</td></tr>
<tr class="separator:ad06a748eafce01ae965e5f8cc75e6b45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade18e5e1ca30e702fd1165e88933b342"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classEigen_1_1PermutationMatrix.html">PermutationType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#ade18e5e1ca30e702fd1165e88933b342">permutationP</a> () const </td></tr>
<tr class="separator:ade18e5e1ca30e702fd1165e88933b342"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac36925ac693435a090efee1cb5d6d16a"><td class="memItemLeft" align="right" valign="top">MatrixType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#ac36925ac693435a090efee1cb5d6d16a">reconstructedMatrix</a> () const </td></tr>
<tr class="separator:ac36925ac693435a090efee1cb5d6d16a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b96596df4072bb09e8adb5ec2c067f2"><td class="memTemplParams" colspan="2">template&lt;typename Rhs &gt; </td></tr>
<tr class="memitem:a7b96596df4072bb09e8adb5ec2c067f2"><td class="memTemplItemLeft" align="right" valign="top">const internal::solve_retval<br class="typebreak"/>
&lt; <a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a>, Rhs &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classEigen_1_1PartialPivLU.html#a7b96596df4072bb09e8adb5ec2c067f2">solve</a> (const <a class="el" href="classEigen_1_1MatrixBase.html">MatrixBase</a>&lt; Rhs &gt; &amp;b) const </td></tr>
<tr class="separator:a7b96596df4072bb09e8adb5ec2c067f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a89d7a9d72398abac8981ef23456c648e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default Constructor. </p>
<p>The default constructor is useful in cases in which the user intends to perform decompositions via PartialPivLU::compute(const MatrixType&amp;). </p>

</div>
</div>
<a class="anchor" id="a10cf6cb398968eb0b1e0c5359ace2406"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a> </td>
          <td>(</td>
          <td class="paramtype">Index&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default Constructor with memory preallocation. </p>
<p>Like the default constructor but with preallocation of the internal data according to the specified problem <em>size</em>. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classEigen_1_1PartialPivLU.html#a89d7a9d72398abac8981ef23456c648e" title="Default Constructor. ">PartialPivLU()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad06a748eafce01ae965e5f8cc75e6b45"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a> </td>
          <td>(</td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>matrix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">matrix</td><td>the matrix of which to compute the LU decomposition.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>The matrix should have full rank (e.g. if it's square, it should be invertible). If you need to deal with non-full rank, use class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a> instead. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa47f041dae554fe1f135e2794ae914a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">internal::traits&lt; MatrixType &gt;::Scalar determinant </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the determinant of the matrix of which *this is the LU decomposition. It has only linear complexity (that is, O(n) where n is the dimension of the square matrix) as the LU decomposition has already been computed.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>For fixed-size matrices of size up to 4, <a class="el" href="classEigen_1_1MatrixBase.html#ad63cea11a4bf220298dce4489a1704c7">MatrixBase::determinant()</a> offers optimized paths.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>a determinant can be very big or small, so for matrices of large enough dimension, there is a risk of overflow/underflow.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classEigen_1_1MatrixBase.html#ad63cea11a4bf220298dce4489a1704c7">MatrixBase::determinant()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac51c61887a242ecfd26c3c0016899515"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const internal::solve_retval&lt;<a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a>,typename MatrixType::IdentityReturnType&gt; inverse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the inverse of the matrix of which *this is the LU decomposition.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The matrix being decomposed here is assumed to be invertible. If you need to check for invertibility, use class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a> instead.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classEigen_1_1MatrixBase.html#aa2834da4c855fa35fed8c4030f79f9da">MatrixBase::inverse()</a>, LU::inverse() </dd></dl>

</div>
</div>
<a class="anchor" id="ad69664a62ab4d3026566d0d4a261b187"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const MatrixType&amp; matrixLU </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the LU decomposition matrix: the upper-triangular part is U, the unit-lower-triangular part is L (at least for square matrices; in the non-square case, special care is needed, see the documentation of class <a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a>).</dd></dl>
<dl class="section see"><dt>See Also</dt><dd>matrixL(), matrixU() </dd></dl>

</div>
</div>
<a class="anchor" id="ade18e5e1ca30e702fd1165e88933b342"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classEigen_1_1PermutationMatrix.html">PermutationType</a>&amp; permutationP </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the permutation matrix P. </dd></dl>

</div>
</div>
<a class="anchor" id="ac36925ac693435a090efee1cb5d6d16a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MatrixType reconstructedMatrix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>the matrix represented by the decomposition, i.e., it returns the product: P^{-1} L U. This function is provided for debug purpose. </dd></dl>

</div>
</div>
<a class="anchor" id="a7b96596df4072bb09e8adb5ec2c067f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const internal::solve_retval&lt;<a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a>, Rhs&gt; solve </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classEigen_1_1MatrixBase.html">MatrixBase</a>&lt; Rhs &gt; &amp;&#160;</td>
          <td class="paramname"><em>b</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This method returns the solution x to the equation Ax=b, where A is the matrix of which *this is the LU decomposition.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>the right-hand-side of the equation to solve. Can be a vector or a matrix, the only requirement in order for the equation to make sense is that b.rows()==A.rows(), where A is the matrix of which *this is the LU decomposition.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the solution.</dd></dl>
<p>Example: </p>
<div class="fragment"><div class="line">MatrixXd A = <a class="code" href="classEigen_1_1DenseBase.html#a8e759dafdd9ecc446d397b7f5435f60a">MatrixXd::Random</a>(3,3);</div>
<div class="line">MatrixXd B = <a class="code" href="classEigen_1_1DenseBase.html#a8e759dafdd9ecc446d397b7f5435f60a">MatrixXd::Random</a>(3,2);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is the invertible matrix A:&quot;</span> &lt;&lt; endl &lt;&lt; A &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is the matrix B:&quot;</span> &lt;&lt; endl &lt;&lt; B &lt;&lt; endl;</div>
<div class="line">MatrixXd X = A.lu().solve(B);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Here is the (unique) solution X to the equation AX=B:&quot;</span> &lt;&lt; endl &lt;&lt; X &lt;&lt; endl;</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Relative error: &quot;</span> &lt;&lt; (A*X-B).norm() / B.norm() &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p>
<pre class="fragment">Here is the invertible matrix A:
  0.68  0.597  -0.33
-0.211  0.823  0.536
 0.566 -0.605 -0.444
Here is the matrix B:
 0.108  -0.27
-0.0452 0.0268
 0.258  0.904
Here is the (unique) solution X to the equation AX=B:
0.609  2.68
-0.231 -1.57
 0.51  3.51
Relative error: 3.28e-16
</pre><p>Since this <a class="el" href="classEigen_1_1PartialPivLU.html" title="LU decomposition of a matrix with partial pivoting, and related features. ">PartialPivLU</a> class assumes anyway that the matrix A is invertible, the solution theoretically exists and is unique regardless of b.</p>
<dl class="section see"><dt>See Also</dt><dd>TriangularView::solve(), <a class="el" href="classEigen_1_1PartialPivLU.html#ac51c61887a242ecfd26c3c0016899515">inverse()</a>, computeInverse() </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ForwardDeclarations_8h_source.html">ForwardDeclarations.h</a></li>
<li><a class="el" href="PartialPivLU_8h_source.html">PartialPivLU.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1PartialPivLU.html">PartialPivLU</a></li>
    <li class="footer">Generated on Mon Oct 28 2013 11:04:30 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
<!-- Piwik --> 
<!--
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.sylphide-consulting.com/piwik/" : "http://stats.sylphide-consulting.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 20);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://stats.sylphide-consulting.com/piwik/piwik.php?idsite=20" style="border:0" alt="" /></p></noscript>
-->
<!-- End Piwik Tracking Code -->
</body>
</html>