about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/general/dispcpt.m
blob: ba4c560792e085276f4b75bdc70f10a6efa84e6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function display_CPT(CPT)

n = ndims(CPT);
parents_size = size(CPT);
parents_size = parents_size(1:end-1);
child_size = size(CPT,n);
c = 1;
for i=1:prod(parents_size)
  parent_inst = ind2subv(parents_size, i);
  fprintf(1, '%d ', parent_inst);
  fprintf(1, ': ');
  index = num2cell([parent_inst 1]);
  index{n} = ':';
  fprintf(1, '%6.4f ', CPT(index{:}));
  fprintf(1, '\n');
end