00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00016
00017
00028 #ifndef __ls_solve_h
00029 #define __ls_solve_h
00030
00031 #include "vector.h"
00032 #include "matrix.h"
00033 #include "cholesky.h"
00034 namespace SPUC {
00037
00038
00044 vec ls_solve(const mat &A, const vec &b);
00045
00055 mat ls_solve(const mat &A, const mat &b);
00056
00062 vec ls_solve_chol(const mat &A, const vec &b);
00063
00071 vec ls_solve(const mat &L, const mat &U, const vec &b);
00072
00079 vec ls_solve_chol(const mat &A, int p, const vec &b);
00080
00089 vec ls_solve(const mat &L, int p, const mat &U, int q, const vec &b);
00090
00096 vec ls_solve_od(const mat &A, const vec &b);
00097
00103 mat ls_solve_od(const mat &A, const mat &B);
00104
00110 vec backslash(const mat &A, const vec &b);
00111
00117 mat backslash(const mat &A, const mat &B);
00118
00125 vec forward_substitution(const mat &L, const vec &b);
00126
00133 void forward_substitution(const mat &L, const vec &b, vec &x);
00134
00142 vec forward_substitution(const mat &L, int p, const vec &b);
00143
00151 void forward_substitution(const mat &L, int p, const vec &b, vec &x);
00152
00159 vec backward_substitution(const mat &U, const vec &b);
00160
00167 void backward_substitution(const mat &U, const vec &b, vec &x);
00168
00176 vec backward_substitution(const mat &U, int q, const vec &b);
00177
00185 void backward_substitution(const mat &U, int q, const vec &b, vec &x);
00186
00188 }
00189 #endif // __ls_solve_h
00190
00191
00192