Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/bnt/potentials/@upot/upot.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 = upot(domain, sizes, p, u) | |
2 % UPOT Make a discrete utility potential. | |
3 % pot = upot(domain, sizes, p, u) | |
4 % | |
5 % sizes(i) is the size of the i'th domain element. | |
6 % p defaults to all 1s, u defaults to all 0s. | |
7 | |
8 if nargin < 3, p = myones(sizes); end | |
9 if nargin < 4, u = 0*myones(sizes); end | |
10 | |
11 pot.domain = domain; | |
12 pot.p = myreshape(p, sizes); | |
13 pot.u = myreshape(u, sizes); | |
14 pot.sizes = sizes(:)'; | |
15 pot = class(pot, 'upot'); |