extern bool Siena::apply_operator

Siena C++ API documentation.

## extern bool apply_operator(SienaOperator op, const AttributeValue & x, const AttributeValue & y)

> semantics of Siena operators: applies an operator to two values.

## Documentation

> Applies an operator to two values. Note that Siena operators are all binary relations. Operands are applied in the given order, so `apply_operator(op, x, y)` evaluates x op y. For example: `apply_operator(Siena_lt, x, y)` corresponds to x < y

> This function implements some minimal type-conversion (or type compatibility). In practice, integers are always compatible to doubles. The result in case of incompatible types does not depend on the actual values of `x` and `y`. Specifically, it is always `true` if `op == Siena_xx` (don't care) or `op == Siena_ne` (not equal). Otherwise it's `false`. Note also that some operators (relations) are defined over a limited set of types. In particular `Siena_pf`, `Siena_sf`, and `Siena_ss` are defined for strings (`Siena_string`) operators only.

Alphabetic index HTML hierarchy of classes or Java

This document is part of Siena. Please, direct any comment or suggestion to Antonio Carzaniga