39 #include "quickhvolume.h"
57 void* console(
void *threadid)
78 while(scanf(
"%[^\n]\n", line) > 0)
84 memset(jd.
r, 0, NPOINTS*
sizeof(
double));
109 main(
int argc,
char** argv)
115 fprintf(stderr,
"usage: qhv <#threads> <#inputfile>\n");
121 if (argc > 1) sscanf(argv[1],
"%d", &t);
122 if (argc > 2) stdin = fopen(argv[2],
"r");
123 if (argc > 3) max = atof(argv[3]);
125 printf(
"Copyright (c) Year(s), 2013, Luis M. S. Russo and Alexandre \n");
126 printf(
"P. Francisco / KDBIO / INESC-ID, <qhv@kdbio.inesc-id.pt> \n");
128 printf(
"Any published media that is related with to use of the distributed \n");
129 printf(
"software, or derived software, must contain a reference to \"Luís \n");
130 printf(
"M. S. Russo, Alexandre P. Francisco: Extending quick hypervolume. \n");
131 printf(
"J. Heuristics 22(3): 245-271 (2016).\" \n");
133 printf(
"Permission to use, copy, modify, and/or distribute this software for \n");
134 printf(
"any purpose with or without fee is hereby granted, provided that the \n");
135 printf(
"above copyright notice and this permission notice appear in all \n");
136 printf(
"copies. \n");
138 printf(
"THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL \n");
139 printf(
"WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED \n");
140 printf(
"WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE \n");
141 printf(
"AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL \n");
142 printf(
"DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR \n");
143 printf(
"PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER \n");
144 printf(
"TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR \n");
145 printf(
"PERFORMANCE OF THIS SOFTWARE. \n");
151 struct timespec ts_before, ts_after;
154 clock_gettime(CLOCK_MONOTONIC_RAW, &ts_before);
156 launch(t, console, quickHVolumeS, openBox, closeBox, priority, jobCopy, taskCopy, merge, publish);
159 clock_gettime(CLOCK_MONOTONIC_RAW, &ts_after);
166 if (argc > 2) fclose(stdin);
168 printf(
"Time: %f (s)\n", ts_after.tv_sec + ts_after.tv_nsec * 1e-9 - ts_before.tv_sec - ts_before.tv_nsec * 1e-9);
This returns iterators for diferent type. WARNING, these objects are singleton, so new overwrites exi...
Simple point interface. Contains simple point manipulation functions.
A splitter for storing classified points. The splitter is an array that grows dinamically, when all points are inserted they are separeted into classes by sorting. Preferably count sort or hased count sort.
void parsePoint(char *S, point *p, double max)
Structure for uniting two sets, without repetition.
Inclusion Exclusion Algorithm better than HSO for high d and small n.
Header: copy naiverandom.