Magidoc

LinearCostFunctionInput
Input Object

A generalized linear cost function that can be applied to a cost value. The coefficient is used to scale the input Cost linearly and the constant is used to add a fixed offset. If we assume a cost c, then f(c) = coefficient * c + constant.

Fields

#

coefficient

Non-null

The coefficient that scales the Cost input linearly.

constant

Non-null

The 0th degree constant of the function as a Cost, must be a non-negative integer