Changeset 22 for bdm/stat/libFN.cpp
- Timestamp:
- 02/18/08 17:50:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libFN.cpp
r19 r22 9 9 } 10 10 11 bilinfn::bilinfn ( const RV & x0, const RV &u0, const mat &A0, const mat &B0 )11 bilinfn::bilinfn ( const RV &rvx0, const RV &rvu0, const mat &A0, const mat &B0 ) : diffbifn ( rvx0,rvu0 ) 12 12 { 13 it_assert_debug ( A0.cols() ==A0.rows() ==x0.count(), "linfn:: wrong A" ); 14 it_assert_debug ( ( B0.rows() ==x0.count() ) & ( B0.cols() ==u0.count() ), "linfn:: wrong B" ); 13 //check input 14 it_assert_debug ( ( A0.cols() ==dimx ) & ( A0.rows() ==B0.rows() ), "linfn:: wrong A" ); 15 it_assert_debug ( ( B0.cols() ==dimu ), "linfn:: wrong B" ); 15 16 17 // set dimensions 18 dimy = A0.rows(); 19 20 //set internals 16 21 A = A0; 17 22 B = B0; 18 rv=x0; rv.add ( u0 );19 indexlist=rv.indexlist();20 23 }; 21 24 25 inline vec bilinfn::eval ( const vec &x0, const vec &u0 ) 26 { 27 it_assert_debug ( x0.length() ==dimx, "linfn::eval Wrong xcond." ); 28 it_assert_debug ( u0.length() ==dimu, "linfn::eval Wrong ucond." ); 29 return A*x0+B*u0; 30 };