00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OB_MATRIX_H
00021 #define OB_MATRIX_H
00022 #include <openbabel/babelconfig.h>
00023 #include <vector>
00024 #include <math.h>
00025
00026 namespace OpenBabel
00027 {
00028
00029
00030
00031
00032
00033
00034
00035 void print_matrix(std::vector<std::vector<double> > &m);
00036 void print_matrix_f (double *m, int rows, int cols);
00037 void print_matrix_ff(double **m, int rows, int cols);
00038
00039 bool mult_matrix(std::vector<std::vector<double> > &c, std::vector<std::vector<double> > &a, std::vector<std::vector<double> > &b);
00040 bool mult_matrix_f (double *c, double *a, double *b, int rows, int cols);
00041 bool mult_matrix_ff(double **c, double **a, double **b, int rows, int cols);
00042
00043 bool invert_matrix(std::vector<std::vector<double> > &m, double &det);
00044 bool invert_matrix_f (double *m, double &det, int rows, int cols);
00045 bool invert_matrix_ff(double **m, double &det, int rows, int cols);
00046
00047 bool convert_matrix_f (std::vector<std::vector<double> > &src, double *dst);
00048 bool convert_matrix_ff(std::vector<std::vector<double> > &src, double **dst);
00049 bool convert_matrix_f (double *src, std::vector<std::vector<double> > &dst, int rows, int cols);
00050 bool convert_matrix_ff(double **src, std::vector<std::vector<double> > &dst, int rows, int cols);
00051 bool convert_matrix_ff_f(double **src, double *dst, int rows, int cols);
00052 bool convert_matrix_f_ff(double *src, double **dst, int rows, int cols);
00053
00054 }
00055
00056 #endif // OB_MATRIX_H
00057