<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_6633238f5107fd0d748d9093e08c459d.html">minimizers</a> </div> </div> <div class="contents"> <h1>NumLinAlg.h File Reference</h1> <p>Collection of linear algebra functions. <a href="#_details">More...</a></p> <code>#include <iosfwd></code><br/> <code>#include <vector></code><br/> <div class="dynheader"> Include dependency graph for NumLinAlg.h:</div> <div class="dynsection"> <div class="center"><img src="NumLinAlg_8h__incl.gif" border="0" usemap="#NumLinAlg_8h_map" alt=""/></div> </div> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> <div class="center"><img src="NumLinAlg_8h__dep__incl.gif" border="0" usemap="#NumLinAlg_8hdep_map" alt=""/></div> <map name="NumLinAlg_8hdep_map" id="NumLinAlg_8hdep"> <area shape="rect" id="node3" href="FunctionController_8cxx.html" title="hippodraw::FunctionController class implementation" alt="" coords="5,83,157,112"/><area shape="rect" id="node5" href="BFGSFitter_8cxx.html" title="hippodraw::BFGSFitter class implemenation." alt="" coords="181,83,293,112"/><area shape="rect" id="node7" href="LMFitter_8cxx.html" title="hippodraw::LMFitter class implemenation." alt="" coords="317,83,411,112"/><area shape="rect" id="node9" href="NumLinAlg_8cxx.html" title="Implemenation of linear algrebra functions." alt="" coords="435,83,544,112"/></map> </div> <p><a href="NumLinAlg_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Namespaces</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw.html">hippodraw</a></td></tr> <p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Namespace for HippoDraw. </p> <br/></td></tr> </p> <tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html">hippodraw::Numeric</a></td></tr> <p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Collection of linear algebra functions. </p> <br/></td></tr> </p> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#af167b6f41b28d68a0af3813267f70be5">allocateMatrix</a> (std::vector< std::vector< double > > &A, int m, int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates a matrix of size m x n. <a href="#af167b6f41b28d68a0af3813267f70be5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a9958ce4dea9d284442d0e5239793df76">allocateVector</a> (std::vector< double > &x, int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates a vector of size n. <a href="#a9958ce4dea9d284442d0e5239793df76"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a6e34a1848b8e6e40e354f0c93e6b205d">cholBackSolve</a> (const std::vector< std::vector< double > > &L, std::vector< double > &x, const std::vector< double > &b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Solves the equation LL'x = b where L is lower triangular matrix. <a href="#a6e34a1848b8e6e40e354f0c93e6b205d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#aecbdf19ba7109e37b7e89e490aaa453a">cholFactor</a> (std::vector< std::vector< double > > &A)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The subroutine which does cholesky factorization of a given Symmetric positive definite matrix (say) A. <a href="#aecbdf19ba7109e37b7e89e490aaa453a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a3c1c282c14b12b9f982f4f3f359fde67">eye</a> (std::vector< std::vector< double > > &M, int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates an n x n identity matrix for M. <a href="#a3c1c282c14b12b9f982f4f3f359fde67"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a329ce3200d86ee77e2b9721db28388ee">innerProduct</a> (const std::vector< double > &a, const std::vector< double > &b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the dot or the inner product of two vectors(i.e. <a href="#a329ce3200d86ee77e2b9721db28388ee"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a87403e87bbdd901c7e42f4bf6f314d5d">invertMatrix</a> (const std::vector< std::vector< double > > &A, std::vector< std::vector< double > > &Ainv)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Inverts a SPD matrix a to get inverse Ainv using the cholesky factorization. <a href="#a87403e87bbdd901c7e42f4bf6f314d5d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a2fc63b8199da4a6f45b4a9590fbab38f">norm</a> (const std::vector< double > &a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the two norm of the vector. <a href="#a2fc63b8199da4a6f45b4a9590fbab38f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< vector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#aed7c2d69196dbccacf351d0fd7a3a8f9">operator*</a> (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes Matrix Matrix Product C=A*B. <a href="#aed7c2d69196dbccacf351d0fd7a3a8f9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#acfd13c1849567e45760bebda154cd5ac">operator*</a> (const std::vector< double > &x, const std::vector< std::vector< double > > &A)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the vector matrix product y = x'A. <a href="#acfd13c1849567e45760bebda154cd5ac"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a8469fb08c4d3dcfb5821cc5f2f07b7bd">operator*</a> (const std::vector< std::vector< double > > &A, const std::vector< double > &x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the Matrix vector product y = Ax. <a href="#a8469fb08c4d3dcfb5821cc5f2f07b7bd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< std::vector<br class="typebreak"/> < double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#af01728f5af099c71a39c34feac7a6601">operator*</a> (double a, const std::vector< std::vector< double > > &A)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the scalar matrix product B = aA. <a href="#af01728f5af099c71a39c34feac7a6601"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a25db1c1e5a7b83f6b4b0ea16793808fd">operator*</a> (double a, const std::vector< double > &x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given a scalar a and a vector x this function performs operation y = ax. <a href="#a25db1c1e5a7b83f6b4b0ea16793808fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< vector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#af5a5fe133eac91d7da446fb2d76171ec">operator+</a> (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given two matrices A and B this function performs operation C = A + B. <a href="#af5a5fe133eac91d7da446fb2d76171ec"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#aab0ab86ece0308067f6955d5fbd36349">operator+</a> (const std::vector< double > &x, const std::vector< double > &y)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given two vectors x and y this function performs operation z = x + y. <a href="#aab0ab86ece0308067f6955d5fbd36349"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< vector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#aa94f5f18611ba6d92109a8f9ed759f89">operator-</a> (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given two matrices A and B this function performs operation C = A - B. <a href="#aa94f5f18611ba6d92109a8f9ed759f89"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#ae4cc126d925009eba9a72fd3aeb43eee">operator-</a> (const std::vector< double > &y)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given a vector y this function performs operation z = - y. <a href="#ae4cc126d925009eba9a72fd3aeb43eee"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a83635d69c8d1388f6f5857be75105d43">operator-</a> (const std::vector< double > &x, const std::vector< double > &y)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given two vectors x and y this function performs operation z = x - y. <a href="#a83635d69c8d1388f6f5857be75105d43"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< std::vector<br class="typebreak"/> < double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#af1026e0b4c90d1226b59b1c7570b6fde">operator/</a> (const std::vector< std::vector< double > > &A, double a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the scalar matrix product B = A/a. <a href="#af1026e0b4c90d1226b59b1c7570b6fde"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a1f5254a9fe7eb0973dd1eff892ac39a0">operator/</a> (const std::vector< double > &x, double a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given a scalar and a vector x this function performs operation y = x/a. <a href="#a1f5254a9fe7eb0973dd1eff892ac39a0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">vector< vector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#af9cb017e1c9362831eccadf6bceac017">outerProduct</a> (const std::vector< double > &a, const std::vector< double > &b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the outer product of two vectors (i.e. <a href="#af9cb017e1c9362831eccadf6bceac017"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#ab6ec8f5900d139d769c7e4aaa8e63f8a">quadraticProduct</a> (const std::vector< std::vector< double > > &A, const std::vector< double > x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates the vector-matrix-vector product x'*A*x. <a href="#ab6ec8f5900d139d769c7e4aaa8e63f8a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a7d05b2097f4cf54b1afca1c96806613e">write</a> (const std::vector< std::vector< double > > &A)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given the matrix it writes it to std stream. <a href="#a7d05b2097f4cf54b1afca1c96806613e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacehippodraw_1_1Numeric.html#a339393d88f1319ad9ae63afad77ec304">write</a> (const std::vector< double > &x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Given the vector it writes it to std stream. <a href="#a339393d88f1319ad9ae63afad77ec304"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Collection of linear algebra functions. </p> <p>Copyright (C) 2003, 2004 The Board of Trustees of The Leland Stanford Junior University. All Rights Reserved.</p> <dl class="rcs"><dt><b>Id</b></dt><dd><a class="el" href="NumLinAlg_8h.html" title="Collection of linear algebra functions.">NumLinAlg.h</a>,v 1.12 2005/06/13 23:34:37 pfkeb Exp </dd></dl> <dl class="author"><dt><b>Author:</b></dt><dd>Kaustuv <<a href="mailto:kaustuv@stanford.edu">kaustuv@stanford.edu</a>> </dd></dl> <p>Definition in file <a class="el" href="NumLinAlg_8h_source.html">NumLinAlg.h</a>.</p> </div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>