Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::expressions::SimpleValuation Class Reference

A simple implementation of the valuation interface. More...

#include <SimpleValuation.h>

Inheritance diagram for storm::expressions::SimpleValuation:
Collaboration diagram for storm::expressions::SimpleValuation:

Public Member Functions

 SimpleValuation ()
 Creates an empty simple valuation that is associated to no manager and has no variables.
 
 SimpleValuation (std::shared_ptr< storm::expressions::ExpressionManager const > const &manager)
 Creates a new valuation over the non-auxiliary variables of the given manager.
 
 SimpleValuation (SimpleValuation const &other)
 
SimpleValuationoperator= (SimpleValuation const &other)
 
 SimpleValuation (SimpleValuation &&other)
 
SimpleValuationoperator= (SimpleValuation &&other)
 
bool operator== (SimpleValuation const &other) const
 Checks whether the two valuations are semantically equivalent.
 
virtual bool getBooleanValue (Variable const &booleanVariable) const override
 Retrieves the value of the given boolean variable.
 
virtual void setBooleanValue (Variable const &booleanVariable, bool value) override
 Sets the value of the given boolean variable to the provided value.
 
virtual int_fast64_t getIntegerValue (Variable const &integerVariable) const override
 Retrieves the value of the given integer variable.
 
virtual int_fast64_t getBitVectorValue (Variable const &bitVectorVariable) const override
 Retrieves the value of the given bit vector variable.
 
virtual void setIntegerValue (Variable const &integerVariable, int_fast64_t value) override
 Sets the value of the given integer variable to the provided value.
 
virtual void setBitVectorValue (Variable const &bitVectorVariable, int_fast64_t value) override
 Sets the value of the given bit vector variable to the provided value.
 
virtual double getRationalValue (Variable const &rationalVariable) const override
 Retrieves the value of the given rational variable.
 
virtual void setRationalValue (Variable const &rationalVariable, double value) override
 Sets the value of the given boolean variable to the provided value.
 
virtual std::string toPrettyString (std::set< storm::expressions::Variable > const &selectedVariables) const
 Returns a string representation of the valuation of the selected variables.
 
virtual std::string toString (bool pretty=true) const
 
storm::json< storm::RationalNumber > toJson () const
 
- Public Member Functions inherited from storm::expressions::Valuation
 Valuation (std::shared_ptr< ExpressionManager const > const &manager)
 Creates a valuation of all non-auxiliary variables managed by the given manager.
 
virtual ~Valuation ()
 Declare virtual destructor, so we can properly delete instances later.
 
ExpressionManager const & getManager () const
 Retrieves the manager responsible for the variables of this valuation.
 

Friends

class SimpleValuationPointerHash
 
class SimpleValuationPointerLess
 
std::ostream & operator<< (std::ostream &out, SimpleValuation const &valuation)
 

Additional Inherited Members

- Protected Member Functions inherited from storm::expressions::Valuation
std::shared_ptr< ExpressionManager const > const & getManagerAsSharedPtr () const
 Retrieves the manager responsible for the variables of this valuation.
 
void setManager (std::shared_ptr< ExpressionManager const > const &manager)
 Sets the manager responsible for the variables in this valuation.
 

Detailed Description

A simple implementation of the valuation interface.

Definition at line 18 of file SimpleValuation.h.

Constructor & Destructor Documentation

◆ SimpleValuation() [1/4]

storm::expressions::SimpleValuation::SimpleValuation ( )

Creates an empty simple valuation that is associated to no manager and has no variables.

Definition at line 16 of file SimpleValuation.cpp.

◆ SimpleValuation() [2/4]

storm::expressions::SimpleValuation::SimpleValuation ( std::shared_ptr< storm::expressions::ExpressionManager const > const &  manager)

Creates a new valuation over the non-auxiliary variables of the given manager.

Parameters
managerThe manager responsible for the variables of this valuation.

Definition at line 20 of file SimpleValuation.cpp.

◆ SimpleValuation() [3/4]

storm::expressions::SimpleValuation::SimpleValuation ( SimpleValuation const &  other)

Definition at line 28 of file SimpleValuation.cpp.

◆ SimpleValuation() [4/4]

storm::expressions::SimpleValuation::SimpleValuation ( SimpleValuation &&  other)

Definition at line 46 of file SimpleValuation.cpp.

Member Function Documentation

◆ getBitVectorValue()

int_fast64_t storm::expressions::SimpleValuation::getBitVectorValue ( Variable const &  bitVectorVariable) const
overridevirtual

Retrieves the value of the given bit vector variable.

Parameters
bitVectorVariableThe bit vector variable whose value to retrieve.
Returns
The value of the bit vector variable.

Implements storm::expressions::Valuation.

