1 /***************************************************************************** 2 FILE : $Source: /projects/higgs1/SNNS/CVS/SNNS/tools/sources/snns2clib.h,v $ 3 SHORTNAME : snns2clib.h 4 SNNS VERSION : 4.2 5 6 PURPOSE : Headerfile for including the snns2c-library 7 8 AUTHOR : Berward Kett 9 DATE : 30.01.95 10 11 CHANGED BY : Michael Vogt 12 RCS VERSION : $Revision: 1.5 $ 13 LAST CHANGE : $Date: 1998/02/25 15:34:50 $ 14 15 Copyright (c) 1990-1995 SNNS Group, IPVR, Univ. Stuttgart, FRG 16 Copyright (c) 1996-1998 SNNS Group, WSI, Univ. Tuebingen, FRG 17 18 ******************************************************************************/ 19 20 /* Recordtype for Lists (Sets) */ 21 22 typedef struct { 23 int place; /* No of Elements wich can be hold in the list */ 24 int no; /* No of actual Elements in the list */ 25 int *values; /* Pointer to the Elements */ 26 } tList, *pList; 27 28 #define NoOf(list) list->no 29 #define element(list, no) list->values[no] 30 31 extern pList newList(void); /* creates a new set */ 32 extern void killList(pList list); /* deletes a set */ 33 extern int copyList(pList dest, pList source); /* copies a set */ 34 extern int searchList(pList list, int member); /* searches for a member */ 35 extern int isMember(pList list, int member); /* checks if member is element of list */ 36 extern int addList(pList list, int member); /* adds a new element */ 37 extern void remList(pList list, int member); /* removes an element */ 38 extern void intersectList(pList dest, pList source); /* calculates the intersection */ 39 extern int haveIntersection(pList list1, pList list2); /* does intersection exists */ 40 extern int mergeList(pList dest, pList source); /* calculates the union of two sets */ 41 extern int CompareSources( pList dest, pList source); /* compares two elements, wether their sources are the same */ 42