https://github.com/janverschelde/PHCpack
Tip revision: d0ef301f4f3c73f0bdaa10e33582df27c5e6f38a authored by Jan Verschelde on 19 July 2017, 02:29:47 UTC
listed the four types of homotopies which involve witness sets in the phcpy documentation
listed the four types of homotopies which involve witness sets in the phcpy documentation
Tip revision: d0ef301
idle_queue.c
#include "idle_queue.h"
#include <stdlib.h>
#include <stdio.h>
IDLE_ELEMENT* addslv (IDLE_ELEMENT * listp, int data)
{
IDLE_ELEMENT *lp = listp;
if (listp != NULL)
{
while (listp -> link != NULL)
listp = (IDLE_ELEMENT *)listp -> link;
listp -> link = (IDLE_ELEMENT *) malloc (sizeof (IDLE_ELEMENT));
listp = (IDLE_ELEMENT *)listp -> link;
listp -> link = NULL;
listp -> data = data;
return lp;
}
else
{
listp = (IDLE_ELEMENT *) malloc (sizeof(IDLE_ELEMENT));
listp -> link = NULL;
listp -> data = data;
return listp;
}
}
IDLE_ELEMENT* removeslv (IDLE_ELEMENT *lp)
{
IDLE_ELEMENT * tempp;
int temp = lp->data;
/* printf ("Element removed is %d\n", temp); */
tempp = (IDLE_ELEMENT *)lp -> link;
free (lp);
return tempp;
}
int num_idle(IDLE_ELEMENT * lp)
{
if (lp != NULL)
return 1+num_idle((IDLE_ELEMENT *)lp->link);
else
return 0;
}