Changeset 1037 for applications/bdmtoolbox/mex
- Timestamp:
- 06/04/10 11:55:39 (15 years ago)
- Location:
- applications/bdmtoolbox/mex/mex_classes
- Files:
-
- 1 added
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/mex_classes/mexEpdf.m
r944 r1037 19 19 error('define how to evaluate log of this density at point x') 20 20 end 21 function l=sample(p) 22 error('define how to sample from this density') 23 end 21 24 22 25 %%% default functions -- no need to redefine %%% … … 25 28 % define how to evaluate non-normalized log of this density at point x 26 29 % makes sense if faster than normalized 27 evallog(p,x);30 l=evallog(p,x); 28 31 end 29 32 function r=get_rv(p) 30 33 r=p.rv; 31 34 end 35 function m = samplemat(obj, n) 36 m = zeros(obj.dimension, n); 37 for i=1:n 38 m(:,i) = obj.sample; 39 end 40 end 32 41 end 33 42 end