|
LAMMP 4.2.0
Lamina High-Precision Arithmetic Library
|
#include "../../../include/lammp/impl/ele_mul.h"#include "../../../include/lammp/impl/inlines.h"#include "../../../include/lammp/impl/lglg.h"#include "../../../include/lammp/impl/longlong.h"#include "../../../include/lammp/impl/mparam.h"#include "../../../include/lammp/impl/prime_table.h"#include "../../../include/lammp/numth.h"
nCr.c 的引用(Include)关系图:结构体 | |
| struct | bino_choose_t |
宏定义 | |
| #define | div_1(dst, rn, v) |
| #define | mul_1(dst, rn, v) |
函数 | |
| 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 ushort | factor_size_short (mp_size_t rn) |
| mp_size_t | lmmp_nCr_ (mp_ptr restrict dst, mp_bitcnt_t bits, mp_size_t rn, uint n, uint r) |
| mp_size_t | lmmp_nCr_size_ (uint n, uint r, mp_bitcnt_t *restrict bits) |
| Copyright (C) 2026 HJimmyK(Jericho Knox) | |
| static mp_size_t | lmmp_odd_factorial_ (mp_ptr restrict dst, mp_size_t rn, uint n) |
| static mp_size_t | lmmp_odd_nCr_div_ (mp_ptr restrict dst, mp_size_t rn, bino_choose_t *restrict ctx) |
| 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) |
| static mp_size_t | lmmp_odd_nPr_product_ (mp_ptr restrict dst, mp_size_t rn, uint n, uint r) |
| 使用累乘函数计算nPr(奇数部分) | |
| struct bino_choose_t |
bino_choose_t 的协作图:| 成员变量 | ||
|---|---|---|
| mp_bitcnt_t | fac_bits | |
| mp_size_t | fac_n | |
| uint | n | |
| mp_bitcnt_t | nPr_bits | |
| mp_size_t | nPr_n | |
| uint | r | |
|
inlinestatic |
引用了 _udiv32by32_q_preinv, MP_ULONG_MAX , 以及 n.
被这些函数引用 lmmp_odd_nCr_uint_() , 以及 lmmp_odd_nCr_ushort_().
这是这个函数的调用关系图:引用了 lmmp_debug_assert, lmmp_prime_size_(), MP_UINT_MAX , 以及 n.
被这些函数引用 lmmp_odd_nCr_uint_().
函数调用图:
这是这个函数的调用关系图:引用了 lmmp_debug_assert, MP_USHORT_MAX , 以及 n.
被这些函数引用 lmmp_odd_nCr_ushort_().
这是这个函数的调用关系图:引用了 LIMB_BITS, lmmp_odd_nCr_uint_(), lmmp_odd_nCr_ushort_(), lmmp_param_assert, lmmp_shl_(), lmmp_zero, n , 以及 NCR_SHORT_LIMIT.
函数调用图:| mp_size_t lmmp_nCr_size_ | ( | uint | n, |
| uint | r, | ||
| mp_bitcnt_t *restrict | bits | ||
| ) |
Copyright (C) 2026 HJimmyK(Jericho Knox)
This file is part of LAMMP.
LAMMP is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed WITHOUT ANY WARRANTY.
See https://www.gnu.org/licenses/.
引用了 LIMB_BITS, lmmp_limb_popcnt_, lmmp_param_assert, lmmp_pow_1_size_(), log2_fac_ceil(), log2_fac_floor(), MP_UINT_MAX, n , 以及 ODD_FACTORIAL_SIZE.
函数调用图:引用了 lmmp_odd_factorial_uint_(), lmmp_odd_nPr_ushort_(), n , 以及 NPR_SHORT_LIMIT.
被这些函数引用 lmmp_odd_nCr_div_().
函数调用图:
这是这个函数的调用关系图:
|
static |
引用了 LIMB_BITS, lmmp_debug_assert, lmmp_divexact_(), lmmp_odd_factorial_(), lmmp_odd_nPr_product_(), lmmp_param_assert, n, TALLOC_TYPE, TEMP_DECL , 以及 TEMP_FREE.
被这些函数引用 lmmp_odd_nCr_uint_().
函数调用图:
这是这个函数的调用关系图:引用了 BALLOC_TYPE, BINOMIAL_RN_BASECASE_THRESHOLD, count_factors(), ctz_shr_u64, div_1, factor_size_int(), lmmp_factorial_size_(), lmmp_factors_mul_(), lmmp_nPr_size_(), lmmp_odd_nCr_div_(), lmmp_param_assert, lmmp_prime_cache_free_(), lmmp_prime_cache_init_(), lmmp_prime_cache_next_(), lmmp_prime_int_table_init_(), mul_1, n, bino_choose_t::nPr_n, t, TEMP_B_DECL , 以及 TEMP_B_FREE.
被这些函数引用 lmmp_nCr_().
函数调用图:
这是这个函数的调用关系图:引用了 BINOMIAL_RN_BASECASE_THRESHOLD, count_factors(), ctz_shr_u64, div_1, factor_size_short(), lmmp_factors_mul_ushort_(), lmmp_odd_nPr_ushort_(), lmmp_param_assert, lmmp_prime_cnt16_(), MP_USHORT_MAX, mul_1, n, ODD_FACTORIAL_SIZE, prime_short_table, t, TALLOC_TYPE, TEMP_DECL , 以及 TEMP_FREE.
被这些函数引用 lmmp_nCr_().
函数调用图:
这是这个函数的调用关系图:使用累乘函数计算nPr(奇数部分)
引用了 ctz_shr_u32, lmmp_copy, lmmp_elem_mul_ulong_(), MP_UINT_MAX, n, t, TALLOC_TYPE, TEMP_DECL, TEMP_FREE , 以及 tp.
被这些函数引用 lmmp_odd_nCr_div_().
函数调用图:
这是这个函数的调用关系图: