Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

Functions

SCIP_RETCODE SCIPqueueCreate (SCIP_QUEUE **queue, int initsize, SCIP_Real sizefac)
 
void SCIPqueueFree (SCIP_QUEUE **queue)
 
void SCIPqueueClear (SCIP_QUEUE *queue)
 
SCIP_RETCODE SCIPqueueInsert (SCIP_QUEUE *queue, void *elem)
 
void * SCIPqueueRemove (SCIP_QUEUE *queue)
 
void * SCIPqueueFirst (SCIP_QUEUE *queue)
 
SCIP_Bool SCIPqueueIsEmpty (SCIP_QUEUE *queue)
 
int SCIPqueueNElems (SCIP_QUEUE *queue)
 

Function Documentation

SCIP_RETCODE SCIPqueueCreate ( SCIP_QUEUE **  queue,
int  initsize,
SCIP_Real  sizefac 
)

creates a (circular) queue, best used if the size will be fixed or will not be increased that much

Parameters
queuepointer to the new queue
initsizeinitial number of available element slots
sizefacmemory growing factor applied, if more element slots are needed
void SCIPqueueFree ( SCIP_QUEUE **  queue)

frees queue, but not the data elements themselves

Parameters
queuepointer to a queue
void SCIPqueueClear ( SCIP_QUEUE queue)

clears the queue, but doesn't free the data elements themselves

Parameters
queuequeue
SCIP_RETCODE SCIPqueueInsert ( SCIP_QUEUE queue,
void *  elem 
)

inserts element at the end of the queue

Parameters
queuequeue
elemelement to be inserted
void* SCIPqueueRemove ( SCIP_QUEUE queue)

removes and returns the first element of the queue

Parameters
queuequeue
void* SCIPqueueFirst ( SCIP_QUEUE queue)

returns the first element of the queue without removing it

Parameters
queuequeue
SCIP_Bool SCIPqueueIsEmpty ( SCIP_QUEUE queue)

returns whether the queue is empty

Parameters
queuequeue
int SCIPqueueNElems ( SCIP_QUEUE queue)

returns the number of elements in the queue

Parameters
queuequeue