15class InequalitySolver;
27 std::shared_ptr<SymbolicExpr> value{};
29 bool is_neg_infinity =
false;
30 bool is_pos_infinity =
false;
36 static Endpoint neg_inf();
42 static Endpoint pos_inf();
49 static Endpoint closed(std::shared_ptr<SymbolicExpr> val);
56 static Endpoint open(std::shared_ptr<SymbolicExpr> val);
75 bool is_empty()
const;
81 bool is_entire_line()
const;
87 static Interval empty();
93 static Interval entire_line();
100 static Interval
point(std::shared_ptr<SymbolicExpr> val);
112 explicit IntervalUnion(std::vector<Interval> intervals);
119 static IntervalUnion from_single(
const Interval& iv);
122 static Result<IntervalUnion> from_intervals_checked(
123 std::vector<Interval> intervals,
124 ComputationContext& context);
127 static Result<IntervalUnion> from_intervals_checked(
128 std::vector<Interval> intervals);
134 static IntervalUnion empty();
140 static IntervalUnion entire_line();
147 IntervalUnion intersect(
const IntervalUnion& other)
const;
155 Result<IntervalUnion> intersect_checked(
156 const IntervalUnion& other,
157 ComputationContext& context)
const;
159 Result<IntervalUnion> intersect_checked(
const IntervalUnion& other)
const;
166 IntervalUnion unite(
const IntervalUnion& other)
const;
174 Result<IntervalUnion> unite_checked(
175 const IntervalUnion& other,
176 ComputationContext& context)
const;
178 Result<IntervalUnion> unite_checked(
const IntervalUnion& other)
const;
184 IntervalUnion complement()
const;
191 Result<IntervalUnion> complement_checked(ComputationContext& context)
const;
193 Result<IntervalUnion> complement_checked()
const;
206 bool is_empty()
const;
212 bool is_entire_line()
const;
218 const std::vector<Interval>& intervals()
const;
224 std::string to_string()
const;
231 static std::optional<IntervalUnion> parse(
const std::string& str);
238 std::shared_ptr<SymbolicExpr> to_expr(
const std::string& var)
const;
241 friend class InequalitySolver;
243 std::vector<Interval> intervals_;
245 static IntervalUnion from_checked_normalized(std::vector<Interval> intervals);
273 std::vector<Interval> intervals,
277 std::vector<Interval> intervals);
ExpressionResult normalize(const Node &value, ComputationContext &context)
const std::string const LimitExprPtr & point
__attribute__((visibility("default"))) ExprResult function(const std __attribute__((visibility("default"))) ExprResult finite_set(std ExprPtr upper
const std::vector< Polynomial< BigInt > > const BigInt ComputationContext & context
ExprResult interval(ExprPtr lower, ExprPtr upper, bool lower_closed, bool upper_closed)
Result< bool > interval_is_empty_checked(const Interval &interval, ComputationContext &context)
Result< std::vector< Interval > > normalize_intervals_checked(std::vector< Interval > intervals, ComputationContext &context)
bool contains(const SymbolicExpr &expression, const std::string &variable)
Result< bool > interval_contains_checked(const Interval &interval, double value, ComputationContext &context)
const std::string const ExprPtr & value
符号表达式主类 SymbolicExpr 及其工厂方法,运算接口.