Changeset 18
- Timestamp:
- 02/01/08 10:49:29 (17 years ago)
- Files:
-
- 2 added
- 13 modified
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r17 r18 1 export LD FLAGS=-Ldebug/usr/lib/ -litpp1 export LDLIBS=-litpp_debug 2 2 export CPPFLAGS=-g 3 3 -
bdm/Makefile
r17 r18 1 CPPFLAGS = -g2 3 4 export CPPFLAGS5 6 1 all: subsystem libbdm.a 7 2 … … 13 8 14 9 clean: 10 $(RM) *.o *.a 15 11 cd stat && $(MAKE) clean 16 12 cd estim && $(MAKE) clean 17 cd design && $(MAKE) clean13 # cd design && $(MAKE) clean 18 14 cd math && $(MAKE) clean 19 15 20 libbdm.a: itpp_ext.o 16 libbdm.a: itpp_ext.o subsystem 21 17 $(AR) rvus $@ ./stat/*.o ./estim/*.o ./math/*.o itpp_ext.o -
bdm/design/Makefile
r15 r18 1 1 all: 2 3 clean: 4 $(RM) *.o -
bdm/estim/Makefile
r15 r18 2 2 3 3 clean: 4 rm*.o4 $(RM) *.o -
bdm/math/Makefile
r15 r18 2 2 3 3 clean: 4 rm*.o4 $(RM) *.o -
bdm/math/libDC.cpp
r14 r18 31 31 32 32 dim = V.cols(); 33 mat F; 34 vec D0; 33 35 it_assert_debug( dim == V.rows(),"ldmat::ldmat matrix V is not square!" ); 34 35 36 37 //decompose V in cholesky 38 D0 = ones(dim); 39 40 41 using std::cout; 42 cout<<V; 43 chol(V,F); 44 // L and D will be allocated by ldform() 45 this->ldform(F,D0); 36 46 } 37 47 … … 194 204 195 205 it_assert_debug( A.cols()==dim,"ldmat::ldform A is not compatible" ); 196 it_assert_debug( D .length()==A.rows(),"ldmat::ldform Vector D must have the length as row count of A" );206 it_assert_debug( D0.length()==A.rows(),"ldmat::ldform Vector D must have the length as row count of A" ); 197 207 198 208 L=concat_vertical( zeros( n,n ), diag( sqrt( D0 ) )*A ); … … 202 212 203 213 vec w=zeros( n ); 204 vec v ;214 vec v=zeros(n); 205 215 double sum, beta, pom; 206 216 -
bdm/stat/Makefile
r15 r18 3 3 4 4 clean: 5 rm*.o5 $(RM) *.o -
bdm/stat/libBM.h
r14 r18 112 112 }; 113 113 114 /*! \brief Abstract class for discrete-time sources of data. 115 116 The class abstracts operations of: (i) data aquisition, (ii) data-preprocessing, (iii) scaling of data, and (iv) data resampling from the task of estimation and control. 117 Moreover, for controlled systems, it is able to receive the desired control action and perform it in the next step. (Or as soon as possible). 118 119 */ 120 class DS { 121 //!Observed variables, returned by \c getdata(). 122 RV Drv; 123 //!Action variables, accepted by \c write(). 124 RV Urv; // 125 public: 126 //! Returns full vector of observed data 127 void getdata(vec &dt); 128 //! Returns data records at indeces. 129 void getdata(vec &dt, ivec &indeces); 130 //! Accepts action variable and schedule it for application. 131 void write(vec &ut); 132 //! Accepts action variables at specific indeces 133 void write(vec &ut, ivec &indeces); 134 /*! \brief Method that assigns random variables to the datasource. 135 Typically, the datasource will be constructed without knowledge of random variables. This method will associate existing variables with RVs. 136 137 (Inherited from m3k, may be deprecated soon). 138 */ 139 void linkrvs(RV &drv, RV &urv); 140 141 //! Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system. 142 void step(); 143 }; 114 144 115 145 -
mixpp.kdevelop
r17 r18 18 18 <run> 19 19 <directoryradio>executable</directoryradio> 20 <mainprogram>/home/smidl/work/mixpp/tests/test KF</mainprogram>20 <mainprogram>/home/smidl/work/mixpp/tests/test0</mainprogram> 21 21 <programargs></programargs> 22 22 <globaldebugarguments></globaldebugarguments> … … 222 222 <tree> 223 223 <hidepatterns>*.o,*.lo,CVS</hidepatterns> 224 <hidenonprojectfiles> false</hidenonprojectfiles>224 <hidenonprojectfiles>true</hidenonprojectfiles> 225 225 <showvcsfields>false</showvcsfields> 226 226 </tree> -
mixpp.kdevelop.filelist
r16 r18 22 22 bdm/stat/libBM.cpp 23 23 bdm/stat/libBM.h 24 bdm/stat/libDS.cpp 25 bdm/stat/libDS.h 24 26 bdm/stat/libEF.cpp 25 27 bdm/stat/libEF.h -
tests/Makefile
r17 r18 1 LDFLAGS = -L../bdm2 LDLIBS = -lbdm -litpp1 LDFLAGS += -L../bdm 2 LDLIBS += -lbdm 3 3 4 all: subsystem test0 testKF 4 all: subsystem test0 testKF testSL 5 5 echo $(CPPFLAGS) 6 6 … … 12 12 testKF: testKF.o 13 13 14 testSL: testSL.o 15 14 16 clean: 15 17 $(RM) test0 -
tests/test0.cpp
r15 r18 41 41 cout << "ld:"<<Il.to_mat() << "eye:"<< I <<endl; 42 42 43 cout << "Test ldform()"<<endl; 44 mat V = "1 2; 2 3"; 45 ldmat lV(V); 46 // cout << "ld:" << lV.to_mat() << "eye:"<< I <<endl; 47 43 48 44 49 //Exit program: -
tests/testKF.cpp
r17 r18 20 20 int Ndat; 21 21 22 fin.seek( "d" );23 fin >> 22 bool xxx= fin.seek( "d" ); 23 fin >>Dt; 24 24 fin.seek( "A" ); 25 25 fin >> A; … … 34 34 fin.seek( "Q" ); fin >> Q; 35 35 fin.seek( "P0" ); fin >> P0; 36 fin.seek( "mu0" ); fin >> Mu0; mu0=Mu0; 36 fin.seek( "mu0" ); fin >> Mu0; 37 mu0=Mu0.get_col(0); 37 38 38 39 Ndat = Dt.cols();