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

Definition at line 549 of file misc.c.

References BMSallocMemory, MAX, NULL, queueResize(), SCIP_ALLOC, SCIP_CALL, and SCIP_OKAY.

Referenced by SCIPconshdlrCreate().

void SCIPqueueFree ( SCIP_QUEUE **  queue)

frees queue, but not the data elements themselves

Parameters
queuepointer to a queue

Definition at line 573 of file misc.c.

References BMSfreeMemory, BMSfreeMemoryArray, and NULL.

Referenced by SCIPconshdlrFree().

void SCIPqueueClear ( SCIP_QUEUE queue)

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

Parameters
queuequeue

Definition at line 584 of file misc.c.

References SCIP_Queue::firstfree, SCIP_Queue::firstused, and NULL.

SCIP_RETCODE SCIPqueueInsert ( SCIP_QUEUE queue,
void *  elem 
)

inserts element at the end of the queue

Parameters
queuequeue
elemelement to be inserted

Definition at line 595 of file misc.c.

References BMSmoveMemoryArray, SCIP_Queue::firstfree, SCIP_Queue::firstused, NULL, queueResize(), SCIP_CALL, SCIP_OKAY, SCIP_Queue::size, and SCIP_Queue::slots.

Referenced by SCIPconsPushProp().

void* SCIPqueueRemove ( SCIP_QUEUE queue)

removes and returns the first element of the queue

Parameters
queuequeue

Definition at line 639 of file misc.c.

References SCIP_Queue::firstfree, SCIP_Queue::firstused, NULL, SCIP_Queue::size, and SCIP_Queue::slots.

Referenced by SCIPconshdlrPopProp().

void* SCIPqueueFirst ( SCIP_QUEUE queue)

returns the first element of the queue without removing it

Parameters
queuequeue

Definition at line 673 of file misc.c.

References SCIP_Queue::firstfree, SCIP_Queue::firstused, NULL, SCIP_Queue::size, and SCIP_Queue::slots.

Referenced by SCIPconshdlrFrontProp().

SCIP_Bool SCIPqueueIsEmpty ( SCIP_QUEUE queue)

returns whether the queue is empty

Parameters
queuequeue

Definition at line 691 of file misc.c.

References SCIP_Queue::firstfree, SCIP_Queue::firstused, NULL, and SCIP_Queue::size.

Referenced by SCIPconshdlrExit(), SCIPconshdlrExitpre(), SCIPconshdlrFrontProp(), and SCIPconshdlrPopProp().

int SCIPqueueNElems ( SCIP_QUEUE queue)

returns the number of elements in the queue

Parameters
queuequeue

Definition at line 704 of file misc.c.

References SCIP_Queue::firstfree, SCIP_Queue::firstused, NULL, and SCIP_Queue::size.