|
LMCAS
Lamina Computer Algebra System
|
多元多项式因式分解器公共 API。 更多...
#include "lmcas_export.hpp"#include "multivariate_poly.hpp"#include "computation_context.hpp"#include "result.hpp"#include <optional>#include <string>#include <tuple>#include <vector>类 | |
| struct | LMCAS::MultiFactorResult |
| 多元因式分解结果 更多... | |
| struct | LMCAS::SquareFreeDecomp |
| 无平方因子分解结果 更多... | |
命名空间 | |
| namespace | LMCAS |
| namespace | LMCAS::detail |
| 多元 Hensel 提升(单变量步) | |
类型定义 | |
| using | LMCAS::MultiFactorCheckedResult = Result<MathResult<MultiFactorResult>> |
函数 | |
| __attribute__((visibility("default"))) Result< EqvProfile > eqv_profile_from_name(const std | LMCAS::__attribute__ ((visibility("default"))) BerlekampResult berlekamp_factor(const Polynomial< Rational > &poly |
| Berlekamp 模素数分解(内部接口). | |
| LMCAS::detail::__attribute__ ((visibility("default"))) bool is_linear(const MultiPoly &poly | |
| 检测是否为线性多项式 | |
变量 | |
| const MultiPoly & | LMCAS::b |
| const std::string & | LMCAS::detail::main_var |
| const std::string & | LMCAS::main_var |
多元多项式因式分解器公共 API。
采用 Wang-EEZ(Enhanced Extended Zassenhaus)算法,将多元多项式分解为 不可约因子的乘积。核心流程:预处理(容度/本原/无平方)→ 求值同态降维 → 一元分解 → 多元 Hensel 提升 → 试除验证。
在文件 multivariate_factor.hpp 中定义.
| struct LMCAS::MultiFactorResult |
多元因式分解结果
满足不变量:constant * ∏(factors[i] ^ multiplicities[i]) == 原多项式。 Complete 结果的终端因子已证明不可约;Inconclusive 结果保留精确乘积。
在文件 multivariate_factor.hpp 第 33 行定义.
| 类成员 | ||
|---|---|---|
| Rational | constant | 数值常数因子 |
| vector< MultiPoly > | factors | 精确因子列表(各因子本原) |
| vector< int > | multiplicities | 各因子的重数 |
| struct LMCAS::SquareFreeDecomp |
无平方因子分解结果
components[i] 的重数为 i+1。 满足:f = components[0] * components[1]² * components[2]³ * ...(至多差常数)。
在文件 multivariate_factor.hpp 第 100 行定义.
| 类成员 | ||
|---|---|---|
| vector< MultiPoly > | components | 各无平方分量,components[i] 重数为 i+1 |