View source: R/partitionsNumber.R
sum.prod.comb | R Documentation |
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).
## S3 method for class 'prod.comb' sum(I, A, N, K, p)
I |
a vector of integers representing a subset of [1,p] |
A |
a matrix with p rows and K column. Each row contains the number of marked partition in 1<=k<=K groups for one of the p children of a given node. |
N |
a matrix with p rows and K column. Each row contains the number of partition in 1<=k<=K groups for one of the p children of a given node |
K |
an integer. The number of groups wanted. |
p |
an integer. The number of daughters of a node. |
This function uses sum.simplex
to perform the wanted sum on a ad-hoc
matrix, combination of rows of A and N.
double : the result of the sum.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.