19 inline dim::dim(ap_dim_t d) : d(d)
22 inline dim::dim(
const environment& e,
const var& v)
24 ap_dim_t d = ap_environment_dim_of_var(const_cast<ap_environment_t*>(e.get_ap_environment_t()),
27 throw std::invalid_argument(
"apron::dim::dim(const environment&, const var&) invalid variable name");
34 return ap_texpr_is_unop(op);
39 return ap_texpr_is_binop(op);
57 {
init_from(ap_texpr0_copy(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()))); }
60 {
init_from(ap_texpr0_copy(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()))); }
63 {
init_from(ap_texpr0_copy(const_cast<ap_texpr0_t*>(&x.l))); }
69 {
init_from(ap_texpr0_from_linexpr0(const_cast<ap_linexpr0_t*>(
l.get_ap_linexpr0_t()))); }
77 init_from(ap_texpr0_add_dimensions(const_cast<ap_texpr0_t*>(&x.l),
78 const_cast<ap_dimchange_t*>(d.get_ap_dimchange_t())));
80 init_from(ap_texpr0_remove_dimensions(const_cast<ap_texpr0_t*>(&x.l),
81 const_cast<ap_dimchange_t*>(d.get_ap_dimchange_t())));
86 init_from(ap_texpr0_permute_dimensions(const_cast<ap_texpr0_t*>(&x.l),
87 const_cast<ap_dimperm_t*>(d.get_ap_dimperm_t())));
92 init_from(ap_texpr0_substitute(const_cast<ap_texpr0_t*>(&x.l),
93 dim, const_cast<ap_texpr0_t*>(&dst.l)));
117 ap_texpr0_t* c = ap_texpr0_copy(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()));
126 ap_texpr0_t* c = ap_texpr0_copy(const_cast<ap_texpr0_t*>(&x.l));
135 ap_texpr0_t* c = ap_texpr0_copy(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()));
144 init_from(ap_texpr0_from_linexpr0(const_cast<ap_linexpr0_t*>(x.get_ap_linexpr0_t())));
154 return os << s.root();
157 inline void texpr0::print(
char** name_of_dim, FILE* stream)
const 232 ap_texpr0_substitute_with(&
l,dim,const_cast<ap_texpr0_t*>(&dst.l));
236 inline interval texpr0::eval(manager& m,
const abstract0& a, ap_scalar_discr_t discr,
240 if (!pexact) pexact = &b;
242 ap_eval_texpr0(m.get_ap_manager_t(),
243 const_cast<ap_abstract0_t*>(a.get_ap_abstract0_t()),
244 const_cast<ap_texpr0_t*>(
l),
248 inline linexpr0 texpr0::intlinearize(manager& m,
const abstract0& a, ap_scalar_discr_t discr,
249 bool quasilinearize,
bool* pexact)
const 252 if (!pexact) pexact = &b;
254 ap_intlinearize_texpr0(m.get_ap_manager_t(),
255 const_cast<ap_abstract0_t*>(a.get_ap_abstract0_t()),
256 const_cast<ap_texpr0_t*>(
l),
257 pexact, discr, quasilinearize);
263 return ap_texpr0_hash(const_cast<ap_texpr0_t*>(&
l));
274 ap_texpr0_add_dimensions_with(&
l, const_cast<ap_dimchange_t*>(d.get_ap_dimchange_t()));
280 ap_texpr0_remove_dimensions_with(&
l, const_cast<ap_dimchange_t*>(d.get_ap_dimchange_t()));
285 ap_texpr0_permute_dimensions_with(&
l, const_cast<ap_dimperm_t*>(d.get_ap_dimperm_t()));
317 return const_iterator(const_cast<ap_texpr0_t*>(&
l));
324 inline texpr0::const_iterator::const_iterator(
const texpr0& e)
325 : l(const_cast<ap_texpr0_t*>(e.get_ap_texpr0_t()))
328 inline texpr0::const_iterator::const_iterator(
const const_iterator& i) : l(i.l)
335 inline ap_texpr_discr_t texpr0::const_iterator::get_discr()
const 340 inline const coeff& texpr0::const_iterator::get_coeff()
const 342 if (l->discr!=AP_TEXPR_CST)
throw(bad_discriminant(
"apron::texpr0::const_iterator::get_coeff()"));
343 return reinterpret_cast<coeff&>(l->val.cst);
346 inline ap_dim_t texpr0::const_iterator::get_dim()
const 348 if (l->discr!=AP_TEXPR_DIM)
throw(bad_discriminant(
"apron::texpr0::const_iterator::get_dim()"));
352 inline ap_texpr_op_t texpr0::const_iterator::get_op()
const 354 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::get_op()"));
355 return l->val.node->op;
358 inline ap_texpr_rtype_t texpr0::const_iterator::get_rtype()
const 360 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::get_type()"));
361 return l->val.node->type;
364 inline ap_texpr_rdir_t texpr0::const_iterator::get_rdir()
const 366 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::get_dir()"));
367 return l->val.node->dir;
374 inline texpr0::const_iterator& texpr0::const_iterator::operator=(
const const_iterator& i)
380 inline texpr0::const_iterator texpr0::const_iterator::child()
const 382 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::child()"));
383 if (!l->val.node->exprA)
throw(std::out_of_range(
"apron::texpr0::const_iterator::child()"));
384 return l->val.node->exprA;
387 inline texpr0::const_iterator texpr0::const_iterator::left()
const 389 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::left()"));
390 if (!l->val.node->exprA)
throw(std::out_of_range(
"apron::texpr0::const_iterator::left()"));
391 return l->val.node->exprA;
394 inline texpr0::const_iterator texpr0::const_iterator::right()
const 396 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::const_iterator::right()"));
397 if (!l->val.node->exprB)
throw(std::out_of_range(
"apron::texpr0::const_iterator::right()"));
398 return l->val.node->exprB;
406 std::vector<std::string>* names);
408 inline std::ostream&
operator<< (std::ostream& os,
const texpr0::const_iterator& s)
414 inline void texpr0::const_iterator::print(
char** name_of_dim, FILE* stream)
const 416 ap_texpr0_fprint(stream, const_cast<ap_texpr0_t*>(l), name_of_dim);
423 inline bool texpr0::const_iterator::is_zero()
const 425 return l->discr==AP_TEXPR_CST && ap_coeff_zero(&const_cast<ap_texpr0_t*>(l)->val.cst);
430 return ap_texpr0_equal(const_cast<ap_texpr0_t*>(l),
431 const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()));
434 inline size_t texpr0::const_iterator::depth()
const 436 return ap_texpr0_depth(const_cast<ap_texpr0_t*>(l));
439 inline size_t texpr0::const_iterator::size()
const 441 return ap_texpr0_size(const_cast<ap_texpr0_t*>(l));
444 inline ap_dim_t texpr0::const_iterator::max_dim()
const 446 return ap_texpr0_max_dim(const_cast<ap_texpr0_t*>(l));
449 inline bool texpr0::const_iterator::has_dim(ap_dim_t d)
const 451 return ap_texpr0_has_dim(const_cast<ap_texpr0_t*>(l), d);
454 inline std::vector<ap_dim_t> texpr0::const_iterator::dimlist()
const 456 ap_dim_t* d = ap_texpr0_dimlist(const_cast<ap_texpr0_t*>(l));
458 for (i=0; d[i]!=AP_DIM_MAX; i++) ;
459 std::vector<ap_dim_t> r = std::vector<ap_dim_t>(i,0);
460 for (i=0; d[i]!=AP_DIM_MAX; i++) r[i] = d[i];
465 inline bool texpr0::const_iterator::is_interval_cst()
const 467 return ap_texpr0_is_interval_cst(const_cast<ap_texpr0_t*>(l));
470 inline bool texpr0::const_iterator::is_interval_linear()
const 472 return ap_texpr0_is_interval_linear(const_cast<ap_texpr0_t*>(l));
475 inline bool texpr0::const_iterator::is_interval_polynomial()
const 477 return ap_texpr0_is_interval_polynomial(const_cast<ap_texpr0_t*>(l));
480 inline bool texpr0::const_iterator::is_interval_polyfrac()
const 482 return ap_texpr0_is_interval_polyfrac(const_cast<ap_texpr0_t*>(l));
485 inline bool texpr0::const_iterator::is_scalar()
const 487 return ap_texpr0_is_scalar(const_cast<ap_texpr0_t*>(l));
494 inline ap_texpr0_t* texpr0::const_iterator::get_ap_texpr0_t()
499 inline const ap_texpr0_t* texpr0::const_iterator::get_ap_texpr0_t()
const 508 inline texpr0::iterator texpr0::root()
510 return iterator(*
this);
513 inline texpr0::iterator::iterator(ap_texpr0_t* l)
514 : texpr0::const_iterator(l)
518 inline texpr0::iterator::iterator(texpr0& e)
519 : texpr0::const_iterator(e.get_ap_texpr0_t())
522 inline texpr0::iterator::iterator(
const iterator& i)
523 : texpr0::const_iterator(i)
531 inline texpr0::iterator& texpr0::iterator::operator= (
const builder& c)
533 ap_texpr0_t* cc = ap_texpr0_copy(const_cast<ap_texpr0_t*>(c.get_ap_texpr0_t()));
544 inline coeff& texpr0::iterator::get_coeff()
const 546 if (l->discr!=AP_TEXPR_CST)
throw(bad_discriminant(
"apron::texpr0::iterator::get_coeff()"));
547 return reinterpret_cast<coeff&>(l->val.cst);
550 inline ap_dim_t& texpr0::iterator::get_dim()
const 552 if (l->discr!=AP_TEXPR_DIM)
throw(bad_discriminant(
"apron::texpr0::iterator::get_dim()"));
556 inline ap_texpr_op_t& texpr0::iterator::get_op()
const 558 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::get_op()"));
559 return l->val.node->op;
562 inline ap_texpr_rtype_t& texpr0::iterator::get_rtype()
const 564 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::get_type()"));
565 return l->val.node->type;
568 inline ap_texpr_rdir_t& texpr0::iterator::get_rdir()
const 570 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::get_dir()"));
571 return l->val.node->dir;
578 inline texpr0::iterator& texpr0::iterator::operator=(
const iterator& i)
584 inline texpr0::iterator texpr0::iterator::child()
const 586 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::child()"));
587 if (!l->val.node->exprA)
throw(std::out_of_range(
"apron::texpr0::iterator::child()"));
588 return l->val.node->exprA;
591 inline texpr0::iterator texpr0::iterator::left()
const 593 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::left()"));
594 if (!l->val.node->exprA)
throw(std::out_of_range(
"apron::texpr0::iterator::left()"));
595 return l->val.node->exprA;
598 inline texpr0::iterator texpr0::iterator::right()
const 600 if (l->discr!=AP_TEXPR_NODE)
throw(bad_discriminant(
"apron::texpr0::iterator::right()"));
601 if (!l->val.node->exprB)
throw(std::out_of_range(
"apron::texpr0::iterator::right()"));
602 return l->val.node->exprB;
609 inline ap_texpr0_t* texpr0::iterator::get_ap_texpr0_t()
614 inline const ap_texpr0_t* texpr0::iterator::get_ap_texpr0_t()
const 626 inline void texpr0::builder::init_from(ap_texpr0_t* x)
629 case AP_TEXPR_DIM: l = ap_texpr0_dim(x->val.dim);
break;
630 case AP_TEXPR_CST: l = ap_texpr0_cst(const_cast<ap_coeff_t*>(&x->val.cst));
break;
632 l = ap_texpr0_node(x->val.node->op,
633 x->val.node->type, x->val.node->dir,
634 x->val.node->exprA, x->val.node->exprB);
636 default:
throw std::invalid_argument(
"apron::texpr0::builder::init_from(ap_texpr0_t*) invalid discriminant");
640 inline texpr0::builder::builder(ap_texpr0_t* x)
645 inline texpr0::builder::builder(
const builder& x)
650 inline texpr0::builder::builder(
const const_iterator& x)
652 init_from(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()));
655 inline texpr0::builder::builder(
const texpr0& x)
657 init_from(const_cast<ap_texpr0_t*>(x.get_ap_texpr0_t()));
660 inline texpr0::builder::builder(
const coeff& x)
661 : l(ap_texpr0_cst(const_cast<ap_coeff_t*>(x.get_ap_coeff_t())))
664 inline texpr0::builder::builder(
const scalar& x)
665 : l(ap_texpr0_cst_scalar(const_cast<ap_scalar_t*>(x.get_ap_scalar_t())))
668 inline texpr0::builder::builder(
const mpq_class& x)
669 : l(ap_texpr0_cst_scalar_mpq(const_cast<mpq_class&>(x).get_mpq_t()))
672 inline texpr0::builder::builder(mpfr_t x)
673 : l(ap_texpr0_cst_scalar_mpfr(x))
676 inline texpr0::builder::builder(
int x)
677 : l(ap_texpr0_cst_scalar_int(x))
680 inline texpr0::builder::builder(
long x)
681 : l(ap_texpr0_cst_scalar_int(x))
684 inline texpr0::builder::builder(
double x)
685 : l(ap_texpr0_cst_scalar_double(x))
688 inline texpr0::builder::builder(
const frac& x)
689 : l(ap_texpr0_cst_scalar_frac(x.num, x.den))
692 inline texpr0::builder::builder(
const interval& x)
693 : l(ap_texpr0_cst_interval(const_cast<ap_interval_t*>(x.get_ap_interval_t())))
696 inline texpr0::builder::builder(
const scalar& inf,
const scalar& sup)
697 : l(ap_texpr0_cst_interval_scalar(const_cast<ap_scalar_t*>(inf.get_ap_scalar_t()),
698 const_cast<ap_scalar_t*>(sup.get_ap_scalar_t())))
701 inline texpr0::builder::builder(
const mpq_class& inf,
const mpq_class& sup)
702 : l(ap_texpr0_cst_interval_mpq(const_cast<mpq_class&>(inf).get_mpq_t(),
703 const_cast<mpq_class&>(sup).get_mpq_t()))
706 inline texpr0::builder::builder(mpfr_t inf, mpfr_t sup)
707 : l(ap_texpr0_cst_interval_mpfr(inf,sup))
710 inline texpr0::builder::builder(
int inf,
int sup)
711 : l(ap_texpr0_cst_interval_int(inf, sup))
714 inline texpr0::builder::builder(
long inf,
long sup)
715 : l(ap_texpr0_cst_interval_int(inf, sup))
718 inline texpr0::builder::builder(
double inf,
double sup)
719 : l(ap_texpr0_cst_interval_double(inf, sup))
722 inline texpr0::builder::builder(
const frac& inf,
const frac& sup)
723 : l(ap_texpr0_cst_interval_frac(inf.num, inf.den, sup.num, sup.den))
726 inline texpr0::builder::builder(top t)
727 : l(ap_texpr0_cst_interval_top())
730 inline texpr0::builder::builder(dim d)
731 : l(ap_texpr0_dim(d.d))
734 inline texpr0::builder::builder(ap_texpr_op_t op,
const builder& argA, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir)
736 if (!ap_texpr_is_unop(op))
737 throw std::invalid_argument(
"apron::texpr0::builder::builder(ap_texpr_op_t, const builder&, ap_texpr_rtype_t, ap_texpr_rdir_t) not a unary operator");
738 l = ap_texpr0_unop(op,
739 const_cast<ap_texpr0_t*>(argA.l),
743 inline texpr0::builder::builder(ap_texpr_op_t op,
const builder& argA,
const builder& argB, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir)
745 if (!ap_texpr_is_binop(op))
746 throw std::invalid_argument(
"apron::texpr0::builder::builder(ap_texpr_op_t, const builder&, const builder&, ap_texpr_rtype_t, ap_texpr_rdir_t) not a binary operator");
747 l = ap_texpr0_binop(op,
748 const_cast<ap_texpr0_t*>(argA.l),
749 const_cast<ap_texpr0_t*>(argB.l),
756 inline texpr0::builder
unary(ap_texpr_op_t op,
const texpr0::builder& a,
757 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
758 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
760 return texpr0::builder(op, a, rtype, rdir);
763 inline texpr0::builder
binary(ap_texpr_op_t op,
const texpr0::builder& a,
const texpr0::builder& b,
764 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
765 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
767 return texpr0::builder(op, a, b, rtype, rdir);
771 inline texpr0::builder
add(
const texpr0::builder& a,
const texpr0::builder& b,
772 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
773 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
775 return texpr0::builder(AP_TEXPR_ADD, a, b, rtype, rdir);
778 inline texpr0::builder
sub(
const texpr0::builder& a,
const texpr0::builder& b,
779 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
780 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
782 return texpr0::builder(AP_TEXPR_SUB, a, b, rtype, rdir);
785 inline texpr0::builder
mul(
const texpr0::builder& a,
const texpr0::builder& b,
786 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
787 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
789 return texpr0::builder(AP_TEXPR_MUL, a, b, rtype, rdir);
792 inline texpr0::builder
div(
const texpr0::builder& a,
const texpr0::builder& b,
793 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
794 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
796 return texpr0::builder(AP_TEXPR_DIV, a, b, rtype, rdir);
799 inline texpr0::builder
mod(
const texpr0::builder& a,
const texpr0::builder& b,
800 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
801 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
803 return texpr0::builder(AP_TEXPR_MOD, a, b, rtype, rdir);
806 inline texpr0::builder
pow(
const texpr0::builder& a,
const texpr0::builder& b,
807 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
808 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
810 return texpr0::builder(AP_TEXPR_POW, a, b, rtype, rdir);
813 inline texpr0::builder
neg(
const texpr0::builder& a,
814 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
815 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
817 return texpr0::builder(AP_TEXPR_NEG, a, rtype, rdir);
820 inline texpr0::builder
cast(
const texpr0::builder& a, ap_texpr_rtype_t rtype,
821 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
823 return texpr0::builder(AP_TEXPR_CAST, a, rtype, rdir);
826 inline texpr0::builder
floor(
const texpr0::builder& a)
828 return texpr0::builder(AP_TEXPR_CAST, a, AP_RTYPE_INT, AP_RDIR_DOWN);
831 inline texpr0::builder
ceil(
const texpr0::builder& a)
833 return texpr0::builder(AP_TEXPR_CAST, a, AP_RTYPE_INT, AP_RDIR_UP);
836 inline texpr0::builder
trunc(
const texpr0::builder& a)
838 return texpr0::builder(AP_TEXPR_CAST, a, AP_RTYPE_INT, AP_RDIR_ZERO);
841 inline texpr0::builder
sqrt(
const texpr0::builder& a,
842 ap_texpr_rtype_t rtype = AP_RTYPE_REAL,
843 ap_texpr_rdir_t rdir = AP_RDIR_NEAREST)
845 return texpr0::builder(AP_TEXPR_SQRT, a, rtype, rdir);
848 inline texpr0::builder
operator+(
const texpr0::builder& a)
853 inline texpr0::builder
operator-(
const texpr0::builder& a)
858 inline texpr0::builder
operator+(
const texpr0::builder& a,
const texpr0::builder& b)
863 inline texpr0::builder
operator-(
const texpr0::builder& a,
const texpr0::builder& b)
868 inline texpr0::builder
operator*(
const texpr0::builder& a,
const texpr0::builder& b)
873 inline texpr0::builder
operator/(
const texpr0::builder& a,
const texpr0::builder& b)
878 inline texpr0::builder
operator%(
const texpr0::builder& a,
const texpr0::builder& b)
883 inline texpr0::builder
operator^(
const texpr0::builder& a,
const texpr0::builder& b)
892 inline texpr0::builder::~builder()
895 case AP_TEXPR_CST: ap_coeff_clear(&l->val.cst);
break;
896 case AP_TEXPR_DIM:
break;
897 case AP_TEXPR_NODE: free(l->val.node);
break;
898 default: assert(
false);
903 inline bool texpr0::builder::is_zero()
const 905 return l->discr==AP_TEXPR_CST && ap_coeff_zero(&const_cast<ap_texpr0_t*>(l)->val.cst);
912 inline ap_texpr0_t* texpr0::builder::get_ap_texpr0_t()
917 inline const ap_texpr0_t* texpr0::builder::get_ap_texpr0_t()
const void remove_dimensions(const dimchange &d)
Removes some dimensions, shifting dimension if needed.
Definition: apxx_texpr0.hh:279
size_t depth() const
Returns the depth of the expression tree (counting only operator nodes).
Definition: apxx_texpr0.hh:435
ap_texpr0_t l
Structure managed by APRON.
Definition: apxx_texpr0.hh:96
void permute_dimensions(const dimperm &d)
Permutes dimensions.
Definition: apxx_texpr0.hh:284
bool is_binop(ap_texpr_op_t op)
Whether the operator is binary.
Definition: apxx_texpr0.hh:38
texpr0::builder operator^(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0_inline.hh:883
bool has_dim(ap_dim_t d) const
Whether the given dimension occurs in the expression.
Definition: apxx_texpr0.hh:450
bool is_interval_linear() const
Whether the expression is linear and there is no rounding.
Definition: apxx_texpr0.hh:207
size_t depth() const
Returns the depth of the expression tree (counting only operator nodes).
Definition: apxx_texpr0.hh:177
texpr0::builder sqrt(const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:841
bool has_dim(ap_dim_t d) const
Whether the given dimension occurs in the expression.
Definition: apxx_texpr0.hh:192
texpr0::builder unary(ap_texpr_op_t op, const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:756
std::vector< ap_dim_t > dimlist() const
Returns a list of all dimensions occurring in the expression (in strict increasing order)
Definition: apxx_texpr0.hh:197
texpr0::builder mul(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:785
ap_dim_t max_dim() const
Returns the maximal dimension occurring in the expression (or 0 if there is no variable).
Definition: apxx_texpr0.hh:187
texpr0::builder add(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:772
texpr0::builder cast(const texpr0::builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:820
texpr0::builder trunc(const texpr0::builder &a)
Definition: apxx_texpr0_inline.hh:836
bool is_zero() const
Whether the expression is a single coefficient node with 0 value.
Definition: apxx_texpr0.hh:424
std::vector< std::string > * get_varname(std::basic_ostream< charT, Traits > &os)
Definition: apxx_dimension_inline.hh:43
~texpr0()
Frees the memory occupied by the expression (and, recursively, all sub-expressions).
Definition: apxx_texpr0.hh:103
void print(char **name_of_dim=NULL, FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_texpr0.hh:158
friend std::ostream & operator<<(std::ostream &os, const texpr0 &s)
Printing.
Definition: apxx_texpr0.hh:153
texpr0::builder add(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:771
dim(ap_dim_t d)
Standard constructor.
Definition: apxx_texpr0.hh:20
bool is_unop(ap_texpr_op_t op)
Whether the operator is unary.
Definition: apxx_texpr0.hh:33
void init_from(ap_texpr0_t *x)
Internal use only. Shallow copy.
Definition: apxx_texpr0.hh:48
texpr0::builder operator-(const texpr0::builder &a)
Definition: apxx_texpr0_inline.hh:853
texpr0::builder operator/(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0_inline.hh:873
bool is_interval_linear() const
Whether the expression is linear and there is no rounding.
Definition: apxx_texpr0.hh:471
bool is_zero() const
Whether the expression is a single coefficient node with 0 value.
Definition: apxx_texpr0.hh:167
bool is_interval_polyfrac() const
Whether the expression is a polynomial fraction and there is no rounding.
Definition: apxx_texpr0.hh:217
void apxx_texpr0_ostream(std::ostream &os, ap_texpr0_t *a, std::vector< std::string > *names)
bool equal(const linexpr0 &x, const linexpr0 &y)
Definition: apxx_linexpr0_inline.hh:293
const_iterator(ap_texpr0_t *l)
Internal use only.
Definition: apxx_texpr0.hh:321
bool equal(const texpr0 &x) const
Whether two expressions are syntactically, structurally equal.
Definition: apxx_texpr0.hh:172
long hash() const
Returns a hash code.
Definition: apxx_texpr0.hh:262
texpr0(ap_texpr0_t *x)
Internal use only. Shallow copy.
Definition: apxx_texpr0.hh:54
bool is_interval_polyfrac() const
Whether the expression is a polynomial fraction and there is no rounding.
Definition: apxx_texpr0.hh:481
texpr0::builder operator%(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0_inline.hh:878
texpr0::builder mod(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:799
texpr0::builder sub(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:778
void substitute(ap_dim_t dim, const texpr0 &dst)
Substitutes each occurrence of dim with (a fresh copy of) dst.
Definition: apxx_texpr0.hh:231
texpr0::builder operator+(const texpr0::builder &a)
Definition: apxx_texpr0_inline.hh:848
texpr0::builder pow(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:806
ap_texpr0_t * get_ap_texpr0_t()
Returns a pointer to the internal APRON object stored in *this.
Definition: apxx_texpr0.hh:294
texpr0::builder div(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:792
bool is_interval_cst() const
Whether the expression is constant (i.e., has no dimension leaves).
Definition: apxx_texpr0.hh:466
bool is_interval_cst() const
Whether the expression is constant (i.e., has no dimension leaves).
Definition: apxx_texpr0.hh:202
ap_dim_t max_dim() const
Returns the maximal dimension occurring in the expression (or 0 if there is no variable).
Definition: apxx_texpr0.hh:445
bool is_interval_polynomial() const
Whether the expression is polynomial and there is no rounding.
Definition: apxx_texpr0.hh:476
size_t size() const
Returns the number of operator nodes in the expression tree.
Definition: apxx_texpr0.hh:440
size_t size() const
Returns the number of operator nodes in the expression tree.
Definition: apxx_texpr0.hh:182
bool is_scalar() const
Whether all occurring constants are scalar.
Definition: apxx_texpr0.hh:222
texpr0 & operator=(const texpr0 &x)
Makes a (deep) copy of the expression.
Definition: apxx_texpr0.hh:124
texpr0::builder binary(ap_texpr_op_t op, const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:763
bool is_scalar() const
Whether all occurring constants are scalar.
Definition: apxx_texpr0.hh:486
texpr0::builder neg(const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0_inline.hh:813
std::ostream & operator<<(std::ostream &os, const texpr0 &s)
Definition: apxx_texpr0_inline.hh:152
texpr0::builder ceil(const texpr0::builder &a)
Definition: apxx_texpr0_inline.hh:831
texpr0::builder operator *(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0_inline.hh:868
const_iterator root() const
Returns a new iterator at the root of a constant expression tree.
Definition: apxx_texpr0.hh:316
void add_dimensions(const dimchange &d)
Adds some dimensions, shifting dimension if needed.
Definition: apxx_texpr0.hh:273
texpr0::builder floor(const texpr0::builder &a)
Definition: apxx_texpr0_inline.hh:826
bool equal(const texpr0 &x) const
Whether two expressions are syntactically, structurally equal.
Definition: apxx_texpr0.hh:429
std::vector< ap_dim_t > dimlist() const
Returns a list of all dimensions occurring in the expression (in strict increasing order)
Definition: apxx_texpr0.hh:455
bool is_interval_polynomial() const
Whether the expression is polynomial and there is no rounding.
Definition: apxx_texpr0.hh:212
void print(char **name_of_dim=NULL, FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_texpr0.hh:415