Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_linear_operators_3.h

Go to the documentation of this file.
00001 #ifndef vnl_linear_operators_3_h_
00002 #define vnl_linear_operators_3_h_
00003 // This is vxl/vnl/vnl_linear_operators_3.h
00004 
00005 //: \file
00006 //  \brief 3D linear algebra operations
00007 //  \author Andrew W. Fitzgibbon, Oxford RRG, 04 Aug 96 
00008 //    Specialized linear operators for 3D vectors and matrices.
00009 //    Include this file if you're inlining or compiling linear algebra
00010 //    code for speed.
00011 //
00012 
00013 // Modifications:
00014 // LSB (Manchester) 23/3/01 Tidied documentation
00015 //
00016 //-----------------------------------------------------------------------------
00017 
00018 #include <vnl/vnl_double_3.h>
00019 #include <vnl/vnl_double_3x3.h>
00020 
00021 //: The binary multiplication operator 
00022 inline
00023 vnl_double_3 operator* (const vnl_double_3x3& A, const vnl_double_3& x)
00024 {
00025   const double* a = A.data_block();
00026   double r0 = a[0] * x[0] + a[1] * x[1] + a[2] * x[2];
00027   double r1 = a[3] * x[0] + a[4] * x[1] + a[5] * x[2];
00028   double r2 = a[6] * x[0] + a[7] * x[1] + a[8] * x[2];
00029   return vnl_double_3(r0, r1, r2);
00030 }
00031 
00032 //: The binary addition operator 
00033 inline
00034 vnl_double_3 operator+ (const vnl_double_3& a, const vnl_double_3& b)
00035 {
00036   double r0 = a[0] + b[0];
00037   double r1 = a[1] + b[1];
00038   double r2 = a[2] + b[2];
00039   return vnl_double_3(r0, r1, r2);
00040 }
00041 
00042 #endif // vnl_linear_operators_3_h_

Generated at Wed Mar 12 01:13:15 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000