Show
Ignore:
Timestamp:
07/28/09 15:07:47 (15 years ago)
Author:
vbarta
Message:

moved egiw_test to testsuite (partially converted to a configurable test); added public method clearing RVs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/tests/enorm_test.cpp

    r428 r436  
    33#include "stat/emix.h" 
    44#include "mat_checks.h" 
     5#include "test_util.h" 
    56#include "UnitTest++.h" 
    67 
     
    3435} 
    3536 
    36 } 
    37  
    38 double normcoef ( const epdf* ep,const vec &xb, const vec &yb, int Ngr=100 ) { 
    39         mat PPdf ( Ngr+1,Ngr+1 ); 
    40         vec rgr ( 2 ); 
    41  
    42         int i=0,j=0; 
    43         double xstep= ( xb ( 1 )-xb ( 0 ) ) /Ngr; 
    44         double ystep= ( yb ( 1 )-yb ( 0 ) ) /Ngr; 
    45  
    46         for ( double x=xb ( 0 );x<=xb ( 1 );x+= xstep,i++ ) { 
    47                 rgr ( 0 ) =x;j=0; 
    48                 for ( double y=yb ( 0 );y<=yb ( 1 );y+=ystep,j++ ) { 
    49                         rgr ( 1 ) =y; 
    50                         PPdf ( i,j ) =exp ( ep->evallog ( rgr ) ); 
    51                 } 
    52         } 
    53         return sumsum ( PPdf ) *xstep*ystep; 
    5437} 
    5538