Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

F_L.hpp

00001 #ifndef __F_L_H__
00002 #define __F_L_H__
00003 
00023 #include <stdio.h>
00024 #include "FloatVector.hpp"
00025 
00026 #include "AFSymMatrix.hpp"
00027 
00028 
00029 class F_L : public AFSymMatrix
00030 {
00031 private:
00032 
00033 float**         data;
00034 
00035 public:
00036         
00037 F_L(int n, float value=0.0);
00038 F_L(const F_L& m);
00039 F_L operator=(const F_L& m);
00040 
00041 virtual ~F_L();
00042 
00043 virtual AFSymMatrix* copyAnn();
00044 virtual AFloatMatrix* copy();
00045 virtual AFloatMatrix* t(AFloatMatrix* t=0){ return 0;}
00046 
00047 // base 0
00048 virtual void set0(int i, int j, float value);
00049 virtual float get0(int i, int j);
00050 
00051 // base 1
00052 virtual void set(int i, int j, float value){ set0(i-1, j-1, value); }
00053 virtual float get(int i, int j){ return get0(i-1, j-1); }
00054 
00055 // computations
00056 virtual void setAll(float value=0.0);
00057 
00058 virtual float det();
00059 virtual float trace();
00060 
00061 virtual float norme2();
00062 virtual float normeF();         // Frobenuis norme= trace(At*A)
00063 virtual float norme1();
00064 virtual float normeInf();
00065 
00066 virtual float sum();
00067 virtual float sum2();
00068 
00069 virtual float minimum();
00070 virtual float maximum();
00071 virtual float sigma();
00072 
00073 // math vectorial op
00074 F_L sqrt();
00075 F_L pow(float pow);
00076 F_L sqr();
00077 F_L exp();
00078 F_L log();
00079 F_L log(float base);
00080 
00081 F_L sin();
00082 F_L cos();
00083 F_L tan();      
00084 
00085 // scalar single operations
00086 void operator+=(float value);
00087 void operator-=(float value);
00088 void operator*=(float value);
00089 void operator/=(float value);
00090 
00091 virtual void add(float value);
00092 virtual void subst(float value);
00093 virtual void mult(float value);
00094 virtual void div(float value);
00095 
00096 // vector single operations
00097 void operator+=(F_L& m);
00098 void operator-=(F_L& m);
00099 
00100 // L*x=b <==> 
00101 virtual FloatVector* solve(FloatVector* b, FloatVector* x=0); 
00102 
00103 // u= A*v including implicit transposition
00104 virtual FloatVector* mult_Av(FloatVector* v, FloatVector* result=0);
00105 virtual FloatVector* mult_ATv(FloatVector* v, FloatVector* result=0);
00106 // u= v*A
00107 virtual FloatVector* mult_vA(FloatVector* v, FloatVector* result=0)     { return mult_ATv(v, result); }
00108 virtual FloatVector* mult_vAT(FloatVector* vt, FloatVector* result=0){ return mult_Av(vt, result); }
00109 
00110 // sub vector usage
00111 // u= A*v
00112 FloatVector* mult_Av(FloatVector* v, int col0, int row0, bool incremental=false, FloatVector* result=0);
00113 FloatVector* mult_ATv(FloatVector* v, int col0, int row0, bool incremental=false, FloatVector* result=0);
00114 // u= v*A
00115 FloatVector* mult_vA(FloatVector* v, int row0, int col0, bool incremental=false, FloatVector* result=0)
00116                         { return mult_ATv(v, col0, row0, incremental, result); }
00117 FloatVector* mult_vAT(FloatVector* vt, int row0, int col0, bool incremental=false, FloatVector* result=0)
00118                         { return mult_Av(vt, col0, row0, incremental, result); }
00119 
00120 
00121 // direct inversion  L
00122 AFSymMatrix* invert();          // Linv = L^-1
00123 
00124 virtual void add(AFloatMatrix& M);
00125 virtual void subst(AFloatMatrix& M);
00126 };
00127 
00128 #endif
00129 
00130          
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com