diff --git a/vroni/Include/approx.h b/vroni/Include/approx.h index 0fbff56..f5b139f 100644 --- a/vroni/Include/approx.h +++ b/vroni/Include/approx.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2003--2023 M. Held */ +/* Copyright (C) 2003--2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/arc_common.h b/vroni/Include/arc_common.h index 57b5546..0e2fb3e 100644 --- a/vroni/Include/arc_common.h +++ b/vroni/Include/arc_common.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2007-2023 M. Held, S. Huber */ +/* Copyright (C) 2007-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/basic.h b/vroni/Include/basic.h deleted file mode 100644 index a1c2b7d..0000000 --- a/vroni/Include/basic.h +++ /dev/null @@ -1,117 +0,0 @@ -/*****************************************************************************/ -/* */ -/* Copyright (C) 1999-2023 M. Held */ -/* */ -/* This code is not in the public domain. All rights reserved! Please make */ -/* sure to read the full copyright statement contained in "README.txt" or in */ -/* the "main" file of this code, such as "main.c". */ -/* */ -/*****************************************************************************/ -/* */ -/* Written by: Martin Held */ -/* */ -/* E-Mail: held@cs.sbg.ac.at */ -/* Fax Mail: (+43 662) 8044-611 */ -/* Voice Mail: (+43 662) 8044-6304 */ -/* Snail Mail: Martin Held */ -/* FB Informatik */ -/* Universitaet Salzburg */ -/* A-5020 Salzburg, Austria */ -/* */ -/*****************************************************************************/ - - - -#ifndef VRONI_BASIC_H -#define VRONI_BASIC_H - - -#include "consts.h" -#include "util.h" -#include "types.h" - - - -#define BASIC_MINI 1.0e-20 - -#ifndef RAND - -#define RND_MAX 2147483647 - -#define UniformRandom(x) \ -{\ - x = ((double) random()) / RND_MAX; } - -#define RandomInteger(N) \ - (\ - assert(N > 0), \ - basic_i_local = random(), \ - basic_i_local - (basic_i_local / (N)) * (N)) - -#define InitRandom(seed) \ -{\ - srandom(seed); } - -#else - -#ifdef RAND_MAX -#define RND_MAX RAND_MAX -#else -#define RND_MAX 32767 -#endif - -#define UniformRandom(x) \ -{\ - x = ((double) rand()) / RND_MAX; \ -} - -#define RandomInteger(N) \ - (\ - assert(N > 0), \ - basic_i_local = rand(), \ - basic_i_local - (basic_i_local / (N)) * (N)) - - -#define InitRandom(seed) \ -{\ - srand(seed); } - -#endif - - - - - - -/* -#define ScaleX(xc) (scale_factor * (xc - shift.x)) - -#define ScaleY(yc) (scale_factor * (yc - shift.y)) - -#define ScaleV(value) (value * scale_factor) - -#define UnscaleX(xc) (assert(scale_factor > 0.0), xc / scale_factor + shift.x) - -#define UnscaleY(yc) (assert(scale_factor > 0.0), yc / scale_factor + shift.y) - -#define UnscaleV(value) (assert(scale_factor > 0.0), value / scale_factor) -*/ - - - - -#define CirBBox(p, r, bb_min, bb_max) {\ - (bb_min).x = (p).x - r; \ - (bb_min).y = (p).y - r; \ - (bb_max).x = (p).x + r; \ - (bb_max).y = (p).y + r; } - - -#define TriBBox(a, b, c, bb_min, bb_max) {\ - MinMax3((a).x, (b).x, (c).x, (bb_min).x, (bb_max).x); \ - MinMax3((a).y, (b).y, (c).y, (bb_min).y, (bb_max).y); } - - - - -#endif diff --git a/vroni/Include/consts.h b/vroni/Include/consts.h index 26e2a22..6686819 100644 --- a/vroni/Include/consts.h +++ b/vroni/Include/consts.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2010-2023 M. Held, S. Huber */ +/* Copyright (C) 2010-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/coord.h b/vroni/Include/coord.h index 6927d76..a6b7db3 100644 --- a/vroni/Include/coord.h +++ b/vroni/Include/coord.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2010-2023 M. Held, S. Huber */ +/* Copyright (C) 2010-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/coreatan2.h b/vroni/Include/coreatan2.h index b24b68c..bc9ed06 100644 --- a/vroni/Include/coreatan2.h +++ b/vroni/Include/coreatan2.h @@ -1,5 +1,5 @@ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/defs.h b/vroni/Include/defs.h index 60302e5..3e83e08 100644 --- a/vroni/Include/defs.h +++ b/vroni/Include/defs.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ @@ -26,8 +26,8 @@ #include "mydefs.h" #define PROG_NAME "V R O N I" -#define PROG_VERSION "7.7" -#define PROG_YEAR "1999-2024" +#define PROG_VERSION "7.8" +#define PROG_YEAR "1999-2025" /* */ /* get the definitions for "exterior applications" */ diff --git a/vroni/Include/ext_appl_defs.h b/vroni/Include/ext_appl_defs.h index 97b0d03..939e370 100644 --- a/vroni/Include/ext_appl_defs.h +++ b/vroni/Include/ext_appl_defs.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2002--2023 M. Held */ +/* Copyright (C) 2002--2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/ext_appl_inout.h b/vroni/Include/ext_appl_inout.h index 289ac9e..e2c0a00 100644 --- a/vroni/Include/ext_appl_inout.h +++ b/vroni/Include/ext_appl_inout.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2003--2023 M. Held */ +/* Copyright (C) 2003--2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/ext_appl_vroni_object.h b/vroni/Include/ext_appl_vroni_object.h index b3103a6..2e725bc 100644 --- a/vroni/Include/ext_appl_vroni_object.h +++ b/vroni/Include/ext_appl_vroni_object.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2002--2023 M. Held */ +/* Copyright (C) 2002--2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/fpkernel.h b/vroni/Include/fpkernel.h index 9586052..81be5c9 100644 --- a/vroni/Include/fpkernel.h +++ b/vroni/Include/fpkernel.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/geom.h b/vroni/Include/geom.h index 61b6f4f..6b52598 100644 --- a/vroni/Include/geom.h +++ b/vroni/Include/geom.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2010-2023 M. Held, S. Huber */ +/* Copyright (C) 2010-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/header.h b/vroni/Include/header.h index 1de4e17..7669925 100644 --- a/vroni/Include/header.h +++ b/vroni/Include/header.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/intersections.h b/vroni/Include/intersections.h index e797fb0..30c9130 100644 --- a/vroni/Include/intersections.h +++ b/vroni/Include/intersections.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/io_dxf.h b/vroni/Include/io_dxf.h index 639664e..ce6f7f0 100644 --- a/vroni/Include/io_dxf.h +++ b/vroni/Include/io_dxf.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2003--2023 M. Held */ +/* Copyright (C) 2003--2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/ipe_io.h b/vroni/Include/ipe_io.h index 640c5a1..5e5f371 100644 --- a/vroni/Include/ipe_io.h +++ b/vroni/Include/ipe_io.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1996-2023 M. Held */ +/* Copyright (C) 1996-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/numerics.h b/vroni/Include/numerics.h index 2bc697f..bfcea30 100644 --- a/vroni/Include/numerics.h +++ b/vroni/Include/numerics.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/offset.h b/vroni/Include/offset.h index 385e051..35cf8db 100644 --- a/vroni/Include/offset.h +++ b/vroni/Include/offset.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/random.h b/vroni/Include/random.h index f6fe9ec..a5a54ba 100644 --- a/vroni/Include/random.h +++ b/vroni/Include/random.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ @@ -23,42 +23,41 @@ #ifndef VRONI_RANDOM_H #define VRONI_RANDOM_H -#include "defs.h" #ifndef RAND -#define RND_MAX 2147483647 +#ifdef RANDOM_R -#define UniformRandom(x) \ +#define RandomInteger(N, result) \ {\ - x = ((double) random()) / RND_MAX; } + assert(N > 0); \ + random_r(rdata, &result); \ + result = result % N;} + +#define InitRandom(seed) \ +{\ + rdata = (random_data*) calloc(1,sizeof(struct random_data)); \ + initstate_r(seed, statebuf, 8, rdata); } -#define RandomInteger(N) \ - (\ - assert(N > 0), \ - random() % N) +#else + +#define RandomInteger(N, result) \ +{\ + assert(N > 0); \ + result = random() % N;} #define InitRandom(seed) \ {\ srandom(seed); } -#else - -#ifdef RAND_MAX -#define RND_MAX RAND_MAX -#else -#define RND_MAX 32767 #endif -#define UniformRandom(x) \ -{\ - x = ((double) rand()) / RND_MAX; \ -} +#else -#define RandomInteger(N) \ - (\ - assert(N > 0), \ - rand() % N) +#define RandomInteger(N, result) \ +{\ + assert(N > 0); \ + result = rand() % N;} #define InitRandom(seed) \ {\ diff --git a/vroni/Include/roots.h b/vroni/Include/roots.h index f370e91..bae89ed 100644 --- a/vroni/Include/roots.h +++ b/vroni/Include/roots.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/stack.h b/vroni/Include/stack.h index 5f01c59..7c5e99c 100644 --- a/vroni/Include/stack.h +++ b/vroni/Include/stack.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2000-2023 M. Held */ +/* Copyright (C) 2000-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/types.h b/vroni/Include/types.h index 32e2ea5..d0ecc6a 100644 --- a/vroni/Include/types.h +++ b/vroni/Include/types.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2001-2023 M. Held */ +/* Copyright (C) 2001-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/util.h b/vroni/Include/util.h index d0a22ce..e306a95 100644 --- a/vroni/Include/util.h +++ b/vroni/Include/util.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2010-2023 M. Held, S. Huber */ +/* Copyright (C) 2010-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/vd_data.h b/vroni/Include/vd_data.h index 8acf391..546ae92 100644 --- a/vroni/Include/vd_data.h +++ b/vroni/Include/vd_data.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2001-2023 M. Held */ +/* Copyright (C) 2001-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/vddata.h b/vroni/Include/vddata.h index 6804bfb..d61e73e 100644 --- a/vroni/Include/vddata.h +++ b/vroni/Include/vddata.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2010-2023 M. Held, S. Huber */ +/* Copyright (C) 2010-2025 M. Held, S. Huber */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/vroni_object.h b/vroni/Include/vroni_object.h index 44a9693..d913e51 100644 --- a/vroni/Include/vroni_object.h +++ b/vroni/Include/vroni_object.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ @@ -76,7 +76,7 @@ /* from vd_basic.cc */ -#define VRONI_MAXSOL 80 +#define VRONI_MAXSOL 160 /* from header.h */ @@ -996,7 +996,7 @@ public: int io_flag; int inputprec; int mpfr_prec; - int vr_seed; + int vr_seed{0}; double t_offset; double d_offset; @@ -1983,6 +1983,8 @@ public: /* arc_arc_arc.cc: */ + vr_bool CouldBeFine(double eps, coord c1, double rr1, coord c3, double rr3); + vr_bool ArcArcArcCntr(int i, int j, int k, int e, coord *cntr, double *r2, vr_bool *problematic, int* site); @@ -2545,6 +2547,10 @@ public: int m_num_rnd_sites; int m_max_num_rnd_sites; int m_cur_rnd_sites; +#ifdef RANDOM_R + struct random_data *rdata; + char statebuf[8]; +#endif #endif #ifdef FORCED @@ -2930,9 +2936,6 @@ public: double AbsPntLineDist(double_arg a, double_arg b, double_arg c, const coord & p); - /** Compute a uniform distributed random point */ - coord UniformRandomPoint(); - vr_bool IsBetweenVoronoiNodes(int e, const coord & p, double eps); diff --git a/vroni/Include/vronivector.h b/vroni/Include/vronivector.h index 9b1678a..dcf4d68 100644 --- a/vroni/Include/vronivector.h +++ b/vroni/Include/vronivector.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 1999-2023 M. Held */ +/* Copyright (C) 1999-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Include/wmat.h b/vroni/Include/wmat.h index 1172709..3a8a02a 100644 --- a/vroni/Include/wmat.h +++ b/vroni/Include/wmat.h @@ -1,6 +1,6 @@ /*****************************************************************************/ /* */ -/* Copyright (C) 2001-2023 M. Held */ +/* Copyright (C) 2001-2025 M. Held */ /* */ /* This code is not in the public domain. All rights reserved! Please make */ /* sure to read the full copyright statement contained in "README.txt" or in */ diff --git a/vroni/Lib/vroniD32.lib b/vroni/Lib/vroniD32.lib index 365e5cb..9a49285 100644 Binary files a/vroni/Lib/vroniD32.lib and b/vroni/Lib/vroniD32.lib differ diff --git a/vroni/Lib/vroniD32.pdb b/vroni/Lib/vroniD32.pdb index e7a8140..97eb1ae 100644 Binary files a/vroni/Lib/vroniD32.pdb and b/vroni/Lib/vroniD32.pdb differ diff --git a/vroni/Lib/vroniD64.lib b/vroni/Lib/vroniD64.lib index 66755ca..7664f10 100644 Binary files a/vroni/Lib/vroniD64.lib and b/vroni/Lib/vroniD64.lib differ diff --git a/vroni/Lib/vroniR32.lib b/vroni/Lib/vroniR32.lib index 7d86273..674ba7b 100644 Binary files a/vroni/Lib/vroniR32.lib and b/vroni/Lib/vroniR32.lib differ diff --git a/vroni/Lib/vroniR64.lib b/vroni/Lib/vroniR64.lib index 3d28780..b5662ed 100644 Binary files a/vroni/Lib/vroniR64.lib and b/vroni/Lib/vroniR64.lib differ