Rdocumentation
powered by
Learn R Programming
PhylogeneticEM (version 1.0.0)
sum.prod.comb: Sum on a simplex
Description
sum.prod.comb
returns the sum on k_1+...+k_p=K+|I|-1, k_i>0 of the products of prod(A[i,k_i], i in I)*prod(N[i,k_i], i not in I).
Usage
"sum"(I, A, N, K, p)
Arguments
I
a vector of integers representing a subset of [1,p]
A
a martix with p rows and K column. Each row contains the number of marqued partition in 1
N
a martix with p rows and K column. Each row contains the number of partition in 1
K
an integer. Tne number of groups wanted.
p
an integer. The number of daughters of a node.
Value
double : the result of the sum.
Details
This function uses
sum.simplex
to perform the wanted sum on a ad-hoc matrix, combination of rows of A and N.