Skip to main content
FRAMES NO FRAMES

Class IloDiscreteDataCollection

Definition file: ilconcert/ilocollection.h
Map of IloDiscreteDataCollectionIloDiscreteDataCollectionIloAnyCollectionIloIntCollectionIloNumCollectionIloDiscreteDataCollectionIloDataCollection
A class used to represent a discrete data collection that can be enumerated.

IloDiscreteDataCollection is an abstract class for discrete data. This domain can be enumerated.

See Also:

Method Summary
public IloDiscreteDataCollectionI *getImpl() const
public IloIntgetIndex(const char * value) const
public IloIntgetIndex(IloSymbol value) const
public IloIntgetIndex(IloAny value) const
public IloIntgetIndex(IloNum value) const
public IloIntgetIndex(IloInt value) const
public IloIntgetSize() const
public IloDiscreteDataCollection()
public IloDiscreteDataCollection(IloDiscreteDataCollectionI * impl)
public IloBoolisOrdered() const
public IloBoolisReversed() const
public IloBoolisSorted() const
public IloDataIterator *iterator() const
Inherited Methods from IloDataCollection
display, end, getEnv, getName, isIntRange, isIntSet, isNumRange, isNumSet, isSymbolSet, isTupleSet, sort, sort, sort, sort
Method Detail

IloDiscreteDataCollection

public IloDiscreteDataCollection()

This constructor creates a collection whose handle pointer is null. This object must be assigned before it can be used.


IloDiscreteDataCollection

public IloDiscreteDataCollection(IloDiscreteDataCollectionI * impl)

Constructor from an implementation.


getImpl

public IloDiscreteDataCollectionI * getImpl() const

Returns a pointer to the implementation object of the invoking extractable object. This member function is useful when you need to be sure that you are using the same copy of the invoking extractable object in more than one situation.

Returns:

A pointer to the implementation object of the invoking extractable object.

getIndex

public IloInt getIndex(const char * value) const

Returns the index of a given char value.

If the collection is not a collection IloSymbol, it will throw an exception.

If the object is not present in the collection, it returns -1.

Parameters:

value
The value for which you want to return the index.

Returns:

The index of the char value, as an integer.

getIndex

public IloInt getIndex(IloSymbol value) const

Returns the index of a given IloSymbol value.

If the collection is not a collection of IloSymbol, it will throw an exception.

If the object is not present in the collection, it returns -1.

Parameters:

value
The value for which you want to return the index.

Returns:

The index of the IloSymbol value, as an integer.

getIndex

public IloInt getIndex(IloAny value) const

Returns the index of a given IloAny value.

If the object is not present in the collection, it returns -1.

Parameters:

value
The value for which you want to return the index.

Returns:

The index of the IloAny value, as an integer.

getIndex

public IloInt getIndex(IloNum value) const

Returns the index of a given numeric value.

If the collection is not a collection of numeric values, it will throw an exception.

If the object is not present in the collection, it returns -1.

Parameters:

value
The value for which you want to return the index.

Returns:

The index of the numeric value, as an integer.

getIndex

public IloInt getIndex(IloInt value) const

Returns the index of a given integer value.

If the collection is not a collection of integer, it will throw an exception.

If the object is not present in the collection, it returns -1.

Parameters:

value
The value for which you want to return the index.

Returns:

The index of the integer value, as an integer.

getSize

public IloInt getSize() const

This member function returns the size of the collection, that is, the number of included elements.

Returns:

An integer with the size of the data collection.

isOrdered

public IloBool isOrdered() const

Returns whether the collection is ordered.


isReversed

public IloBool isReversed() const

Returns whether the collection is reversed.


isSorted

public IloBool isSorted() const

Returns whether the collection is sorted.


iterator

public IloDataIterator * iterator() const

Returns a new iterator on the collection.

See Also: