18template<
typename ValueType>
32 bool contains(std::vector<ValueType>
const& point)
const {
42 ValueType
distance(std::vector<ValueType>
const& point)
const {
76 std::string
toString(
bool numbersAsDouble =
false)
const {
77 std::stringstream stream;
83 std::stringstream numberStream;
84 if (numbersAsDouble) {
85 numberStream << storm::utility::convertNumber<double>(*it);
89 stream << std::setw(10) << numberStream.str();
91 stream <<
") * x <= ";
92 if (numbersAsDouble) {
93 stream << storm::utility::convertNumber<double>(
offset());
101 std::vector<storm::expressions::Variable>
const& variables) {
105 for (uint64_t dim = 1; dim <
normalVector().size(); ++dim) {
106 lhs = lhs + manager.rational(
normalVector()[dim]) * variables[dim].getExpression();
108 return lhs <= manager.rational(
offset());
112 return mNormalVector;
116 return mNormalVector;
128 std::vector<ValueType> mNormalVector;
This class is responsible for managing a set of typed variables and all expressions using these varia...
ValueType euclideanDistance(std::vector< ValueType > const &point) const
bool contains(std::vector< ValueType > const &point) const
Halfspace< ValueType > invert() const
std::vector< GeometryValueType > const & normalVector() const
Halfspace(std::vector< ValueType > const &normalVector, ValueType const &offset)
ValueType distance(std::vector< ValueType > const &point) const
std::string toString(bool numbersAsDouble=false) const
bool isPointOnBoundary(std::vector< ValueType > const &point) const
Halfspace(std::vector< ValueType > &&normalVector, ValueType &&offset)
storm::expressions::Expression toExpression(storm::expressions::ExpressionManager const &manager, std::vector< storm::expressions::Variable > const &variables)
std::vector< ValueType > & normalVector()
GeometryValueType const & offset() const
#define STORM_LOG_ASSERT(cond, message)
T dotProduct(std::vector< T > const &firstOperand, std::vector< T > const &secondOperand)
Computes the dot product (aka scalar product) and returns the result.
void scaleVectorInPlace(std::vector< ValueType1 > &target, ValueType2 const &factor)
Multiplies each element of the given vector with the given factor and writes the result into the vect...
ValueType sqrt(ValueType const &number)