root/applications/bdmtoolbox/mex/mex_classes/mexEpdf.m @ 944

Revision 944, 0.9 kB (checked in by smidl, 14 years ago)

Doc + new examples

RevLine 
[937]1classdef mexEpdf
2    properties
[943]3            rv=RV; %empty description add some valid RV when needed
[937]4    end
5    methods
6        function m=mean(p)
7            error('define how to compute mean')
8        end
9        function validate(p)
10            error('check if the density is consistent')
11        end
12        function dim=dimension(p)
13            error('return dimension of the density')
14        end
15        function v=variance(p)
16            error('define how to compute mean')
17        end
18        function l=evallog(p,x)
19            error('define how to evaluate log of this density at point x')
20        end
[943]21       
[944]22        %%% default functions -- no need to redefine %%%
[943]23       
[937]24        function l=evallog_nn(p,x)
25            % define how to evaluate non-normalized log of this density at point x
26            % makes sense if faster than normalized
27            evallog(p,x);
28        end
[943]29                  function r=get_rv(p)
30                        r=p.rv;
31          end
[937]32    end
33end
Note: See TracBrowser for help on using the browser.