Changeset 695 for library/bdm/base/datasources.cpp
- Timestamp:
- 11/03/09 00:03:19 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/datasources.cpp
r693 r695 122 122 } 123 123 124 void stateDS::from_setting ( const Setting &set ) {124 void StateDS::from_setting ( const Setting &set ) { 125 125 IM = UI::build<pdf> ( set, "IM", UI::compulsory ); 126 126 OM = UI::build<pdf> ( set, "OM", UI::compulsory ); 127 127 128 dt.set_length ( OM->dimension() ); 129 xt.set_length ( IM->dimension() ); 130 ut.set_length ( 0 ); 128 //todo test if IM->rvc contains IM->rv 129 //todo test if OM->rvc contains IM->rv 130 131 UI::get(xt,set,"x0",UI::optional); 132 133 // prepare urv 134 validate(); 135 } 131 136 132 #if 0 133 RV* rvtmp = UI::build<RV> ( set["IM"], "rvu", UI::compulsory ); 134 //set_drv(rvtmp); 135 #endif 137 void StateDS::validate(){ 138 Yrv = concat(OM->_rv() , IM->_rv()); // export also true state 139 ytsize = Yrv._dsize(); 140 141 RV tmp=concat(OM->_rvc(), IM->_rvc()); // what i not in rvc 142 Urv = tmp.subt(Yrv); // remove dt,xt and 143 Urv = Urv.subt(Yrv.copy_t(-1)); // remove dt,xt and 144 utsize= Urv._dsize(); 145 146 set_drv(Yrv,Urv); 147 dtsize = utsize + ytsize; 148 149 dt.set_length ( dtsize ); 150 if (xt.length()!= IM->dimension() ) { 151 xt=zeros(IM->dimension()); 152 } 153 ut.set_length ( Urv._dsize() ); 154 155 //create data links 156 u2imc.set_connection(IM->_rvc(), Urv); 157 u2omc.set_connection(OM->_rvc(), Urv); 136 158 }