Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

The vm_Math C++ template Library

1.0.5

Copyright

Author:
Terry Gaetz
Copyright (C) 2006 Smithsonian Astrophysical Observatory

This file is part of vm_math

vm_math is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

vm_Math 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA

Overview

The vm_math C++ library is a collection of templatized routines to deal efficiently with low-level floating point vectors, 3-vectors, and 3x3 matrices. It is split up into several sub-packages (see the Modules page for more information).

The vm_math package brings together a number of functions for operating on 3-vectors and 3-matrices, and for creating orthonormal 3-matrices corresponding to proper rotations (i.e., orthonormal matrices preserving the coordinate system parity).

These are implemented as inlined static member functions; the functions are bundled into classes in order to take them out of the global namespace. By making the functions static member functions, they can be called without recourse to a an instantiated object, e.g.

    double v1[] = { 1.3, 2.4, 7.2, 9.7 };
    double v2[] = { 7.2, 1.9, 3.1, 4.1 };
    double foo = vm_VMath<double,4>::dot( v2, v1 );

The package currently contains 3 classes:

All members are inlined, so the package consists only of header files.

vm_VMath common numerical operations

on N_len-long * 1 dimensional arrays of T_fp

These routines provide the basic low-level support for 1-dimensional arrays of floating point values. The library is a C++ template library, with template parameters T_fp and N_len. T_fp is the floating point type. It must be a simple type (float or double), since it is assumed that the array can be copied as plain ol' data using memcpy. N_len is the dimension of the vector, assumed to be small, e.g., 9 for a flat representation of a 3x3 matrix. The class has no state information with all functionality implemented as (we hope) inlined functions.

To use these routines, ensure that you include the correct header file:

  #include <vm_vmath/vm_vmath.h>
or
  #include <vm_vmath/vm_math.h>

vm_V3Math common numerical operations

on 3-vectors of floating point values

These routines provide the basic low-level support for 3-vectors of floating point values of type T_fp (float or double). The library is a C++ template library, templatized on T_fp.

To use these routines, ensure that you include the correct header file:

  #include <vm_vmath/vm_v3math.h>
or
  #include <vm_vmath/vm_math.h>

vm_M3math common numerical operations

on 3x3 matrices of floating point values

These routines provide the basic low-level support for 3x3 matrices of floating point values of type T_fp (float or double). The library is a C++ template library, templatized on T_fp.

To use these routines, ensure that you include the correct header file:

  #include <vm_vmath/vm_m3math.h>
or
  #include <vm_vmath/vm_math.h>

Generated on Wed Apr 19 17:38:26 2006 for vm_math by  doxygen 1.4.2