root/bdm/stat/libFN.cpp @ 262

Revision 262, 0.6 kB (checked in by smidl, 15 years ago)

cleanup of include files

Line 
1
2#include "libFN.h"
3
4using std::endl;
5using namespace bdm;
6
7bilinfn::bilinfn ( const RV &rvx0, const RV &rvu0, const mat &A0, const mat &B0 ) : diffbifn (A0.rows(), rvx0,rvu0 )
8{
9        //check input
10        it_assert_debug ( ( A0.cols() ==dimx ) & ( A0.rows() ==B0.rows() ), "linfn:: wrong A" );
11        it_assert_debug ( ( B0.cols() ==dimu ), "linfn:: wrong B" );
12
13        // set dimensions
14        dimy = A0.rows();
15
16        //set internals
17        A = A0;
18        B = B0;
19};
20
21inline vec bilinfn::eval ( const  vec &x0, const vec &u0 )
22{
23        it_assert_debug ( x0.length() ==dimx, "linfn::eval Wrong xcond." );
24        it_assert_debug ( u0.length() ==dimu, "linfn::eval Wrong ucond." );
25        return A*x0+B*u0;
26};
Note: See TracBrowser for help on using the browser.