Skip to main content
FRAMES NO FRAMES

Class IloSymbolSet

Definition file: ilopl/ilosymbol.h
Map of IloSymbolSetIloSymbolSetIloSymbolSet
This class represents a domain composed of an enumeration of symbols.

The class IloSymbolSet is used to represent a collection of string values with no duplicate.

See Also:

Method Summary
public voidadd(const char * elt)
public IloBoolcontains(const char * elt) const
public voiddisplay(ostream & out) const
public IloSymbolgetNext(const char * value, IloInt n=1) const
public IloSymbolgetNextC(const char * value, IloInt n=1) const
public IloSymbolgetPrevious(const char * value, IloInt n=1) const
public IloSymbolgetPreviousC(const char * value, IloInt n=1) const
public IloBoolisSymbolSet() const
public voidremove(const char * elt)
public voidsetIntersection(const char * elt)
Inner Class
IloSymbolSet::Iterator This class is an iterator that traverses the elements of a finite set of string values.
Method Detail

add

public void add(const char * elt)

This member function adds elt to the invoking set. By adds, we mean that the invoking set becomes the union of its former elements and the new elt. Concert does not take ownership of this string.

Parameters:

elt
the string that will be stored as an IloSymbol.

contains

public IloBool contains(const char * elt) const

This member function returns a Boolean value (zero or one) that specifies whether elt is an element of the invoking set. The value one specifies that the invoking set contains elt; the value zero specifies that the invoking set does not contain elt.

Parameters:

elt
the string.

Returns:

A Boolean that specifies whether (one) or not (zero) elt is an element of the invoking set.

display

public void display(ostream & out) const

Displays the set


getNext

public IloSymbol getNext(const char * 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 there is no next value, that is, if you are at the end of the set, it throws an exception.

See Also:

Parameters:

value
A string.
n
An integer that specifies the position from which to find the next value.

Returns:

An IloSymbol containing the value next to the given argument.

getNextC

public IloSymbol getNextC(const char * 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 there is no next value, that is, if you are at the end of the set, it returns the first value (circular search).

See Also:

Parameters:

value
A string.
n
An integer that specifies the position from which to find the next value.

Returns:

An IloSymbol containing the value next to the given argument.

getPrevious

public IloSymbol getPrevious(const char * 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 there is no previous value, that is, if you are at the beginning of the set, it throws an exception.

See Also:

Parameters:

value
A string.
n
An integer that specifies the position from which to find the previous value.

Returns:

An IloSymbol containing the value previous to the given argument.

getPreviousC

public IloSymbol getPreviousC(const char * 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 there is no previous value, that is, if you are at the beginning of the set, it returns the last value (circular search).

See Also:

Parameters:

value
A string.
n
An integer that specifies the position from which to find the previous value.

Returns:

An IloSymbol containing the value previous to the given argument.

isSymbolSet

public IloBool isSymbolSet() const

This member function checks whether the domain is a set of string values.

See Also:

Returns:

IloTrue if the given domain is a set of string values.

remove

public void remove(const char * elt)

This member function removes elt from the invoking set.

Parameters:

elt
the string you want to remove from the collection.

setIntersection

public void setIntersection(const char * elt)

This member function changes the invoking set so that it includes only the element specified by elt. In other words, the invoking set becomes the intersection of its former elements with elt.

Parameters:

elt
a string.