English
Languages
English
Shortcuts



QuadraticProgram.get_num_vars

QuadraticProgram.get_num_vars(vartype=None)[source]

Returns the total number of variables or the number of variables of the specified type.

Parameters

vartype (Optional[VarType]) – The type to be filtered on. All variables are counted if None.

Return type

int

Returns

The total number of variables.