Skip to main content
FRAMES NO FRAMES

IlcSum

public IlcIntExp IlcSum(const IlcIntVarArray array)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Returns an expression that is the sum of the argument(s).

This function creates a new constrained expression equal to the sum of the constrained expressions in array, an array of constrained values or variables that may be integer or floating-point.

When its argument is an array of constrained integer variables, its domain is an interval. Its minimum is the sum of the minimums of the elements of array. Its maximum is the sum of the maximums of the elements of array.


IlcSum

public IlcFloatExp IlcSum(const IlcFloatVarArray vars)
public IlcFloat IlcSum(const IlcFloatArray array)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Returns a constrained sum expression.

This function creates a new constrained expression equal to the sum of the constrained expressions in array, an array of constrained values or variables that may be integer or floating-point.

When its argument is an instance of IlcIntArray or IlcFloatArray, it simply creates and returns the sum of the elements.

When its argument is an array of constrained integer variables, then its domain is an interval. Its minimum is the sum of the minimums of the elements of array. Its maximum is the sum of the maximums of the elements of array.

See Also: