GBeliefPURPOSEGaussian-based belief constructor.
SYNOPSISfunction gb=GBelief(varargin)
DESCRIPTIONGaussian-based belief constructor. Generates a belief on a continuous state space using a gaussian mixture. Parameters: GM: The Gaussian mixture. maxC: The maximum number of components in the mixtures representing beliefs. Beliefs with larger mixtures are compressed to fit in this threshold. Note that GBelief inherits from Belief but also from GMixture. Thus, all GMixture functions are directly appliable to GBeliefs. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function gb=GBelief(varargin) 0002 % Gaussian-based belief constructor. 0003 % 0004 % Generates a belief on a continuous state space using a gaussian 0005 % mixture. 0006 % Parameters: 0007 % GM: The Gaussian mixture. 0008 % maxC: The maximum number of components in the mixtures representing 0009 % beliefs. Beliefs with larger mixtures are compressed to fit in 0010 % this threshold. 0011 % 0012 % Note that GBelief inherits from Belief but also from GMixture. Thus, 0013 % all GMixture functions are directly appliable to GBeliefs. 0014 0015 switch nargin 0016 0017 case 1 0018 if isa(varargin{1},'GBelief') 0019 gb=varargin{1}; 0020 else 0021 if isa(varargin{1},'GMixture') 0022 gb=GBelief(varargin{1},0); 0023 else 0024 error('Wrong parameter type in GBelief constructor'); 0025 end 0026 end 0027 0028 case 2 0029 if isa(varargin{1},'GMixture') && isa(varargin{2},'double') 0030 0031 gb.maxC=floor(varargin{2}); 0032 gm=Normalize(Compress(varargin{1},gb.maxC)); 0033 0034 b=Belief(); 0035 0036 gb=class(gb,'GBelief',b,gm); 0037 else 0038 error('Wrong parameter type in GBelief constructor'); 0039 end 0040 0041 otherwise 0042 error('Wrong number of parameters in GBelief constructor'); 0043 end 0044 |