Skip to main content
FRAMES NO FRAMES

Class IloIntRange

Definition file: ilconcert/ilocollection.h
Map of IloIntRangeIloIntRangeIloIntRangeIloIntCollectionIloDiscreteDataCollectionIloDataCollection
A class used to represent the domain of an integer range that can be enumerated.

This class represents the domain of an integer range. It can be enumerated using an iterator. It is represented by a lower bound and an upper bound.

See Also:

Method Summary
public IloIntgetFirst() const
public IloIntRangeI *getImpl() const
public IloIntgetLast() const
public IloIntgetLB() const
public IloIntgetNext(IloInt value, IloInt n=1) const
public IloIntgetNextC(IloInt value, IloInt n=1) const
public IloIntgetPrevious(IloInt value, IloInt n=1) const
public IloIntgetPreviousC(IloInt value, IloInt n=1) const
public IloIntgetUB() const
public IloIntRange(IloIntRangeI * impl)
public IloIntRange(IloEnv env)
public IloIntRange(IloEnv env, IloInt min, IloInt max)
public IloIntRange(const IloIntRange & obj)
Inherited Methods from IloIntCollection
getImpl, getValue, IloIntCollection
Inherited Methods from IloDiscreteDataCollection
getImpl, getIndex, getIndex, getIndex, getIndex, getIndex, getSize, IloDiscreteDataCollection, IloDiscreteDataCollection, isOrdered, isReversed, isSorted, iterator
Inherited Methods from IloDataCollection
display, end, getEnv, getName, isIntRange, isIntSet, isNumRange, isNumSet, isSymbolSet, isTupleSet, sort, sort, sort, sort
Method Detail

IloIntRange

public IloIntRange(IloIntRangeI * impl)

Constructor from an implementation.

Parameters:

impl
A pointer to the implementation object of this class.

IloIntRange

public IloIntRange(IloEnv env)

Creates an IloIntRange with infinite bounds.

Parameters:

env
The environment within which to create the IloIntRange.

IloIntRange

public IloIntRange(IloEnv env, IloInt min, IloInt max)

Creates a domain with the given bounds.

Parameters:

env
The environment within which to create the domain.
min
The minimum bound for the domain.
max
The maximum bound for the domain.

IloIntRange

public IloIntRange(const IloIntRange & obj)

Creates a domain from another domain.

Parameters:

obj
The domain from which you want to create another domain.

getFirst

public IloInt getFirst() const

Returns the first item of the collection.

See Also:

Returns:

Returns the first item of the collection.

getImpl

public IloIntRangeI * getImpl() const

This member function returns a pointer to the implementation object of the invoking extractable object.

It is useful when you need to be sure that you are using the same copy of the object in more than one situation.

Returns:

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

getLast

public IloInt getLast() const

Returns the last item of the collection.

See Also:

Returns:

Returns the last item of the collection.

getLB

public IloInt getLB() const

Returns the lower bound of the domain.

Returns:

The lower bound, as an integer.

getNext

public IloInt getNext(IloInt value, IloInt n=1) const

This method returns the value next to a given argument in the set.

If the given value does not exist, it throws an exception.

If no value follows (that is, you are at the end of the set), it throws an exception.

See Also:

Parameters:

value
The value you want to return the value next to.
n
An offset to specify how many values to skip (n=0 corresponds to a return of the item itself).

Returns:

The value next to the given argument in the set.

getNextC

public IloInt getNextC(IloInt value, IloInt n=1) const

This method returns the value next to the given argument in the set.

If the given value does not exist, it throws an exception.

If no value follows (that is, you are at the end of the set), it will give you the first value (circular search).

See Also:

Parameters:

value
The value you want to return the next value for.
n
An offset to specify how many values to skip (n=0 corresponds to a return of the item itself).

Returns:

The value next to the given argument in the set.

getPrevious

public IloInt getPrevious(IloInt value, IloInt n=1) const

This method returns the value previous to the given argument in the set.

If the given value does not exist, it throws an exception.

If no value is previous (that is, you are at the beginning of the set), it throws an exception.

See Also:

Parameters:

value
The value you want to return the previous value for.
n
An offset to specify how many values to skip (n=0 corresponds to a return of the item itself).

Returns:

The value previous to the given argument in the set.

getPreviousC

public IloInt getPreviousC(IloInt value, IloInt n=1) const

This method returns the value previous to the given argument in the set.

If the given value does not exist, it throws an exception.

If no value is previous (that is, you are at the beginning of the set), it will give you the last value (circular search).

See Also:

Parameters:

value
The value you want to return the previous value for.
n
An offset to specify how many values to skip (n=0 corresponds to a return of the item itself).

Returns:

The value previous to the given argument in the set.

getUB

public IloInt getUB() const

Returns the upper bound of the domain.

Returns:

The upper bound, as an integer.