跳至主内容
框架 无框架

IlcSum

publicIlcIntExp IlcSum(constIlcIntVarArray array)
定义文件: ilcp/cpext.h
包含文件: <ilcp/cpextilcp/cpext.h
返回参数之和的表达式。

该函数创建一个新的受约束表达式,等于数组中受约束表达式的总和,数组是受约束值或变量的数组,可以是整数或浮点数。

当参数是一个受约束整数变量数组时,其域是一个区间。 它的最小值是 "array元素的最小值之和。 它的最大值是 "array元素的最大值之和。


IlcSum

publicIlcFloatExp IlcSum(constIlcFloatVarArray vars)
publicIlcFloat IlcSum(constIlcFloatArray array)
定义文件: ilcp/cpext.h
包含文件: <ilcp/cpextilcp/cpext.h
返回受约束的求和表达式。

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.

如果参数是 "IlcIntArray或 "IlcFloatArray的实例,则只需创建并返回元素的总和。

如果其参数是一个受约束整数变量数组,那么其域就是一个区间。 它的最小值是 "array元素的最小值之和。 它的最大值是 "array元素的最大值之和。

另请参阅: