distribution tlist merge
Z=atkTr_merge(X,Y)
a sorted distribution tlist
returns Z the sorted distribution tlist merge of X and Y defined by :
Z
X
Y
The sum of the cumulative sum of X.probability and the cumulative sum of Y.probability must be smaller than 1.
X.probability
Y.probability
X=tlist(['distribution','state','probability'],[2,9,15],0.3*[0.25,0.5,0.25]) Y=tlist(['distribution','state','probability'],[5,7,9],0.7*[0.3,0.1,0.6]) Z=atkTr_merge(X,Y) // Expected : Z.state 2. 5. 7. 9. 15. // Z.probability 0.075 0.21 0.07 0.57 0.075