Changeset 108
- Timestamp:
- 05/12/08 17:56:55 (17 years ago)
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r95 r108 35 35 36 36 ELSE(WIN32) 37 ADD_DEFINITIONS(-DNODEFAULTLIB:library) 37 38 FIND_PACKAGE(ITPP REQUIRED) 38 39 -
bdm/math/chmat.cpp
r76 r108 17 17 Ch = R ( 0, Ch.rows()-1, 0, Ch.cols()-1 ); 18 18 }; 19 inlinemat chmat::to_mat() {mat F=Ch.T() *Ch;return F;};19 mat chmat::to_mat() {mat F=Ch.T() *Ch;return F;}; 20 20 void chmat::mult_sym ( const mat &C ) { 21 21 it_error ( "not implemented" ); … … 37 37 }; 38 38 //TODO can be done more efficiently using BLAS, see triangular matrices 39 inlinevec chmat::sqrt_mult ( const vec &v ) const {vec pom; pom = Ch*v; return pom;};40 inlinedouble chmat::qform ( const vec &v ) const {vec pom; pom = Ch*v; return pom*pom;};41 inlinedouble chmat::invqform ( const vec &v ) const {39 vec chmat::sqrt_mult ( const vec &v ) const {vec pom; pom = Ch*v; return pom;}; 40 double chmat::qform ( const vec &v ) const {vec pom; pom = Ch*v; return pom*pom;}; 41 double chmat::invqform ( const vec &v ) const { 42 42 vec pom(v.length()); 43 43 forward_substitution(Ch.T(),v,pom); 44 44 return pom*pom; 45 45 }; 46 inlinevoid chmat::clear() {Ch.clear();};46 void chmat::clear() {Ch.clear();}; -
bdm/math/chmat.h
r101 r108 32 32 33 33 void opupdt ( const vec &v, double w ); 34 inlinemat to_mat();34 mat to_mat(); 35 35 void mult_sym ( const mat &C ); 36 36 void mult_sym ( const mat &C , chmat &U ) const; … … 38 38 void mult_sym_t ( const mat &C, chmat &U ) const; 39 39 double logdet() const; 40 inlinevec sqrt_mult ( const vec &v ) const;41 inlinedouble qform ( const vec &v ) const;42 inlinedouble invqform ( const vec &v ) const;43 inlinevoid clear();40 vec sqrt_mult ( const vec &v ) const; 41 double qform ( const vec &v ) const; 42 double invqform ( const vec &v ) const; 43 void clear(); 44 44 //! add another chmat \c A2 with weight \c w. 45 45 void add ( const chmat &A2, double w=1.0 ) {}; -
pmsm/sim_var.cpp
r105 r108 14 14 #include <stat/libFN.h> 15 15 #include <estim/libKF.h> 16 #include <estim/libPF.h> 16 //#include <estim/libPF.h> 17 #include <math/chmat.h> 17 18 18 19 #include "pmsm.h" -
pmsm/simulator_zdenek/simulator.cpp
r59 r108 17 17 #include "regulace.h" 18 18 #include "simulator.h" 19 19 20 20 21 #define REZIM_REGULACE 1 // 0...reg. momentu, 1...reg.rychlosti, 2... Isqw=sqrt(Imax^2-Id^2) - max. moment -
pmsm/simulator_zdenek/simulator.h
r59 r108 11 11 */ 12 12 13 // resi problem s M_PI ve VC8 14 #ifndef M_PI 15 #define M_PI 3.14159265358979323846 16 #endif 17 13 18 14 19 extern void pmsmsim_set_parameters(double Rs0, double Ls0, double Fmag0, double Bf0, double p0, double kp0, double J0, double Uc0, double DT0, double dt0);