00001 #ifndef vnl_fastops_h_
00002 #define vnl_fastops_h_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include <vnl/vnl_vector.h>
00015 #include <vnl/vnl_matrix.h>
00016
00017
00018
00019
00020 class vnl_fastops {
00021 public:
00022 static void AtA(const vnl_matrix<double>& A, vnl_matrix<double>* out);
00023
00024 static void AB(const vnl_matrix<double>& A, const vnl_matrix<double>& B, vnl_matrix<double>* out);
00025 static void AtB(const vnl_matrix<double>& A, const vnl_matrix<double>& B, vnl_matrix<double>* out);
00026 static void AtB(const vnl_matrix<double>& A, const vnl_vector<double>& B, vnl_vector<double>* out);
00027 static void ABt(const vnl_matrix<double>& A, const vnl_matrix<double>& B, vnl_matrix<double>* out);
00028
00029 static void inc_X_by_AtB(vnl_matrix<double>& X, const vnl_matrix<double>& A, const vnl_matrix<double>& B);
00030 static void inc_X_by_AtB(vnl_vector<double>& X, const vnl_matrix<double>& A, const vnl_vector<double>& B);
00031 static void inc_X_by_AtA(vnl_matrix<double>& X, const vnl_matrix<double>& A);
00032
00033 static void dec_X_by_AtB(vnl_matrix<double>& X, const vnl_matrix<double>& A, const vnl_matrix<double>& B);
00034 static void dec_X_by_AtA(vnl_matrix<double>& X, const vnl_matrix<double>& A);
00035
00036 static void dec_X_by_ABt(vnl_matrix<double>& X, const vnl_matrix<double>& A, const vnl_matrix<double>& B);
00037
00038
00039 static double dot(const double* a, const double* b, int n);
00040 };
00041
00042 #endif // vnl_fastops_h_