Changeset 1196 for library/bdm/math
- Timestamp:
- 09/24/10 21:36:43 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/math/functions.h
r1184 r1196 184 184 bdm_assert_debug ( x0.length() == dimx, "bilinfn::eval Wrong xcond." ); 185 185 bdm_assert_debug ( u0.length() == dimu, "bilinfn::eval Wrong ucond." ); 186 return A*x0 + B*u0;186 return dimu>0 ? A*x0 + B*u0 : A*x0; 187 187 } 188 188 … … 196 196 if ( full ) F = B; //else : nothing has changed no need to regenerate 197 197 } 198 //!@} 199 }; 198 void from_setting(const Setting &set) { 199 diffbifn::from_setting(set); 200 UI::get(A,set,"A",UI::compulsory); 201 UI::get(B,set,"B",UI::compulsory); 202 } 203 void validate() { 204 dimy = A.rows(); 205 dimx = A.cols(); 206 dimu = B.cols(); 207 dimc =dimx+dimu; 208 } 209 //!@} 210 }; 211 UIREGISTER(bilinfn); 200 212 201 213 } //namespace