NO FRAMES

Class IloIntSetVar

Definition file: ilconcert/iloset.h
The class IloIntSetVar represents a set of integer values.

An instance of this class represents a set of integer values. The same integer value will not appear more than once in a set. The elements of a set are not ordered.

A constrained variable representing a set of integer values (that is, an instance of IloIntSetVar) is defined in terms of two other sets: its required elements and its possible elements. Its required elements are those that must be in the set. Its possible elements are those that may be in the set. This class offers member functions for accessing the required and possible elements of a set of integer values.

The function IloCard offers you a way to constrain the number of elements in a set variable. That is, IloCard constrains the cardinality of a set variable.

Constructor Summary
public IloIntSetVar()
public IloIntSetVar(IloIntSetVarI * impl)
public IloIntSetVar(const IloEnv env, const IloIntArray array, const char * name=0)
public IloIntSetVar(const IloEnv env, const IloIntArray possible, const IloIntArray required, const char * name=0)
public IloIntSetVar(const IloEnv env, const IloNumArray array, const char * name=0)
public IloIntSetVar(const IloEnv env, const IloNumArray possible, const IloNumArray required, const char * name=0)
public IloIntSetVar(const IloIntCollection possible, const char * name=0)
public IloIntSetVar(const IloIntCollection possible, const IloIntCollection required, const char * name=0)
public IloIntSetVar(const IloNumCollection possible, const char * name=0)
public IloIntSetVar(const IloNumCollection possible, const IloNumCollection required, const char * name=0)
Method Summary
public voidaddPossible(IloInt elt) const
public voidaddRequired(IloInt elt) const
public IloIntSetVarI *getImpl() const
public voidgetPossibleSet(IloIntSet set) const
public IloIntSetgetPossibleSet() const
public voidgetRequiredSet(IloIntSet set) const
public IloIntSetgetRequiredSet() const
public voidremovePossible(IloInt elt) const
public voidremoveRequired(IloInt elt) const
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, setName, setObject
Constructor Detail

IloIntSetVar

public IloIntSetVar()
This constructor creates an empty handle. You must initialize it before you use it.

IloIntSetVar

public IloIntSetVar(IloIntSetVarI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloIntSetVar

public IloIntSetVar(const IloEnv env, const IloIntArray array, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values. By default, its name is the empty string, but you can specify a name of your choice.


IloIntSetVar

public IloIntSetVar(const IloEnv env, const IloIntArray possible, const IloIntArray required, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values. The array possible specifies the set of possible elements of the set variable; the array required specifies the set of required elements of the set variable. By default, its name is the empty string, but you can specify a name of your choice.


IloIntSetVar

public IloIntSetVar(const IloEnv env, const IloNumArray array, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values. By default, its name is the empty string, but you can specify a name of your choice.


IloIntSetVar

public IloIntSetVar(const IloEnv env, const IloNumArray possible, const IloNumArray required, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values. The numeric array possible specifies the set of possible elements of the set variable; the numeric array required specifies the set of required elements of the set variable. By default, its name is the empty string, but you can specify a name of your choice.


IloIntSetVar

public IloIntSetVar(const IloIntCollection possible, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values.


IloIntSetVar

public IloIntSetVar(const IloIntCollection possible, const IloIntCollection required, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values.


IloIntSetVar

public IloIntSetVar(const IloNumCollection possible, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values.


IloIntSetVar

public IloIntSetVar(const IloNumCollection possible, const IloNumCollection required, const char * name=0)

This constructor creates a constrained set variable and makes it part of the environment env, where the set consists of integer values.


Method Detail

addPossible

public void addPossible(IloInt elt) const

This member function adds elt to the set of possible elements of the invoking set variable.

Note
The member function addPossible notifies Concert Technology algorithms about this change of this invoking object.

addRequired

public void addRequired(IloInt elt) const

This member function adds elt to the set of required elements of the invoking set variable.

Note
The member function addRequired notifies Concert Technology algorithms about this change of this invoking object.

getImpl

public IloIntSetVarI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

getPossibleSet

public void getPossibleSet(IloIntSet set) const

This member function accesses the possible elements of the invoking set variable and puts those elements into its argument set.


getPossibleSet

public IloIntSet getPossibleSet() const

This member function returns the possible elements of the invoking set variable.


getRequiredSet

public void getRequiredSet(IloIntSet set) const

This member function accesses the possible elements of the invoking set variable and puts those elements into its argument set.


getRequiredSet

public IloIntSet getRequiredSet() const

This member function returns the required elements of the invoking set variable.


removePossible

public void removePossible(IloInt elt) const

This member function removes elt as a possible element of the invoking set variable.

Note
The member function removePossible notifies Concert Technology algorithms about this change of this invoking object.

removeRequired

public void removeRequired(IloInt elt) const

This member function removes elt as a required element of the invoking set variable.

Note
The member function removeRequired notifies Concert Technology algorithms about this change of this invoking object.