comparison toolboxes/FullBNT-1.0.7/bnt/potentials/@scgcpot/scgcpot.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function pot = scgcpot(cheadsize, ctailsize, p, A, B, C)
2 % SCGCPOT Make a base object of stable conditional gaussian potential.
3 % pot = scgcpot(cheadsize, ctailsize, p, A, B, C)
4 %
5 % cheadsize is the demension of head nodes.
6 % ctailsize is the demension of tail nodes.
7 % r = cheadsize, s = ctailsize
8 % p is discrete probability.
9 % A is table of r*1 vectors;
10 % B is r*s matrices
11 % C is r*r positive semidefinite symmetric matrices
12
13 if nargin < 3
14 p = 1;
15 end
16 if nargin < 4
17 A = zeros(cheadsize,1);
18 end
19 if nargin < 5
20 B = zeros(cheadsize,ctailsize);
21 end
22 if nargin < 6
23 C = zeros(cheadsize,cheadsize);
24 end
25
26 if isempty(A)
27 A = zeros(cheadsize,1);
28 end
29 if isempty(B)
30 B = zeros(cheadsize,ctailsize);
31 end
32 if isempty(C)
33 C = zeros(cheadsize,cheadsize);
34 end
35
36 pot.cheadsize = cheadsize;
37 pot.ctailsize = ctailsize;
38
39 pot.p = p;
40 pot.A = A;
41 pot.B = B;
42 pot.C = C;
43 %if cheadsize == 0
44 % pot.A = [];
45 %end
46 %if ctailsize == 0
47 % pot.B = [];
48 %end
49 pot = class(pot, 'scgcpot');