FRAMES NO FRAMES

Class IloNHoodArray

Definition file: ilsolver/iimnhood.h
Include file: <ilsolver/iimls.h>

The class IloNHoodArray is the class for an array of instances of IloNHood.

See Also:

Constructor Summary
public IloNHoodArray()
public IloNHoodArray(IloNHoodArrayI * impl)
public IloNHoodArray(const IloNHoodArray & array)
public IloNHoodArray(IloEnv env, IloInt size)
Method Summary
public IloEnvgetEnv() const
public IloNHoodArrayI *getImpl() const
public IloIntgetSize() const
public voidoperator=(const IloNHoodArray & array)
public IloNHoodoperator[](IloInt i) const
public IloNHood &operator[](IloInt i)
Constructor Detail

IloNHoodArray

public IloNHoodArray()

This constructor creates an uninitialized array of neighborhoods. The index range of the array is undefined. The array must be assigned before it can be used.


IloNHoodArray

public IloNHoodArray(IloNHoodArrayI * impl)

This constructor creates a handle object (an instance of the class IloNHoodArray) from a pointer to an object (an instance of the implementation class IloNHoodArrayI).


IloNHoodArray

public IloNHoodArray(const IloNHoodArray & array)

This copy constructor creates a handle from a reference to a neighborhood array. That neighborhood array and array both point to the same implementation object.


IloNHoodArray

public IloNHoodArray(IloEnv env, IloInt size)

This constructor creates an array of size neighborhoods associated with environment env. The index range of the array is [0..size), where 0 is included but size is excluded. The argument size must be strictly greater than 0 (zero).


Method Detail

getEnv

public IloEnv getEnv() const

This member function returns the environment associated with the invoking array.


getImpl

public IloNHoodArrayI * getImpl() const

This member function returns the implementation object of the invoking handle. You can use this member function to check whether an array is empty.


getSize

public IloInt getSize() const

This member function returns the number of neighborhoods in the invoking array.


operator=

public void operator=(const IloNHoodArray & array)

This assignment operator copies array into the invoking array by assigning an address to the handle pointer of the invoking object. That address is the location of the implementation object of the argument array.


operator[]

public IloNHood operator[](IloInt i) const

This subscripting operator returns the neighborhood corresponding to rank i in the invoking neighborhood array.


operator[]

public IloNHood & operator[](IloInt i)

This operator returns a reference to the element at rank i. This operator can be used for accessing (that is, simply reading) the element or for modifying (that is, writing) it.