carl
24.04
Computer ARithmetic Library
IntervalCoefficientExample.cpp
Go to the documentation of this file.
1
2
3
#include <
carl-arith/core/VariablePool.h
>
4
#include <
carl-arith/poly/umvpoly/Term.h
>
5
#include <
carl-arith/poly/umvpoly/MultivariatePolynomial.h
>
6
#include <
carl-arith/interval/Interval.h
>
7
8
#ifdef USE_CLN_NUMBERS
9
#include <cln/cln.h>
10
typedef
cln::cl_RA
Rational
;
11
typedef
cln::cl_I
Integer
;
12
#else
13
#include <gmpxx.h>
14
typedef
mpq_class
Rational
;
15
typedef
mpz_class
Integer
;
16
#endif
17
18
using namespace
carl
;
19
20
int
main
(
int
argc,
char
** argv) {
21
22
Variable
a =
fresh_real_variable
(
"a"
);
23
Variable
b =
fresh_real_variable
(
"b"
);
24
Variable
c =
fresh_real_variable
(
"c"
);
25
Variable
d =
fresh_real_variable
(
"d"
);
26
27
// MultivariatePolynomial<Rational> e6({(Term<Rational>)1,(Rational)3*b, (Rational)1*createMonomial(c,2),(Rational)-1*createMonomial(d,3)});
28
// MultivariatePolynomial<Interval<double>> e6({(Term<Interval<double>>)(Interval<double>)1,(Interval<double>)3*b, (Interval<double>)1*createMonomial(c,2),(Interval<double>)-1*createMonomial(d,3)});
29
// MultivariatePolynomial<Interval<double>> e7({(Interval<double>)1});
30
}
VariablePool.h
Interval.h
MultivariatePolynomial.h
Term.h
main
int main(int argc, char **argv)
Definition:
IntervalCoefficientExample.cpp:20
Rational
mpq_class Rational
Definition:
IntervalCoefficientExample.cpp:14
Integer
mpz_class Integer
Definition:
IntervalCoefficientExample.cpp:15
carl
carl is the main namespace for the library.
carl::fresh_real_variable
Variable fresh_real_variable() noexcept
Definition:
VariablePool.h:198
carl::Variable
A Variable represents an algebraic variable that can be used throughout carl.
Definition:
Variable.h:85
examples
IntervalCoefficientExample.cpp
Generated by
1.9.1