sum_partitions: Sum on all subsets.

View source: R/partitionsNumber.R

sum_partitionsR Documentation

Sum on all subsets.

Description

sum_partitions returns the sum on all I subset of [1,p], with |I|>m.

Usage

sum_partitions(A, N, K, p, m)

Arguments

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.

m

an integer. The minimum cardinal of a subset allowed.

Details

This function applies sum_partitions.cardFixed to all integer between m and p, and sum the results.

Value

double : the result of the sum.


pbastide/PhylogeneticEM documentation built on Feb. 12, 2024, 1:27 a.m.