root/bdm/stat/libFN.cpp @ 22

Revision 22, 0.7 kB (checked in by smidl, 16 years ago)

upravy Kalmana

Line 
1#include <itpp/itbase.h>
2#include "libFN.h"
3
4using std::endl;
5
6linfn linfn::evalsome ( ivec &rvind )
7{
8        return *this;
9}
10
11bilinfn::bilinfn ( const RV &rvx0, const RV &rvu0, const mat &A0, const mat &B0 ) : diffbifn ( rvx0,rvu0 )
12{
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" );
16
17        // set dimensions
18        dimy = A0.rows();
19
20        //set internals
21        A = A0;
22        B = B0;
23};
24
25inline 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};
Note: See TracBrowser for help on using the browser.