Go to the documentation of this file.00001 #ifndef _DJS_MISC_H_
00002 #define _DJS_MISC_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include"LinkedList.h"
00020
00038 #define max(x,y) (x > y? x:y)
00039 #define min(x,y) (x < y? x:y)
00040
00041 int nodeComparator(void* node1, void* node2);
00042
00043 void printArray(int* array, int size);
00044
00045 void printArrayOfLinkedLists(LinkedList** listOfLists, int size);
00046
00047 void printInt(void* integer);
00048
00049 void destroyCliqueResults(LinkedList* cliques);
00050
00051 LinkedList** readInGraphAdjList(int* n, int* m);
00052
00053 void runAndPrintStatsMatrix(long (*function)(char**,
00054 #ifdef RETURN_CLIQUES_ONE_BY_ONE
00055 LinkedList*,
00056 #endif
00057 int),
00058 const char* algName,
00059 char** adjMatrix,
00060 #ifdef RETURN_CLIQUES_ONE_BY_ONE
00061 LinkedList* cliques,
00062 #endif
00063 int n );
00064
00065 void runAndPrintStatsListList( long (*function)(LinkedList**,
00066 int**,
00067 #ifdef RETURN_CLIQUES_ONE_BY_ONE
00068 LinkedList*,
00069 #endif
00070 int*, int),
00071 const char* algName,
00072 LinkedList** adjListLinked,
00073 int** adjListArray,
00074 #ifdef RETURN_CLIQUES_ONE_BY_ONE
00075 LinkedList* cliques,
00076 #endif
00077 int* degree,
00078 int n );
00079
00080
00081 inline void processClique(
00082 #ifdef RETURN_CLIQUES_ONE_BY_ONE
00083 LinkedList *cliques,
00084 #endif
00085 LinkedList *clique);
00086 #endif
00087