NO FRAMES

Class IloSOS2Array

Definition file: ilconcert/ilolinear.h

For each basic type, Concert Technology defines a corresponding array class. IloSOS2Array is the array class of special ordered sets of type 2 (SOS2) for a model.

Instances of IloSOS2Array 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 IloSOS2Array(IloDefaultArrayI *)
public IloSOS2Array(const IloEnv, IloInt)
public IloSOS2Array(const IloEnv, IloInt, const IloSOS2, const IloSOS2, ...)
Method Summary
public voidadd(IloInt, const IloSOS2)
public voidadd(const IloSOS2)
public voidadd(const IloSOS2Array)
public IloSOS2operator[](IloInt)
public IloSOS2 &operator[](IloInt)
Inherited Methods from IloConstraintArray
add, add, add, operator[], operator[]
Inherited Methods from IloExtractableArray
add, add, add, endElements
Constructor Detail

IloSOS2Array

public IloSOS2Array(IloDefaultArrayI * i)

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


IloSOS2Array

public IloSOS2Array(const IloEnv env, IloInt num)

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


IloSOS2Array

public IloSOS2Array(const IloEnv env, IloInt num, const IloSOS2 v0, const IloSOS2 v1, ... )

This constructor creates an array of num elements; these elements are initialized with the parameters v0, v1, and so forth.


Method Detail

add

public void add(IloInt more, const IloSOS2 x)

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


add

public void add(const IloSOS2 x)

This member function appends x to the invoking array.


add

public void add(const IloSOS2Array array)

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


operator[]

public IloSOS2 operator[](IloInt i)

This operator returns a reference to the object located in the invoking array at the position indicated by the index i. Concert Technology uses the const operator

IloSOS2 operator[] (IloInt i) const;

on const arrays.


operator[]

public IloSOS2 & operator[](IloInt i)

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