Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
UnaryNumericalFunctionExpression.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_EXPRESSIONS_UNARYNUMERICALFUNCTIONEXPRESSION_H_
2#define STORM_STORAGE_EXPRESSIONS_UNARYNUMERICALFUNCTIONEXPRESSION_H_
3
6
7namespace storm {
8namespace expressions {
10 public:
14 enum class OperatorType { Minus, Floor, Ceil, Cos, Sin };
15
24 UnaryNumericalFunctionExpression(ExpressionManager const& manager, Type const& type, std::shared_ptr<BaseExpression const> const& operand,
25 OperatorType operatorType);
26
27 // Instantiate constructors and assignments with their default implementations.
32
34
35 // Override base class methods.
36 virtual storm::expressions::OperatorType getOperator() const override;
37 virtual int_fast64_t evaluateAsInt(Valuation const* valuation = nullptr) const override;
38 virtual double evaluateAsDouble(Valuation const* valuation = nullptr) const override;
39 virtual std::shared_ptr<BaseExpression const> simplify() const override;
40 virtual boost::any accept(ExpressionVisitor& visitor, boost::any const& data) const override;
41 virtual bool isUnaryNumericalFunctionExpression() const override;
42
49
50 protected:
51 // Override base class method.
52 virtual void printToStream(std::ostream& stream) const override;
53
54 private:
55 // The operator of this expression.
56 OperatorType operatorType;
57};
58} // namespace expressions
59} // namespace storm
60
61#endif /* STORM_STORAGE_EXPRESSIONS_UNARYNUMERICALFUNCTIONEXPRESSION_H_ */
This class is responsible for managing a set of typed variables and all expressions using these varia...
UnaryNumericalFunctionExpression & operator=(UnaryNumericalFunctionExpression const &other)=delete
UnaryNumericalFunctionExpression & operator=(UnaryNumericalFunctionExpression &&)=delete
OperatorType
An enum type specifying the different functions applicable.
virtual int_fast64_t evaluateAsInt(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
virtual void printToStream(std::ostream &stream) const override
Prints the expression to the given stream.
OperatorType getOperatorType() const
Retrieves the operator associated with this expression.
virtual storm::expressions::OperatorType getOperator() const override
Retrieves the operator of a function application.
virtual std::shared_ptr< BaseExpression const > simplify() const override
Simplifies the expression according to some simple rules.
virtual boost::any accept(ExpressionVisitor &visitor, boost::any const &data) const override
Accepts the given visitor by calling its visit method.
UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression &&)=default
UnaryNumericalFunctionExpression(UnaryNumericalFunctionExpression const &other)=default
virtual double evaluateAsDouble(Valuation const *valuation=nullptr) const override
Evaluates the expression under the valuation of unknowns (variables and constants) given by the valua...
The base class of all valuations of variables.
Definition Valuation.h:16
LabParser.cpp.
Definition cli.cpp:18