|
LAMMP 4.1.0
Lamina High-Precision Arithmetic Library
|
#include "../../../include/lammp/impl/ele_mul.h"#include "../../../include/lammp/impl/mparam.h"#include "../../../include/lammp/impl/prime_table.h"#include "../../../include/lammp/impl/longlong.h"#include "../../../include/lammp/numth.h"
nCr.c 的引用(Include)关系图:函数 | |
| static uint | count_factors (fac_ptr fac, uint nfactors, uint n, uint r, uint nr, uint p) |
| static uint | factor_size_int (mp_size_t rn, uint n) |
| static uint | factor_size_short (mp_size_t rn) |
| mp_size_t | lmmp_nCr_ (mp_ptr dst, mp_bitcnt_t bits, mp_size_t rn, uint n, uint r) |
| 计算 nCr 组合数 ( nCr = n! / (r!(n-r)!) ) | |
| mp_size_t | lmmp_nCr_size_ (uint n, uint r, mp_bitcnt_t *restrict bits) |
| mp_size_t | lmmp_odd_nCr_uint_ (mp_ptr restrict dst, mp_size_t rn, uint n, uint r) |
| mp_size_t | lmmp_odd_nCr_ushort_ (mp_ptr restrict dst, mp_size_t rn, uint n, uint r) |
|
inlinestatic |
引用了 _udiv32by32_q_preinv, fac_t::f, fac_t::j , 以及 MP_ULONG_MAX.
被这些函数引用 lmmp_odd_nCr_uint_() , 以及 lmmp_odd_nCr_ushort_().
这是这个函数的调用关系图:引用了 lmmp_prime_size_().
被这些函数引用 lmmp_odd_nCr_uint_().
函数调用图:
这是这个函数的调用关系图:被这些函数引用 lmmp_odd_nCr_ushort_().
这是这个函数的调用关系图:计算 nCr 组合数 ( nCr = n! / (r!(n-r)!) )
| dst | 结果指针 |
| bits | nCr 的2的因子数 |
| rn | 结果指针的 limb 长度 |
| n | 组合数的总数 |
| r | 组合数的选择数 |
引用了 LIMB_BITS, lmmp_debug_assert, lmmp_odd_nCr_uint_(), lmmp_odd_nCr_ushort_(), lmmp_shl_(), lmmp_zero , 以及 NCR_SHORT_LIMIT.
函数调用图:| mp_size_t lmmp_nCr_size_ | ( | uint | n, |
| uint | r, | ||
| mp_bitcnt_t *restrict | bits | ||
| ) |
引用了 LIMB_BITS, lmmp_limb_popcnt_() , 以及 LOG2_.
函数调用图:引用了 BALLOC_TYPE, BINOMIAL_RN_BASECASE_THRESHOLD, count_factors(), ctz_shl, factor_size_int(), prime_cache_t::is_end, lmmp_div_1_(), lmmp_factors_mul_(), lmmp_mul_1_(), lmmp_param_assert, lmmp_prime_cache_free_(), lmmp_prime_cache_init_(), lmmp_prime_cache_next_(), lmmp_prime_int_table_init_(), prime_cache_t::pp, prime_cache_t::size, TEMP_B_DECL , 以及 TEMP_B_FREE.
被这些函数引用 lmmp_nCr_().
函数调用图:
这是这个函数的调用关系图:引用了 BINOMIAL_RN_BASECASE_THRESHOLD, count_factors(), ctz_shl, factor_size_short(), lmmp_div_1_(), lmmp_factors_mul_(), lmmp_mul_1_(), lmmp_odd_nPr_ushort_(), lmmp_param_assert, lmmp_prime_cnt16_(), MP_USHORT_MAX, ODD_FACTORIAL_SIZE, prime_short_table, TALLOC_TYPE, TEMP_DECL , 以及 TEMP_FREE.
被这些函数引用 lmmp_nCr_().
函数调用图:
这是这个函数的调用关系图: