Namespaces | Functions
NumLinAlg.h File Reference

Collection of linear algebra functions. More...

#include <iosfwd>
#include <vector>
Include dependency graph for NumLinAlg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  hippodraw
 

Namespace for HippoDraw.


namespace  hippodraw::Numeric
 

Collection of linear algebra functions.


Functions

int allocateMatrix (std::vector< std::vector< double > > &A, int m, int n)
 Allocates a matrix of size m x n.
int allocateVector (std::vector< double > &x, int n)
 Allocates a vector of size n.
int cholBackSolve (const std::vector< std::vector< double > > &L, std::vector< double > &x, const std::vector< double > &b)
 Solves the equation LL'x = b where L is lower triangular matrix.
int cholFactor (std::vector< std::vector< double > > &A)
 The subroutine which does cholesky factorization of a given Symmetric positive definite matrix (say) A.
int eye (std::vector< std::vector< double > > &M, int n)
 Creates an n x n identity matrix for M.
double innerProduct (const std::vector< double > &a, const std::vector< double > &b)
 Computes the dot or the inner product of two vectors(i.e.
int invertMatrix (const std::vector< std::vector< double > > &A, std::vector< std::vector< double > > &Ainv)
 Inverts a SPD matrix a to get inverse Ainv using the cholesky factorization.
double norm (const std::vector< double > &a)
 Computes the two norm of the vector.
std::vector< std::vector
< double > > 
operator* (double a, const std::vector< std::vector< double > > &A)
 Computes the scalar matrix product B = aA.
std::vector< double > operator* (const std::vector< std::vector< double > > &A, const std::vector< double > &x)
 Computes the Matrix vector product y = Ax.
std::vector< double > operator* (const std::vector< double > &x, const std::vector< std::vector< double > > &A)
 Computes the vector matrix product y = x'A.
std::vector< double > operator* (double a, const std::vector< double > &x)
 Given a scalar a and a vector x this function performs operation y = ax.
std::vector< vector< double > > operator* (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)
 Computes Matrix Matrix Product C=A*B.
std::vector< vector< double > > operator+ (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)
 Given two matrices A and B this function performs operation C = A + B.
std::vector< double > operator+ (const std::vector< double > &x, const std::vector< double > &y)
 Given two vectors x and y this function performs operation z = x + y.
std::vector< double > operator- (const std::vector< double > &x, const std::vector< double > &y)
 Given two vectors x and y this function performs operation z = x - y.
std::vector< vector< double > > operator- (const std::vector< std::vector< double > > &A, const std::vector< std::vector< double > > &B)
 Given two matrices A and B this function performs operation C = A - B.
std::vector< double > operator- (const std::vector< double > &y)
 Given a vector y this function performs operation z = - y.
std::vector< std::vector
< double > > 
operator/ (const std::vector< std::vector< double > > &A, double a)
 Computes the scalar matrix product B = A/a.
std::vector< double > operator/ (const std::vector< double > &x, double a)
 Given a scalar and a vector x this function performs operation y = x/a.
vector< vector< double > > outerProduct (const std::vector< double > &a, const std::vector< double > &b)
 Computes the outer product of two vectors (i.e.
double quadraticProduct (const std::vector< std::vector< double > > &A, const std::vector< double > x)
 Calculates the vector-matrix-vector product x'*A*x.
int write (const std::vector< double > &x)
 Given the vector it writes it to std stream.
int write (const std::vector< std::vector< double > > &A)
 Given the matrix it writes it to std stream.

Detailed Description

Collection of linear algebra functions.

Copyright (C) 2003, 2004 The Board of Trustees of The Leland Stanford Junior University. All Rights Reserved.

Id:
NumLinAlg.h,v 1.12 2005/06/13 23:34:37 pfkeb Exp
Author:
Kaustuv <kaustuv@stanford.edu>

Definition in file NumLinAlg.h.


Generated for HippoDraw Class Library by doxygen