NO FRAMES

Class IloSOS1Array

Definition file: ilconcert/ilolinear.h
For ILOG CPLEX: the array class of special ordered sets of type 1 (SOS1).

For each basic type, Concert Technology defines a corresponding array class. IloSOS1Array is the array class of special ordered sets of type 1 (SOS1) for a model.

Instances of IloSOS1Array are extensible. That is, you can add more elements to such an array. References to an array change whenever an element is added to or removed from the array.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

For information on arrays, see the concept Arrays

See Also:

Constructor Summary
public IloSOS1Array(IloDefaultArrayI * i=0)
public IloSOS1Array(const IloEnv env, IloInt n=0)
Method Summary
public voidadd(IloInt more, const IloSOS1 & x)
public voidadd(const IloSOS1 & x)
public voidadd(const IloSOS1Array & x)
public IloSOS1operator[](IloInt i) const
public IloSOS1 &operator[](IloInt i)
Inherited Methods from IloConstraintArray
add, add, add, operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements, setNames
Constructor Detail

IloSOS1Array

public IloSOS1Array(IloDefaultArrayI * i=0)

This default constructor creates an empty array. You cannot create instances of the undocumented class IloDefaultArrayI. As an argument in this default constructor, it allows you to pass 0 (zero) as a value to an optional argument in functions and member functions that accept an array as an argument.


IloSOS1Array

public IloSOS1Array(const IloEnv env, IloInt n=0)

This constructor creates an array of n empty elements in the environment env.


Method Detail

add

public void add(IloInt more, const IloSOS1 & x)

This member function appends x to the invoking array multiple times. The argument more specifies how many times.


add

public void add(const IloSOS1 & x)

This member function appends x to the invoking array.


add

public void add(const IloSOS1Array & x)

This member function appends the elements in array to the invoking array.


operator[]

public IloSOS1 operator[](IloInt i) const

This operator returns a reference to the object located in the invoking array at the position specified by the index i. On const arrays, Concert Technology uses the const operator:

 IloSOS1 operator[] (IloInt i) const;
 

operator[]

public IloSOS1 & operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position specified by the index i.