Storm
A Modern Probabilistic Model Checker
|
Classes | |
struct | VectorHash |
Functions | |
std::set< storm::RationalFunctionVariable > | getVariables (std::vector< storm::RationalFunction > const &vector) |
template<class T > | |
std::size_t | findOrInsert (std::vector< T > &vector, T &&element) |
Finds the given element in the given vector. | |
template<typename T > | |
void | setAllValues (std::vector< T > &vec, storm::storage::BitVector const &positions, T const &positiveValue=storm::utility::one< T >(), T const &negativeValue=storm::utility::zero< T >()) |
template<class T > | |
void | setVectorValues (std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< T > const &values) |
Sets the provided values at the provided positions in the given vector. | |
template<class T > | |
void | setVectorValues (std::vector< T > &vector, storm::storage::BitVector const &positions, T value) |
Sets the provided value at the provided positions in the given vector. | |
template<typename T > | |
void | setNonzeroIndices (std::vector< T > const &vec, storm::storage::BitVector &bv) |
template<class OutputIterator , class Size , class Assignable > | |
void | iota_n (OutputIterator first, Size n, Assignable value) |
Iota function as a helper for efficient creating a range in a vector. | |
template<typename T > | |
std::vector< T > | buildVectorForRange (T min, T max) |
Constructs a vector [min, min+1, ...., max-1]. | |
template<typename T > | |
std::vector< uint_fast64_t > | getSortedIndices (std::vector< T > const &v) |
Returns a list of indices such that the first index refers to the highest entry of the given vector, the second index refers to the entry with the second highest value, ... Example: v={3,8,4,5} yields res={1,3,2,0}. | |
template<typename T > | |
bool | isUnique (std::vector< T > const &v) |
Returns true iff every element in the given vector is unique, i.e., there are no i,j with i!=j and v[i]==v[j]. | |
template<typename T , typename Comparator > | |
bool | compareElementWise (std::vector< T > const &left, std::vector< T > const &right, Comparator comp=std::less< T >()) |
template<class T > | |
void | selectVectorValues (std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< T > const &values) |
Selects the elements from a vector at the specified positions and writes them consecutively into another vector. | |
template<class T > | |
void | selectVectorValues (std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< uint_fast64_t > const &rowGrouping, std::vector< T > const &values) |
Selects groups of elements from a vector at the specified positions and writes them consecutively into another vector. | |
template<class T > | |
void | selectVectorValues (std::vector< T > &vector, std::vector< uint_fast64_t > const &rowGroupToRowIndexMapping, std::vector< uint_fast64_t > const &rowGrouping, std::vector< T > const &values) |
Selects one element out of each row group and writes it to the target vector. | |
template<class T > | |
void | selectVectorValues (std::vector< T > &vector, std::vector< uint_fast64_t > const &indexSequence, std::vector< T > const &values) |
Selects values from a vector at the specified sequence of indices and writes them into another vector. | |
template<class T > | |
void | selectVectorValuesRepeatedly (std::vector< T > &vector, storm::storage::BitVector const &positions, std::vector< uint_fast64_t > const &rowGrouping, std::vector< T > const &values) |
Selects values from a vector at the specified positions and writes them into another vector as often as given by the size of the corresponding group of elements. | |
template<class T > | |
void | subtractFromConstantOneVector (std::vector< T > &vector) |
Subtracts the given vector from the constant one-vector and writes the result to the input vector. | |
template<class T > | |
void | addFilteredVectorGroupsToGroupedVector (std::vector< T > &target, std::vector< T > const &source, storm::storage::BitVector const &filter, std::vector< uint_fast64_t > const &rowGroupIndices) |
template<class T > | |
void | addVectorToGroupedVector (std::vector< T > &target, std::vector< T > const &source, std::vector< uint_fast64_t > const &rowGroupIndices) |
Adds the source vector to the target vector in a way such that the i-th entry is added to all elements of the i-th row group in the target vector. | |
template<class T > | |
void | addFilteredVectorToGroupedVector (std::vector< T > &target, std::vector< T > const &source, storm::storage::BitVector const &filter, std::vector< uint_fast64_t > const &rowGroupIndices) |
Adds the source vector to the target vector in a way such that the i-th selected entry is added to all elements of the i-th row group in the target vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType , class Operation > | |
void | applyPointwiseTernary (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target, Operation f=Operation()) |
Applies the given operation pointwise on the two given vectors and writes the result to the third vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType , class Operation > | |
void | applyPointwise (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target, Operation f=Operation()) |
Applies the given operation pointwise on the two given vectors and writes the result to the third vector. | |
template<class InValueType , class OutValueType , class Operation > | |
void | applyPointwise (std::vector< InValueType > const &operand, std::vector< OutValueType > &target, Operation f=Operation()) |
Applies the given function pointwise on the given vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType > | |
void | addVectors (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target) |
Adds the two given vectors and writes the result to the target vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType > | |
void | subtractVectors (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target) |
Subtracts the two given vectors and writes the result to the target vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType > | |
void | multiplyVectorsPointwise (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target) |
Multiplies the two given vectors (pointwise) and writes the result to the target vector. | |
template<class InValueType1 , class InValueType2 , class OutValueType > | |
void | divideVectorsPointwise (std::vector< InValueType1 > const &firstOperand, std::vector< InValueType2 > const &secondOperand, std::vector< OutValueType > &target) |
Divides the two given vectors (pointwise) and writes the result to the target vector. | |
template<class ValueType1 , class ValueType2 > | |
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 vector. | |
template<class InValueType1 , class InValueType2 , class InValueType3 > | |
void | addScaledVector (std::vector< InValueType1 > &firstOperand, std::vector< InValueType2 > const &secondOperand, InValueType3 const &factor) |
Computes x:= x + a*y, i.e., adds each element of the first vector and (the corresponding element of the second vector times the given factor) and writes the result into the first vector. | |
template<class T > | |
T | dotProduct (std::vector< T > const &firstOperand, std::vector< T > const &secondOperand) |
Computes the dot product (aka scalar product) and returns the result. | |
template<class T > | |
storm::storage::BitVector | filter (std::vector< T > const &values, std::function< bool(T const &value)> const &function) |
Retrieves a bit vector containing all the indices for which the value at this position makes the given function evaluate to true. | |
template<class T > | |
storm::storage::BitVector | filterGreaterZero (std::vector< T > const &values) |
Retrieves a bit vector containing all the indices for which the value at this position is greater than zero. | |
template<class T > | |
storm::storage::BitVector | filterZero (std::vector< T > const &values) |
Retrieves a bit vector containing all the indices for which the value at this position is equal to zero. | |
template<class T > | |
storm::storage::BitVector | filterOne (std::vector< T > const &values) |
Retrieves a bit vector containing all the indices for which the value at this position is equal to one. | |
template<class T > | |
storm::storage::BitVector | filterInfinity (std::vector< T > const &values) |
Retrieves a bit vector containing all the indices for which the value at this position is equal to one. | |
template<typename VT > | |
VT | sum_if (std::vector< VT > const &values, storm::storage::BitVector const &filter) |
Sum the entries from values that are set to one in the filter vector. | |
template<typename VT > | |
VT | max_if (std::vector< VT > const &values, storm::storage::BitVector const &filter) |
Computes the maximum of the entries from the values that are selected by the (non-empty) filter. | |
template<typename VT > | |
VT | min_if (std::vector< VT > const &values, storm::storage::BitVector const &filter) |
Computes the minimum of the entries from the values that are selected by the (non-empty) filter. | |
template<class T , class Filter > | |
void | reduceVector (std::vector< T > const &source, std::vector< T > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices) |
Reduces the given source vector by selecting an element according to the given filter out of each row group. | |
template<class T > | |
void | reduceVectorMin (std::vector< T > const &source, std::vector< T > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices=nullptr) |
Reduces the given source vector by selecting the smallest element out of each row group. | |
template<class T > | |
void | reduceVectorMax (std::vector< T > const &source, std::vector< T > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices=nullptr) |
Reduces the given source vector by selecting the largest element out of each row group. | |
template<class T > | |
void | reduceVectorMinOrMax (storm::solver::OptimizationDirection dir, std::vector< T > const &source, std::vector< T > &target, std::vector< uint_fast64_t > const &rowGrouping, std::vector< uint_fast64_t > *choices=nullptr) |
Reduces the given source vector by selecting either the smallest or the largest out of each row group. | |
template<class T > | |
bool | equalModuloPrecision (T const &val1, T const &val2, T const &precision, bool relativeError=true) |
Compares the given elements and determines whether they are equal modulo the given precision. | |
template<> | |
bool | equalModuloPrecision (double const &val1, double const &val2, double const &precision, bool relativeError) |
template<class T > | |
bool | equalModuloPrecision (std::vector< T > const &vectorLeft, std::vector< T > const &vectorRight, T const &precision, bool relativeError) |
Compares the two vectors and determines whether they are equal modulo the provided precision. | |
template<class T > | |
bool | equalModuloPrecision (std::vector< T > const &vectorLeft, std::vector< T > const &vectorRight, storm::storage::BitVector const &positions, T const &precision, bool relativeError) |
Compares the two vectors at the specified positions and determines whether they are equal modulo the provided precision. | |
template<class T > | |
bool | equalModuloPrecision (std::vector< T > const &vectorLeft, std::vector< T > const &vectorRight, std::vector< uint_fast64_t > const &positions, T const &precision, bool relativeError) |
Compares the two vectors at the specified positions and determines whether they are equal modulo the provided precision. | |
template<class T > | |
T | maximumElementAbs (std::vector< T > const &vector) |
template<class T > | |
T | maximumElementDiff (std::vector< T > const &vectorLeft, std::vector< T > const &vectorRight) |
template<class T > | |
T | computeSquaredNorm2Difference (std::vector< T > const &b1, std::vector< T > const &b2) |
template<typename ValueType > | |
void | clip (std::vector< ValueType > &x, boost::optional< ValueType > const &lowerBound, boost::optional< ValueType > const &upperBound) |
Takes the input vector and ensures that all entries conform to the bounds. | |
template<typename ValueType > | |
void | clip (std::vector< ValueType > &x, ValueType const &bound, bool boundFromBelow) |
Takes the input vector and ensures that all entries conform to the bounds. | |
template<typename ValueType > | |
void | clip (std::vector< ValueType > &x, std::vector< ValueType > const &bounds, bool boundFromBelow) |
Takes the input vector and ensures that all entries conform to the bounds. | |
template<class T > | |
std::vector< T > | getConstrainedOffsetVector (std::vector< T > const &offsetVector, storm::storage::BitVector const &constraint) |
Takes the given offset vector and applies the given contraint. | |
template<typename TargetType , typename SourceType > | |
std::vector< TargetType > | convertNumericVector (std::vector< SourceType > const &oldVector) |
Converts the given vector to the given ValueType Assumes that both, TargetType and SourceType are numeric. | |
template<typename TargetType , typename SourceType > | |
void | convertNumericVector (std::vector< SourceType > const &inputVector, std::vector< TargetType > &targetVector) |
Converts the given vector to the given ValueType Assumes that both, TargetType and SourceType are numeric. | |
template<typename NewValueType , typename ValueType > | |
std::vector< NewValueType > | toValueType (std::vector< ValueType > const &oldVector) |
Converts the given vector to the given ValueType. | |
template<typename ValueType , typename TargetValueType > | |
std::enable_if< std::is_same< ValueType, storm::RationalNumber >::value, std::pair< std::vector< TargetValueType >, ValueType > >::type | toIntegralVector (std::vector< ValueType > const &vec) |
template<typename ValueType , typename TargetValueType > | |
std::enable_if<!std::is_same< ValueType, storm::RationalNumber >::value, std::pair< std::vector< TargetValueType >, ValueType > >::type | toIntegralVector (std::vector< ValueType > const &vec) |
template<typename Type > | |
std::vector< Type > | filterVector (std::vector< Type > const &in, storm::storage::BitVector const &filter) |
template<typename Type > | |
void | filterVectorInPlace (std::vector< Type > &v, storm::storage::BitVector const &filter) |
template<typename T > | |
bool | hasNegativeEntry (std::vector< T > const &v) |
template<typename T > | |
bool | hasPositiveEntry (std::vector< T > const &v) |
template<typename T > | |
bool | hasNonZeroEntry (std::vector< T > const &v) |
template<typename T > | |
bool | hasZeroEntry (std::vector< T > const &v) |
template<typename T > | |
bool | hasInfinityEntry (std::vector< T > const &v) |
template<typename T > | |
std::vector< T > | applyInversePermutation (std::vector< uint64_t > const &inversePermutation, std::vector< T > const &source) |
template<typename T > | |
std::vector< T > | applyInversePermutationToGroupedVector (std::vector< uint64_t > const &inversePermutation, std::vector< T > const &source, std::vector< uint64_t > const &rowGroupIndices) |
template<typename ValueType > | |
std::string | toString (std::vector< ValueType > const &vector) |
Output vector as string. | |
template<typename PT1 , typename PT2 > | |
std::string | toString (std::vector< std::pair< PT1, PT2 > > const &vector) |
void storm::utility::vector::addFilteredVectorGroupsToGroupedVector | ( | std::vector< T > & | target, |
std::vector< T > const & | source, | ||
storm::storage::BitVector const & | filter, | ||
std::vector< uint_fast64_t > const & | rowGroupIndices | ||
) |
void storm::utility::vector::addFilteredVectorToGroupedVector | ( | std::vector< T > & | target, |
std::vector< T > const & | source, | ||
storm::storage::BitVector const & | filter, | ||
std::vector< uint_fast64_t > const & | rowGroupIndices | ||
) |
Adds the source vector to the target vector in a way such that the i-th selected entry is added to all elements of the i-th row group in the target vector.
target | The target ("row grouped") vector. |
source | The source vector. |
rowGroupIndices | A vector representing the row groups in the target vector. |
void storm::utility::vector::addScaledVector | ( | std::vector< InValueType1 > & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
InValueType3 const & | factor | ||
) |
Computes x:= x + a*y, i.e., adds each element of the first vector and (the corresponding element of the second vector times the given factor) and writes the result into the first vector.
firstOperand | The first operand. |
secondOperand | The second operand |
factor | The factor for the elements of the second operand |
void storm::utility::vector::addVectors | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target | ||
) |
void storm::utility::vector::addVectorToGroupedVector | ( | std::vector< T > & | target, |
std::vector< T > const & | source, | ||
std::vector< uint_fast64_t > const & | rowGroupIndices | ||
) |
Adds the source vector to the target vector in a way such that the i-th entry is added to all elements of the i-th row group in the target vector.
target | The target ("row grouped") vector. |
source | The source vector. |
rowGroupIndices | A vector representing the row groups in the target vector. |
std::vector< T > storm::utility::vector::applyInversePermutation | ( | std::vector< uint64_t > const & | inversePermutation, |
std::vector< T > const & | source | ||
) |
std::vector< T > storm::utility::vector::applyInversePermutationToGroupedVector | ( | std::vector< uint64_t > const & | inversePermutation, |
std::vector< T > const & | source, | ||
std::vector< uint64_t > const & | rowGroupIndices | ||
) |
void storm::utility::vector::applyPointwise | ( | std::vector< InValueType > const & | operand, |
std::vector< OutValueType > & | target, | ||
Operation | f = Operation() |
||
) |
void storm::utility::vector::applyPointwise | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target, | ||
Operation | f = Operation() |
||
) |
Applies the given operation pointwise on the two given vectors and writes the result to the third vector.
To obtain an in-place operation, the third vector may be equal to any of the other two vectors.
firstOperand | The first operand. |
secondOperand | The second operand. |
target | The target vector. |
void storm::utility::vector::applyPointwiseTernary | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target, | ||
Operation | f = Operation() |
||
) |
Applies the given operation pointwise on the two given vectors and writes the result to the third vector.
To obtain an in-place operation, the third vector may be equal to any of the other two vectors.
firstOperand | The first operand. |
secondOperand | The second operand. |
target | The target vector. |
|
inline |
void storm::utility::vector::clip | ( | std::vector< ValueType > & | x, |
boost::optional< ValueType > const & | lowerBound, | ||
boost::optional< ValueType > const & | upperBound | ||
) |
void storm::utility::vector::clip | ( | std::vector< ValueType > & | x, |
std::vector< ValueType > const & | bounds, | ||
bool | boundFromBelow | ||
) |
void storm::utility::vector::clip | ( | std::vector< ValueType > & | x, |
ValueType const & | bound, | ||
bool | boundFromBelow | ||
) |
bool storm::utility::vector::compareElementWise | ( | std::vector< T > const & | left, |
std::vector< T > const & | right, | ||
Comparator | comp = std::less<T>() |
||
) |
T storm::utility::vector::computeSquaredNorm2Difference | ( | std::vector< T > const & | b1, |
std::vector< T > const & | b2 | ||
) |
void storm::utility::vector::convertNumericVector | ( | std::vector< SourceType > const & | inputVector, |
std::vector< TargetType > & | targetVector | ||
) |
Converts the given vector to the given ValueType Assumes that both, TargetType and SourceType are numeric.
inputVector | the vector that needs to be converted |
targetVector | the vector where the result is written to. Should have the same size as inputVector |
std::vector< TargetType > storm::utility::vector::convertNumericVector | ( | std::vector< SourceType > const & | oldVector | ) |
void storm::utility::vector::divideVectorsPointwise | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target | ||
) |
T storm::utility::vector::dotProduct | ( | std::vector< T > const & | firstOperand, |
std::vector< T > const & | secondOperand | ||
) |
|
inline |
bool storm::utility::vector::equalModuloPrecision | ( | std::vector< T > const & | vectorLeft, |
std::vector< T > const & | vectorRight, | ||
std::vector< uint_fast64_t > const & | positions, | ||
T const & | precision, | ||
bool | relativeError | ||
) |
Compares the two vectors at the specified positions and determines whether they are equal modulo the provided precision.
Depending on whether the flag is set, the difference between the vectors is computed relative to the value or in absolute terms.
vectorLeft | The first vector of the comparison. |
vectorRight | The second vector of the comparison. |
precision | The precision up to which the vectors are to be checked for equality. |
positions | A vector representing a set of positions at which the vectors are compared. |
relativeError | If set, the difference between the vectors is computed relative to the value or in absolute terms. |
bool storm::utility::vector::equalModuloPrecision | ( | std::vector< T > const & | vectorLeft, |
std::vector< T > const & | vectorRight, | ||
storm::storage::BitVector const & | positions, | ||
T const & | precision, | ||
bool | relativeError | ||
) |
Compares the two vectors at the specified positions and determines whether they are equal modulo the provided precision.
Depending on whether the flag is set, the difference between the vectors is computed relative to the value or in absolute terms.
vectorLeft | The first vector of the comparison. |
vectorRight | The second vector of the comparison. |
precision | The precision up to which the vectors are to be checked for equality. |
positions | A vector representing a set of positions at which the vectors are compared. |
relativeError | If set, the difference between the vectors is computed relative to the value or in absolute terms. |
bool storm::utility::vector::equalModuloPrecision | ( | std::vector< T > const & | vectorLeft, |
std::vector< T > const & | vectorRight, | ||
T const & | precision, | ||
bool | relativeError | ||
) |
Compares the two vectors and determines whether they are equal modulo the provided precision.
Depending on whether the flag is set, the difference between the vectors is computed relative to the value or in absolute terms.
vectorLeft | The first vector of the comparison. |
vectorRight | The second vector of the comparison. |
precision | The precision up to which the vectors are to be checked for equality. |
relativeError | If set, the difference between the vectors is computed relative to the value or in absolute terms. |
bool storm::utility::vector::equalModuloPrecision | ( | T const & | val1, |
T const & | val2, | ||
T const & | precision, | ||
bool | relativeError = true |
||
) |
Compares the given elements and determines whether they are equal modulo the given precision.
The provided flag additionaly specifies whether the error is computed in relative or absolute terms.
val1 | The first value to compare. |
val2 | The second value to compare. |
precision | The precision up to which the elements are compared. |
relativeError | If set, the error is computed relative to the second value. |
storm::storage::BitVector storm::utility::vector::filter | ( | std::vector< T > const & | values, |
std::function< bool(T const &value)> const & | function | ||
) |
storm::storage::BitVector storm::utility::vector::filterGreaterZero | ( | std::vector< T > const & | values | ) |
storm::storage::BitVector storm::utility::vector::filterInfinity | ( | std::vector< T > const & | values | ) |
storm::storage::BitVector storm::utility::vector::filterOne | ( | std::vector< T > const & | values | ) |
std::vector< Type > storm::utility::vector::filterVector | ( | std::vector< Type > const & | in, |
storm::storage::BitVector const & | filter | ||
) |
void storm::utility::vector::filterVectorInPlace | ( | std::vector< Type > & | v, |
storm::storage::BitVector const & | filter | ||
) |
storm::storage::BitVector storm::utility::vector::filterZero | ( | std::vector< T > const & | values | ) |
std::size_t storm::utility::vector::findOrInsert | ( | std::vector< T > & | vector, |
T && | element | ||
) |
Finds the given element in the given vector.
If the vector does not contain the element, it is inserted (at the end of vector). Either way, the returned value will be the position of the element inside the vector,
vector | The vector in which the element is searched and possibly insert |
element | The element that will be searched for (or inserted) |
std::vector< T > storm::utility::vector::getConstrainedOffsetVector | ( | std::vector< T > const & | offsetVector, |
storm::storage::BitVector const & | constraint | ||
) |
Takes the given offset vector and applies the given contraint.
That is, it produces another offset vector that contains the relative offsets of the entries given by the constraint.
offsetVector | The offset vector to constrain. |
constraint | The constraint to apply to the offset vector. |
std::vector< uint_fast64_t > storm::utility::vector::getSortedIndices | ( | std::vector< T > const & | v | ) |
|
inline |
Definition at line 5 of file rationalfunction.h.
bool storm::utility::vector::hasInfinityEntry | ( | std::vector< T > const & | v | ) |
bool storm::utility::vector::hasNegativeEntry | ( | std::vector< T > const & | v | ) |
bool storm::utility::vector::hasNonZeroEntry | ( | std::vector< T > const & | v | ) |
bool storm::utility::vector::hasPositiveEntry | ( | std::vector< T > const & | v | ) |
bool storm::utility::vector::hasZeroEntry | ( | std::vector< T > const & | v | ) |
void storm::utility::vector::iota_n | ( | OutputIterator | first, |
Size | n, | ||
Assignable | value | ||
) |
Iota function as a helper for efficient creating a range in a vector.
See also http://stackoverflow.com/questions/11965732/set-stdvectorint-to-a-range
bool storm::utility::vector::isUnique | ( | std::vector< T > const & | v | ) |
VT storm::utility::vector::max_if | ( | std::vector< VT > const & | values, |
storm::storage::BitVector const & | filter | ||
) |
T storm::utility::vector::maximumElementAbs | ( | std::vector< T > const & | vector | ) |
T storm::utility::vector::maximumElementDiff | ( | std::vector< T > const & | vectorLeft, |
std::vector< T > const & | vectorRight | ||
) |
VT storm::utility::vector::min_if | ( | std::vector< VT > const & | values, |
storm::storage::BitVector const & | filter | ||
) |
void storm::utility::vector::multiplyVectorsPointwise | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target | ||
) |
void storm::utility::vector::reduceVector | ( | std::vector< T > const & | source, |
std::vector< T > & | target, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< uint_fast64_t > * | choices | ||
) |
Reduces the given source vector by selecting an element according to the given filter out of each row group.
source | The source vector which is to be reduced. |
target | The target vector into which a single element from each row group is written. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the values vector. |
filter | A function that compares two elements v1 and v2 according to some filter criterion. This function must return true iff v1 is supposed to be taken instead of v2. |
choices | If non-null, this vector is used to store the choices made during the selection. |
void storm::utility::vector::reduceVectorMax | ( | std::vector< T > const & | source, |
std::vector< T > & | target, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< uint_fast64_t > * | choices = nullptr |
||
) |
Reduces the given source vector by selecting the largest element out of each row group.
source | The source vector which is to be reduced. |
target | The target vector into which a single element from each row group is written. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the source vector. |
choices | If non-null, this vector is used to store the choices made during the selection. |
void storm::utility::vector::reduceVectorMin | ( | std::vector< T > const & | source, |
std::vector< T > & | target, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< uint_fast64_t > * | choices = nullptr |
||
) |
Reduces the given source vector by selecting the smallest element out of each row group.
source | The source vector which is to be reduced. |
target | The target vector into which a single element from each row group is written. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the source vector. |
choices | If non-null, this vector is used to store the choices made during the selection. |
void storm::utility::vector::reduceVectorMinOrMax | ( | storm::solver::OptimizationDirection | dir, |
std::vector< T > const & | source, | ||
std::vector< T > & | target, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< uint_fast64_t > * | choices = nullptr |
||
) |
Reduces the given source vector by selecting either the smallest or the largest out of each row group.
dir | If true, select the smallest, else select the largest. |
source | The source vector which is to be reduced. |
target | The target vector into which a single element from each row group is written. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the source vector. |
choices | If non-null, this vector is used to store the choices made during the selection. |
void storm::utility::vector::scaleVectorInPlace | ( | std::vector< ValueType1 > & | target, |
ValueType2 const & | factor | ||
) |
void storm::utility::vector::selectVectorValues | ( | std::vector< T > & | vector, |
std::vector< uint_fast64_t > const & | indexSequence, | ||
std::vector< T > const & | values | ||
) |
Selects values from a vector at the specified sequence of indices and writes them into another vector.
vector | The vector into which the selected elements are written. |
indexSequence | a sequence of indices at which the desired values can be found |
values | the values from which to select |
void storm::utility::vector::selectVectorValues | ( | std::vector< T > & | vector, |
std::vector< uint_fast64_t > const & | rowGroupToRowIndexMapping, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< T > const & | values | ||
) |
Selects one element out of each row group and writes it to the target vector.
vector | The target vector to which the values are written. |
rowGroupToRowIndexMapping | A mapping from row group indices to an offset that specifies which of the values to take from the row group. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the values vector. |
values | The vector from which to select the values. |
void storm::utility::vector::selectVectorValues | ( | std::vector< T > & | vector, |
storm::storage::BitVector const & | positions, | ||
std::vector< T > const & | values | ||
) |
Selects the elements from a vector at the specified positions and writes them consecutively into another vector.
vector | The vector into which the selected elements are to be written. |
positions | The positions at which to select the elements from the values vector. |
values | The vector from which to select the elements. |
void storm::utility::vector::selectVectorValues | ( | std::vector< T > & | vector, |
storm::storage::BitVector const & | positions, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< T > const & | values | ||
) |
Selects groups of elements from a vector at the specified positions and writes them consecutively into another vector.
vector | The vector into which the selected elements are to be written. |
positions | The positions of the groups of elements that are to be selected. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the values vector. |
values | The vector from which to select groups of elements. |
void storm::utility::vector::selectVectorValuesRepeatedly | ( | std::vector< T > & | vector, |
storm::storage::BitVector const & | positions, | ||
std::vector< uint_fast64_t > const & | rowGrouping, | ||
std::vector< T > const & | values | ||
) |
Selects values from a vector at the specified positions and writes them into another vector as often as given by the size of the corresponding group of elements.
vector | The vector into which the selected elements are written. |
positions | The positions at which to select the values. |
rowGrouping | A vector that specifies the begin and end of each group of elements in the values vector. This implicitly defines the number of times any element is written to the output vector. |
void storm::utility::vector::setAllValues | ( | std::vector< T > & | vec, |
storm::storage::BitVector const & | positions, | ||
T const & | positiveValue = storm::utility::one<T>() , |
||
T const & | negativeValue = storm::utility::zero<T>() |
||
) |
void storm::utility::vector::setNonzeroIndices | ( | std::vector< T > const & | vec, |
storm::storage::BitVector & | bv | ||
) |
void storm::utility::vector::setVectorValues | ( | std::vector< T > & | vector, |
storm::storage::BitVector const & | positions, | ||
std::vector< T > const & | values | ||
) |
void storm::utility::vector::setVectorValues | ( | std::vector< T > & | vector, |
storm::storage::BitVector const & | positions, | ||
T | value | ||
) |
Sets the provided value at the provided positions in the given vector.
Note that the vector must be at least as long.
vector | The vector in which the value is to be set. |
positions | The positions at which the value is to be set. |
value | The value that is to be set. |
void storm::utility::vector::subtractFromConstantOneVector | ( | std::vector< T > & | vector | ) |
void storm::utility::vector::subtractVectors | ( | std::vector< InValueType1 > const & | firstOperand, |
std::vector< InValueType2 > const & | secondOperand, | ||
std::vector< OutValueType > & | target | ||
) |
VT storm::utility::vector::sum_if | ( | std::vector< VT > const & | values, |
storm::storage::BitVector const & | filter | ||
) |
std::enable_if< std::is_same< ValueType, storm::RationalNumber >::value, std::pair< std::vector< TargetValueType >, ValueType > >::type storm::utility::vector::toIntegralVector | ( | std::vector< ValueType > const & | vec | ) |
std::enable_if<!std::is_same< ValueType, storm::RationalNumber >::value, std::pair< std::vector< TargetValueType >, ValueType > >::type storm::utility::vector::toIntegralVector | ( | std::vector< ValueType > const & | vec | ) |
std::string storm::utility::vector::toString | ( | std::vector< std::pair< PT1, PT2 > > const & | vector | ) |
std::string storm::utility::vector::toString | ( | std::vector< ValueType > const & | vector | ) |