Legofit
infers population history from nucleotide site patterns.
intpart.h
1#ifndef ARR_INTPART_H
2#define ARR_INTPART_H
3
4#include <stdio.h>
5#include <stdint.h>
6
7typedef struct NumIntPart NumIntPart;
8
9uint64_t numIntPart(int32_t n, int32_t k);
10void numIntPart_free(void);
11int traverseIntPartitions(int n, int m,
12 int (*visit)(int mm, int a[mm], void *data),
13 void *data);
14#endif
void numIntPart_free(void)
Free static variable.
Definition: intpart.c:134
uint64_t numIntPart(int32_t n, int32_t k)
Number of ways to partition a positive integer n into k parts.
Definition: intpart.c:26
int traverseIntPartitions(int n, int k, int(*visit)(int kk, int a[kk], void *data), void *data)
Partition a positive integer n into a sum of k positive integers.
Definition: intpart.c:82