1#ifndef STORM_STORAGE_GEOMETRY_HALFSPACE_H_
2#define STORM_STORAGE_GEOMETRY_HALFSPACE_H_
19template<
typename ValueType>
33 bool contains(std::vector<ValueType>
const& point)
const {
43 ValueType
distance(std::vector<ValueType>
const& point)
const {
77 std::string
toString(
bool numbersAsDouble =
false)
const {
78 std::stringstream stream;
84 std::stringstream numberStream;
85 if (numbersAsDouble) {
86 numberStream << storm::utility::convertNumber<double>(*it);
90 stream << std::setw(10) << numberStream.str();
92 stream <<
") * x <= ";
93 if (numbersAsDouble) {
94 stream << storm::utility::convertNumber<double>(
offset());
102 std::vector<storm::expressions::Variable>
const& variables) {
106 for (uint64_t dim = 1; dim <
normalVector().size(); ++dim) {
107 lhs = lhs + manager.rational(
normalVector()[dim]) * variables[dim].getExpression();
109 return lhs <= manager.rational(
offset());
113 return mNormalVector;
117 return mNormalVector;
129 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< ValueType > 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()
ValueType 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)