annotate toolboxes/FullBNT-1.0.7/bnt/potentials/@cpot/enter_cts_evidence_pot.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function pot = enter_cts_evidence_pot(pot, Y, y)
Daniel@0 2 % function pot = enter_cts_evidence_pot(pot, Y, y) (cpot)
Daniel@0 3
Daniel@0 4 ns = sparse(1, max(pot.domain));
Daniel@0 5 ns(pot.domain) = pot.sizes;
Daniel@0 6
Daniel@0 7 X = mysetdiff(pot.domain, Y);
Daniel@0 8 [hx, hy, KXX, KXY, KYX, KYY] = partition_matrix_vec(pot.h, pot.K, X, Y, ns);
Daniel@0 9 pot.g = pot.g + hy'*y - 0.5*y'*KYY*y;
Daniel@0 10 if ~isempty(X)
Daniel@0 11 pot.h = hx - KXY*y;
Daniel@0 12 pot.K = KXX;
Daniel@0 13 end
Daniel@0 14
Daniel@0 15 pot.sizes(find_equiv_posns(Y,pot.domain)) = 0;