Class RPGBuilder::LinearEffects

Nested Relationships

This class is a nested type of Class RPGBuilder.

Nested Types

Class Documentation

class LinearEffects

A class defining the linear continuous effects of an action

Public Members

vector<int> vars

The IDs of the variables upon which this action has continuous effects.

See also

RPGBuilder::getPNE

vector<vector<EffectExpression>> effects

The effects themselves. Each entry is a vector describing the effect upon the corresponding variable in vars. For now, at most one such vector exists, but in the future this may change if support for piecewise-linear effects is added.

int divisions

The number of divisions for the continuous numeric effects of the action. At present this is always 1, i.e. the gradients of the effects remain fixed across the execution of the action, but this may change if support for piecewise-linear effects is added.

struct EffectExpression

A single linear continuous numeric effect expression. The gradient of the effect is stored in LNF.

Public Functions

inline EffectExpression(const double &g)

Constructor for a constant-gradient linear continuous effect

Parameters:

g – The gradient of the effect

Public Members

vector<double> weights

The weights for the variables in the LNF expression of the gradient.

vector<int> variables

The variables in the LNF expression of the gradient.

double constant

The constant term of the LNF expression of the gradient.