vec3.h File Reference

Classes Vec3,Mat3: 3x1 vector and 3x3 dense matrix objects. More...

#include <mc/mc_base.h>

Include dependency graph for vec3.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef double Vec3 [3]
 Vec3 definition. 3x1 vector object.
typedef double Mat3 [3][3]
 Mat3 definition. 3x3 dense matrix object.

Functions

double Vec3_nrm1 (Vec3 u)
 1-norm of a 3-vector.
double Vec3_nrm2 (Vec3 u)
 2-norm of a 3-vector.
double Vec3_nrm8 (Vec3 u)
 oo-norm of a 3-vector.
double Vec3_dif1 (Vec3 u, Vec3 v)
 1-norm of a 3-vector.
double Vec3_dif2 (Vec3 u, Vec3 v)
 2-norm of a 3-vector.
double Vec3_dif8 (Vec3 u, Vec3 v)
 oo-norm of a 3-vector.
double Vec3_dot (Vec3 u, Vec3 v)
 dot product of two 3-vectors.
void Vec3_init (Vec3 u, double val)
 Initialize a 3-vector to be a constant.
void Vec3_scal (Vec3 u, double val)
 3-vector scale.
void Vec3_copy (Vec3 u, Vec3 v)
 3-vector copy.
void Vec3_axpy (Vec3 u, Vec3 v, double val)
 scalar times 3-vector plus 3-vector.
void Vec3_xcry (Vec3 u, Vec3 v, double *w)
 cross-product of two 3-vectors.
void Vec3_nrmlize (Vec3 u, double scale)
 normalize a 3-vector.
void Vec3_nrmlizeNE (Vec3 u, double scale)
 normalize a 3-vector (no error check).
void Vec3_print (Vec3 u, const char *name)
 print a 3-vector.
void Vec3_mult (Vec3 u, Mat3 A, Vec3 v)
 multiply a 3-matrix and a 3-vector.
void Vec3_getCol (Vec3 u, Mat3 A, int col)
 get 3-vector column of a 3-matrix.
void Vec3_getRow (Vec3 u, Mat3 A, int row)
 get 3-vector row of a 3-matrix.
double Mat3_nrm1 (Mat3 A)
 1-norm of a 3-matrix.
double Mat3_nrm2 (Mat3 A)
 2-norm of a 3-matrix.
double Mat3_nrm8 (Mat3 A)
 oo-norm of a 3-matrix.
double Mat3_dif1 (Mat3 A, Mat3 B)
 1-norm of difference of two 3-matrices.
double Mat3_dif2 (Mat3 A, Mat3 B)
 2-norm of difference of two 3-matrices.
double Mat3_dif8 (Mat3 A, Mat3 B)
 oo-norm of difference of two 3-matrices.
double Mat3_nrm8Low (Mat3 A)
 oo-norm of lower-triangle of a 3-matrix.
void Mat3_eye (Mat3 A)
 identity 3-matrix.
void Mat3_init (Mat3 A, double val)
 initialize a 3-matrix.
void Mat3_scal (Mat3 A, double val)
 normalize a 3-matrix.
void Mat3_copy (Mat3 A, Mat3 B)
 copy a 3-matrix.
void Mat3_axpy (Mat3 A, Mat3 B, double val)
 Saxpy for 3-matrices.
void Mat3_mult (Mat3 C, Mat3 A, Mat3 B)
 multiply 3-matrices.
void Mat3_putCol (Mat3 A, Vec3 u, int col)
 put a 3-vector column in a 3-matrix.
void Mat3_putRow (Mat3 A, Vec3 u, int row)
 put a 3-vector row in a 3-matrix.
void Mat3_print (Mat3 A, const char *name)
 print a 3-matrix.
double Mat3_qri (Mat3 V, Mat3 D, Mat3 A)
 QR iteration for 3-matrices.
void Mat3_gramSch (Mat3 Q, Mat3 R, Mat3 A)
 QR factorization of 3-matrix (via modified Graham-Schmidt).
void Mat3_qr (Mat3 Q, Mat3 R, Mat3 A)
 a single QR iteration for a 3-matrix.
double Mat3_det (Mat3 A)
 determinant of a 3-matrix.
void Mat3_inverse (Mat3 A, Mat3 Ainv)
 inverse of a 3-matrix.


Detailed Description

Classes Vec3,Mat3: 3x1 vector and 3x3 dense matrix objects.

Author:
Michael Holst
Note:
None
Version:
Id
vec3.h,v 1.4 2009/04/24 22:54:09 fetk Exp

Attention:
 *
 * MC = < Manifold Code >
 * Copyright (C) 1994--2008 Michael Holst
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *  

Generated on Mon Aug 9 11:13:44 2010 for MC by  doxygen 1.5.6