LMCAS
Lamina Computer Algebra System
Toggle main menu visibility
载入中...
搜索中...
未找到
exact_root.hpp
浏览该文件的文档.
1
#pragma once
2
3
#include "
internal/exact_root_id.hpp
"
4
#include "
internal/exact_algebraic.hpp
"
5
#include "
numeric_value.hpp
"
6
#include "
result.hpp
"
7
8
#include <variant>
9
#include <vector>
10
11
namespace
LMCAS::detail
{
12
13
struct
RealIsolation
{
14
ExactRealAlgebraic
value
;
15
};
16
17
struct
ComplexIsolation
{
18
Rational
real_lower
;
19
Rational
real_upper
;
20
Rational
imaginary_lower
;
21
Rational
imaginary_upper
;
22
ExactRealAlgebraic
real_projection
;
23
ExactRealAlgebraic
imaginary_projection
;
24
};
25
26
using
RootIsolation
= std::variant<RealIsolation, ComplexIsolation>;
27
28
struct
NumericEvaluationOptions
{
29
double
absolute_tolerance
= 1
e
-12;
30
double
relative_tolerance
= 1
e
-12;
31
};
32
33
Result<ExactRootId>
make_exact_root_id
(
34
Polynomial<Rational>
polynomial,
35
std::size_t index,
36
ComputationContext
&
context
,
37
const
std::string&
operation
=
"rootof.construct"
);
38
39
Result<std::vector<RootIsolation>
>
isolate_exact_roots
(
40
const
Polynomial<Rational>
& polynomial,
41
ComputationContext
&
context
,
42
const
std::string&
operation
=
"rootof.isolate"
);
43
44
Result<RootIsolation>
isolate_exact_root
(
45
const
ExactRootId
& root,
46
ComputationContext
&
context
,
47
const
std::string&
operation
=
"rootof.isolate"
);
48
49
Result<void>
refine_complex_isolation
(
50
const
Polynomial<Rational>
& polynomial,
51
ComplexIsolation
& isolation,
52
const
NumericEvaluationOptions
&
options
,
53
ComputationContext
&
context
,
54
const
std::string&
operation
=
"rootof.refine_complex"
);
55
56
Result<ApproxReal>
evaluate_root_real
(
57
const
ExactRootId
& root,
58
const
NumericEvaluationOptions
&
options
,
59
ComputationContext
&
context
);
60
61
Result<ApproxComplex>
evaluate_root_complex
(
62
const
ExactRootId
& root,
63
const
NumericEvaluationOptions
&
options
,
64
ComputationContext
&
context
);
65
66
}
LMCAS::ComputationContext
定义
computation_context.hpp:99
LMCAS::Polynomial
一元多项式模板类
定义
polynomial.hpp:52
LMCAS::Result
定义
result.hpp:39
exact_algebraic.hpp
exact_root_id.hpp
LMCAS::detail
多元 Hensel 提升(单变量步)
定义
assumption_context.hpp:31
LMCAS::detail::NumericEvaluationOptions::absolute_tolerance
double absolute_tolerance
定义
exact_root.hpp:29
LMCAS::detail::RootIsolation
std::variant< RealIsolation, ComplexIsolation > RootIsolation
定义
exact_root.hpp:26
LMCAS::detail::isolate_exact_root
Result< RootIsolation > isolate_exact_root(const ExactRootId &root, ComputationContext &context, const std::string &operation)
定义
complex_root_isolation.cpp:236
LMCAS::detail::make_exact_root_id
Result< ExactRootId > make_exact_root_id(Polynomial< Rational > polynomial, std::size_t index, ComputationContext &context, const std::string &operation)
定义
exact_root.cpp:95
LMCAS::detail::ComplexIsolation::imaginary_upper
Rational imaginary_upper
定义
exact_root.hpp:21
LMCAS::detail::isolate_exact_roots
Result< std::vector< RootIsolation > > isolate_exact_roots(const Polynomial< Rational > &input, ComputationContext &context, const std::string &operation)
定义
complex_root_isolation.cpp:197
LMCAS::detail::ComplexIsolation::real_upper
Rational real_upper
定义
exact_root.hpp:19
LMCAS::detail::operation
ComputationContext const std::string & operation
定义
exact_algebraic.hpp:32
LMCAS::detail::ComplexIsolation::imaginary_projection
ExactRealAlgebraic imaginary_projection
定义
exact_root.hpp:23
LMCAS::detail::evaluate_root_complex
Result< ApproxComplex > evaluate_root_complex(const ExactRootId &root, const NumericEvaluationOptions &options, ComputationContext &context)
定义
exact_root.cpp:162
LMCAS::detail::ComplexIsolation::real_projection
ExactRealAlgebraic real_projection
定义
exact_root.hpp:22
LMCAS::detail::evaluate_root_real
Result< ApproxReal > evaluate_root_real(const ExactRootId &root, const NumericEvaluationOptions &options, ComputationContext &context)
定义
exact_root.cpp:131
LMCAS::detail::context
std::size_t std::size_t ComputationContext & context
定义
exact_algebraic.hpp:27
LMCAS::detail::refine_complex_isolation
Result< void > refine_complex_isolation(const Polynomial< Rational > &, ComplexIsolation &isolation, const NumericEvaluationOptions &options, ComputationContext &context, const std::string &operation)
定义
complex_root_rectangles.cpp:247
LMCAS::detail::NumericEvaluationOptions::relative_tolerance
double relative_tolerance
定义
exact_root.hpp:30
LMCAS::detail::ComplexIsolation::real_lower
Rational real_lower
定义
exact_root.hpp:18
LMCAS::detail::RealIsolation::value
ExactRealAlgebraic value
定义
exact_root.hpp:14
LMCAS::detail::ComplexIsolation::imaginary_lower
Rational imaginary_lower
定义
exact_root.hpp:20
LMCAS::detail::RealIsolation
定义
exact_root.hpp:13
LMCAS::detail::NumericEvaluationOptions
定义
exact_root.hpp:28
LMCAS::detail::ComplexIsolation
定义
exact_root.hpp:17
LMCAS::e
ExprResult e()
定义
expr_values.cpp:112
LMCAS::options
const std::string ComputationContext const SolveOptions & options
定义
expr.hpp:355
numeric_value.hpp
result.hpp
LMCAS::detail::ExactRealAlgebraic
定义
exact_algebraic.hpp:11
LMCAS::detail::ExactRootId
定义
exact_root_id.hpp:10
src
internal
exact_root.hpp
生成于
, 为 LMCAS使用
1.18.0