LMCAS
Lamina Computer Algebra System
Toggle main menu visibility
载入中...
搜索中...
未找到
exact_algebraic.hpp
浏览该文件的文档.
1
#pragma once
2
3
#include "
computation_context.hpp
"
4
#include "
polynomial.hpp
"
5
#include "
result.hpp
"
6
7
#include <cstddef>
8
9
namespace
LMCAS::detail
{
10
11
struct
ExactRealAlgebraic
{
12
Polynomial<Rational>
polynomial
;
13
Rational
lower
;
14
Rational
upper
;
15
std::size_t
root_index
= 0;
16
std::size_t
multiplicity
= 1;
17
18
bool
is_rational
() const noexcept {
return
lower
==
upper
; }
19
};
20
21
using
ExactRealAlgebraicResult
=
Result<ExactRealAlgebraic>
;
22
23
LMCAS_API
ExactRealAlgebraicResult
make_exact_real_algebraic
(
24
Polynomial<Rational>
polynomial,
25
std::size_t
root_index
,
26
std::size_t
multiplicity
,
27
ComputationContext
&
context
);
28
29
LMCAS_API
Result<void>
refine_exact_real_algebraic
(
30
ExactRealAlgebraic
&
value
,
31
ComputationContext
&
context
,
32
const
std::string&
operation
=
"exact_algebraic.refine"
);
33
34
LMCAS_API
Result<void>
refine_exact_real_algebraic_to_tolerance
(
35
ExactRealAlgebraic
&
value
,
36
double
absolute_tolerance
,
37
double
relative_tolerance
,
38
ComputationContext
&
context
,
39
const
std::string&
operation
=
"exact_algebraic.refine"
);
40
41
LMCAS_API
Result<bool>
equal_exact_real_algebraic
(
42
ExactRealAlgebraic
lhs,
43
ExactRealAlgebraic
rhs
,
44
ComputationContext
&
context
);
45
46
LMCAS_API
Result<int>
compare_exact_real_algebraic
(
47
ExactRealAlgebraic
lhs,
48
ExactRealAlgebraic
rhs
,
49
ComputationContext
&
context
);
50
51
}
// namespace LMCAS::detail
LMCAS::ComputationContext
定义
computation_context.hpp:99
LMCAS::Polynomial
一元多项式模板类
定义
polynomial.hpp:52
LMCAS::Result
定义
result.hpp:39
computation_context.hpp
LMCAS_API
#define LMCAS_API
定义
lmcas_export.hpp:13
LMCAS::detail
多元 Hensel 提升(单变量步)
定义
assumption_context.hpp:31
LMCAS::detail::refine_exact_real_algebraic_to_tolerance
Result< void > refine_exact_real_algebraic_to_tolerance(ExactRealAlgebraic &value, double absolute_tolerance, double relative_tolerance, ComputationContext &context, const std::string &operation)
定义
exact_algebraic_refinement.cpp:131
LMCAS::detail::absolute_tolerance
double absolute_tolerance
定义
exact_algebraic.hpp:36
LMCAS::detail::rhs
ExactRealAlgebraic rhs
定义
exact_algebraic.hpp:43
LMCAS::detail::compare_exact_real_algebraic
Result< int > compare_exact_real_algebraic(ExactRealAlgebraic lhs, ExactRealAlgebraic rhs, ComputationContext &context)
定义
exact_algebraic.cpp:206
LMCAS::detail::multiplicity
std::size_t std::size_t multiplicity
定义
exact_algebraic.hpp:26
LMCAS::detail::refine_exact_real_algebraic
Result< void > refine_exact_real_algebraic(ExactRealAlgebraic &value, ComputationContext &context, const std::string &operation)
定义
exact_algebraic.cpp:130
LMCAS::detail::operation
ComputationContext const std::string & operation
定义
exact_algebraic.hpp:32
LMCAS::detail::ExactRealAlgebraicResult
Result< ExactRealAlgebraic > ExactRealAlgebraicResult
定义
exact_algebraic.hpp:21
LMCAS::detail::make_exact_real_algebraic
ExactRealAlgebraicResult make_exact_real_algebraic(Polynomial< Rational > polynomial, std::size_t root_index, std::size_t multiplicity, ComputationContext &context)
定义
exact_algebraic.cpp:65
LMCAS::detail::context
std::size_t std::size_t ComputationContext & context
定义
exact_algebraic.hpp:27
LMCAS::detail::relative_tolerance
double double relative_tolerance
定义
exact_algebraic.hpp:37
LMCAS::detail::equal_exact_real_algebraic
Result< bool > equal_exact_real_algebraic(ExactRealAlgebraic lhs, ExactRealAlgebraic rhs, ComputationContext &context)
定义
exact_algebraic.cpp:166
LMCAS::detail::root_index
std::size_t root_index
定义
exact_algebraic.hpp:25
LMCAS::value
const std::string const ExprPtr & value
定义
expr.hpp:293
polynomial.hpp
一元多项式模板类 Polynomial<T>,支持四则运算,GCD,求导,求值.
result.hpp
LMCAS::detail::ExactRealAlgebraic
定义
exact_algebraic.hpp:11
LMCAS::detail::ExactRealAlgebraic::root_index
std::size_t root_index
定义
exact_algebraic.hpp:15
LMCAS::detail::ExactRealAlgebraic::polynomial
Polynomial< Rational > polynomial
定义
exact_algebraic.hpp:12
LMCAS::detail::ExactRealAlgebraic::multiplicity
std::size_t multiplicity
定义
exact_algebraic.hpp:16
LMCAS::detail::ExactRealAlgebraic::lower
Rational lower
定义
exact_algebraic.hpp:13
LMCAS::detail::ExactRealAlgebraic::is_rational
bool is_rational() const noexcept
定义
exact_algebraic.hpp:18
LMCAS::detail::ExactRealAlgebraic::upper
Rational upper
定义
exact_algebraic.hpp:14
src
internal
exact_algebraic.hpp
生成于
, 为 LMCAS使用
1.18.0