Definition at line 77 of file SimpleValuation.cpp.

◆ getBooleanValue()

bool storm::expressions::SimpleValuation::getBooleanValue ( Variable const &  booleanVariable) const
overridevirtual

Retrieves the value of the given boolean variable.

Parameters
booleanVariableThe boolean variable whose value to retrieve.
Returns
The value of the boolean variable.

Implements storm::expressions::Valuation.

Definition at line 69 of file SimpleValuation.cpp.

◆ getIntegerValue()

int_fast64_t storm::expressions::SimpleValuation::getIntegerValue ( Variable const &  integerVariable) const
overridevirtual

Retrieves the value of the given integer variable.

Parameters
integerVariableThe integer variable whose value to retrieve.
Returns
The value of the integer variable.

Implements storm::expressions::Valuation.

Definition at line 73 of file SimpleValuation.cpp.

◆ getRationalValue()

double storm::expressions::SimpleValuation::getRationalValue ( Variable const &  rationalVariable) const
overridevirtual

Retrieves the value of the given rational variable.

Parameters
rationalVariableThe rational variable whose value to retrieve.
Returns
The value of the rational variable.

Implements storm::expressions::Valuation.

Definition at line 81 of file SimpleValuation.cpp.

◆ operator=() [1/2]

SimpleValuation & storm::expressions::SimpleValuation::operator= ( SimpleValuation &&  other)

Definition at line 54 of file SimpleValuation.cpp.

◆ operator=() [2/2]

SimpleValuation & storm::expressions::SimpleValuation::operator= ( SimpleValuation const &  other)

Definition at line 36 of file SimpleValuation.cpp.

◆ operator==()

bool storm::expressions::SimpleValuation::operator== ( SimpleValuation const &  other) const

Checks whether the two valuations are semantically equivalent.

Parameters
otherThe valuation with which to compare.
Returns
True iff the two valuations are semantically equivalent.

Definition at line 64 of file SimpleValuation.cpp.

◆ setBitVectorValue()

void storm::expressions::SimpleValuation::setBitVectorValue ( Variable const &  bitVectorVariable,
int_fast64_t  value 
)
overridevirtual

Sets the value of the given bit vector variable to the provided value.

Parameters
bitVectorVariableThe variable whose value to set.
valueThe new value of the variable.

Implements storm::expressions::Valuation.

Definition at line 93 of file SimpleValuation.cpp.

◆ setBooleanValue()

void storm::expressions::SimpleValuation::setBooleanValue ( Variable const &  booleanVariable,
bool  value 
)
overridevirtual

Sets the value of the given boolean variable to the provided value.

Parameters
booleanVariableThe variable whose value to set.
valueThe new value of the variable.

Implements storm::expressions::Valuation.

Definition at line 85 of file SimpleValuation.cpp.

◆ setIntegerValue()

void storm::expressions::SimpleValuation::setIntegerValue ( Variable const &  integerVariable,
int_fast64_t  value 
)
overridevirtual

Sets the value of the given integer variable to the provided value.

Parameters
integerVariableThe variable whose value to set.
valueThe new value of the variable.

Implements storm::expressions::Valuation.

Definition at line 89 of file SimpleValuation.cpp.

◆ setRationalValue()

void storm::expressions::SimpleValuation::setRationalValue ( Variable const &  rationalVariable,
double  value 
)
overridevirtual

Sets the value of the given boolean variable to the provided value.

Parameters
integerVariableThe variable whose value to set.
valueThe new value of the variable.

Implements storm::expressions::Valuation.

Definition at line 97 of file SimpleValuation.cpp.

◆ toJson()

storm::json< storm::RationalNumber > storm::expressions::SimpleValuation::toJson ( ) const

Definition at line 154 of file SimpleValuation.cpp.

◆ toPrettyString()

std::string storm::expressions::SimpleValuation::toPrettyString ( std::set< storm::expressions::Variable > const &  selectedVariables) const
virtual

Returns a string representation of the valuation of the selected variables.

Parameters
selectedVariablesThe variables to select.
Returns
The string representation.

Definition at line 101 of file SimpleValuation.cpp.

◆ toString()

std::string storm::expressions::SimpleValuation::toString ( bool  pretty = true) const
virtual

Definition at line 120 of file SimpleValuation.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
SimpleValuation const &  valuation 
)
friend

Definition at line 170 of file SimpleValuation.cpp.

◆ SimpleValuationPointerHash

friend class SimpleValuationPointerHash
friend

Definition at line 20 of file SimpleValuation.h.

◆ SimpleValuationPointerLess

friend class SimpleValuationPointerLess
friend

Definition at line 21 of file SimpleValuation.h.


The documentation for this class was generated from the following files: