mcknap.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <stdarg.h>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <memory.h>
#include <sys/times.h>
#include <unistd.h>
Go to the source code of this file.
Classes |
| struct | partvect |
| struct | itemrec |
| struct | itemset |
| struct | partset |
| struct | isetset |
| struct | ordrec |
| struct | ordintv |
| struct | ordstack |
| struct | solrec |
| struct | solstruct |
| struct | allinfo |
Defines |
| #define | MCKNAP_RC_OK 0 |
| #define | MCKNAP_RC_INF 1 |
| #define | MCKNAP_RC_TRIVIAL_MAXSUM 2 |
| #define | TRACELEVEL 10 |
| #define | START 1 |
| #define | TESTS 100 |
| #define | _INCLUDE_POSIX_SOURCE |
| #define | srand(x) srand48(x) |
| #define | random(x) (lrand48() % (x)) |
| #define | SYNC 5 |
| #define | MEDIMAX 15 |
| #define | MAXSTACK 100 |
| #define | MAXLIST 32 |
| #define | MAXVTYPE ULONG_MAX |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | MAXIMIZE 1 |
| #define | MINIMIZE 0 |
| #define | DET(a1, a2, b1, b2) ((a1) * (stype) (b2) - (a2) * (stype) (b1)) |
| #define | SWAPS(a, b) { register itemset t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define | SWAPI(a, b) { register itemrec t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define | SWAPO(a, b) { register ordrec t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define | SIZE(a) ((int) (((a)->lset+1)-(a)->fset)) |
| #define | DEBUG(x) |
Typedefs |
| typedef int | boolean |
| typedef int | ntype |
| typedef int | itype |
| typedef double | stype |
| typedef unsigned long | vtype |
| typedef int(* | funcptr )(const void *, const void *) |
Functions |
| int | minmcknapSolve (int cap, isetset *head, itemrec *solRec, stype *minObj) |
| void | visitems (itemset *d) |
| void | inittrace (char *ext) |
Define Documentation
| #define MCKNAP_RC_TRIVIAL_MAXSUM 2 |
| #define _INCLUDE_POSIX_SOURCE |
| #define srand |
( |
x |
|
) |
srand48(x) |
| #define random |
( |
x |
|
) |
(lrand48() % (x)) |
| #define MAXVTYPE ULONG_MAX |
| #define DET |
( |
a1, |
|
|
a2, |
|
|
b1, |
|
|
b2 |
|
) |
((a1) * (stype) (b2) - (a2) * (stype) (b1)) |
| #define SWAPS |
( |
a, |
|
|
b |
|
) |
{ register itemset t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define SWAPI |
( |
a, |
|
|
b |
|
) |
{ register itemrec t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define SWAPO |
( |
a, |
|
|
b |
|
) |
{ register ordrec t; t=*(a); *(a)=*(b); *(b)=t; } |
| #define SIZE |
( |
a |
|
) |
((int) (((a)->lset+1)-(a)->fset)) |
Typedef Documentation
| typedef unsigned long vtype |
| typedef int(* funcptr)(const void *, const void *) |
Function Documentation
| void inittrace |
( |
char * |
ext |
) |
|