Skip to content

scram::mef::Ite

If-Then-Else ternary expression.

#include <conditional.h>

Inherits from scram::mef::ExpressionFormula< Ite >, scram::mef::Expression, boost::noncopyable

Public Functions

Name
Ite(Expression * condition, Expression * then_arm, Expression * else_arm)
virtual Intervalinterval() override
template <typename F > <br>doubleCompute(F && eval)<br>Computes the if-then-else expression with the given evaluator.

Additional inherited members

Public Functions inherited from scram::mef::ExpressionFormula< Ite >

Name
virtual doublevalue()<br>Computes the expression with argument expression default values.
Expression(std::vector< Expression * > args ={})<br>Constructor for use by derived classes to register their arguments.

Public Functions inherited from scram::mef::Expression

Name
Expression(std::vector< Expression * > args ={})<br>Constructor for use by derived classes to register their arguments.
virtual~Expression() =default
const std::vector< Expression * > &args() const
virtual voidValidate() const<br>Validates the expression.
virtual doublevalue() =0
virtual boolIsDeviate()<br>Determines if the value of the expression contains deviate expressions.
doubleSample()
voidReset()<br>This routine resets the sampling to get new values.

Protected Functions inherited from scram::mef::Expression

Name
voidAddArg(Expression * arg)<br>Registers an additional argument expression.

Public Functions Documentation

function Ite

cpp
inline Ite(
    Expression * condition,
    Expression * then_arm,
    Expression * else_arm
)

Parameters:

  • condition The Boolean expression to be tested.
  • then_arm The expression if the Boolean is true.
  • else_arm The expression if the Boolean is false.

function interval

cpp
virtual Interval interval() override

Return: The domain interval for validation purposes only.

Reimplements: scram::mef::Expression::interval

function Compute

cpp
template <typename F >
inline double Compute(
    F && eval
)

Computes the if-then-else expression with the given evaluator.


Updated on 2025-11-11 at 16:51:08 +0000