compacts a multiset distribution tlist
Y=atkTree_compact(X)
returns Y the compacted discrete distribution tlist obtained from X. The states of X must be sorted in ascending order. In X, a state s can appear several times with different probabilities. In Y, each state s appears only once with the sum of its probabilities.
X=tlist(['distribution','state','probability'],[2,2,9,15],[0.125,0.125,0.5,0.25]) Y=atkTr_compact(X) | ![]() | ![]() |