1 // Copyright (c) 2006-2009 Max-Planck-Institute Saarbruecken (Germany). 2 // All rights reserved. 3 // 4 // This file is part of CGAL (www.cgal.org) 5 // 6 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h $ 7 // $Id: flags.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot 8 // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial 9 // 10 // 11 // Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de> 12 // 13 // ============================================================================ 14 15 16 17 #ifndef CGAL_ACK_FLAGS_H 18 #define CGAL_ACK_FLAGS_H 1 19 20 // TODO: use new interface and remove this flag 21 #ifndef CGAL_AK_ENABLE_DEPRECATED_INTERFACE 22 #define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 0 23 #endif 24 25 // Is debug-information printed? 26 #ifndef CGAL_ACK_DEBUG_FLAG 27 #define CGAL_ACK_DEBUG_FLAG 0 28 #endif 29 30 // If CGAL_ACK_DEBUG_FLAG is set, which output stream is used for debug? 31 #ifndef CGAL_ACK_DEBUG_PRINT 32 #define CGAL_ACK_DEBUG_PRINT std::cout 33 #endif 34 35 // If enabled, needs includes from experimental package 36 #ifndef CGAL_ACK_WITH_FILTERED_KERNEL 37 #define CGAL_ACK_WITH_FILTERED_KERNEL 0 38 #endif 39 40 // If enabled, needs includes from experimental package 41 #ifndef CGAL_ACK_WITH_ROTATIONS 42 #define CGAL_ACK_WITH_ROTATIONS 0 43 #endif 44 45 /** 46 * The threshold that is used in the Filtered_algebraic_curve_kernel_2 47 */ 48 #ifndef CGAL_ACK_THRESHOLD_FOR_FILTERED_KERNEL 49 #define CGAL_ACK_THRESHOLD_FOR_FILTERED_KERNEL 0.01 50 #endif 51 52 /** 53 * For random choices in the algorithm, this seed is used 54 * If set to zero, a random seed is used 55 */ 56 #ifndef CGAL_ACK_STATIC_SEED 57 #define CGAL_ACK_STATIC_SEED 0 58 #endif 59 60 /** 61 * Allows to use the Bitstream tree described in Eigenwillig's thesis 62 */ 63 #ifndef CGAL_ACK_BITSTREAM_USES_E08_TREE 64 #define CGAL_ACK_BITSTREAM_USES_E08_TREE 1 65 #endif 66 67 68 /** 69 * If set, the program uses the AlciX-code 70 * for the curve- and curve-pair-analysis. 71 * This flag is only for debugging purposes. 72 */ 73 #ifndef CGAL_ACK_USE_EXACUS 74 #define CGAL_ACK_USE_EXACUS 0 75 #endif 76 77 /** 78 * If set, the curve and curve pair analysis are using specialized code 79 * to analyse conic curves, i.e. curves of degree 2 80 */ 81 #ifndef CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX 82 #define CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX 0 83 #endif 84 85 /** 86 * The curve analysis does not distinguish between "(1,1)-singularities" 87 * (i.e., vertical cusps, isolated points on arcs), and usual regular points. 88 * The candidate point on each status line can be checked for being singular 89 * using this flag. This gives additional information but increases 90 * compuation time 91 * 92 * WARNING: Currently, the status line does not store the additional 93 * information whether a point is singluar or not. 94 * Therefore, there is currently no reasons to set this flag. It is still 95 * contained for possible further extension of the status line. 96 */ 97 #ifndef CGAL_ACK_CHECK_CANDIDATE_FOR_SINGULARITY 98 #define CGAL_ACK_CHECK_CANDIDATE_FOR_SINGULARITY 0 99 #endif 100 101 /** 102 * If set to 1, curve pairs are not checked for coprimality. Only do this 103 * if you know what you are doing! 104 */ 105 #ifndef CGAL_ACK_DONT_CHECK_POLYNOMIALS_FOR_COPRIMALITY 106 #define CGAL_ACK_DONT_CHECK_POLYNOMIALS_FOR_COPRIMALITY 0 107 #endif 108 109 /** 110 * The "resultant first" strategy means: instead of computing the full 111 * subresultant sequence (or Sturm-Habicht sequence), the algorithm 112 * only computed the resultant in a first step. This suffices already for 113 * many curves (i.e., regular ones). The full subresultant is computed 114 * if it is needed for the first time. 115 * 116 * This strategy only makes sense if computing resultants is faster than 117 * computing subresultants, otherwise, it wastes computation time. 118 * Since resultant computation is done by interpolation, 119 * it is faster than the pseudo-remainder based subresultant computation. 120 */ 121 #ifndef CGAL_ACK_RESULTANT_FIRST_STRATEGY 122 #define CGAL_ACK_RESULTANT_FIRST_STRATEGY 1 123 #endif 124 125 /** 126 * If CGAL_ACK_RESULTANT_FIRST_STRATEGY is set, this flag determines 127 * for which curves the "resultant first" strategy is used. Depending 128 * on the resultant algorithm, the strategy might only be advantageous 129 * for higher degree curves 130 * 131 * If CGAL_ACK_RESULTANT_FIRST_STRATEGY is not set, this flag has no effect 132 */ 133 #ifndef CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD 134 #define CGAL_ACK_RESULTANT_FIRST_STRATEGY_DEGREE_THRESHOLD 0 135 #endif 136 137 /** 138 * Subresultants can be computed by a polynomial remainder sequence (default), 139 * or by evaluating minors of the bezout matrix by setting this flag. 140 * Tests have shown that the polynomial remainder sequence is more efficient 141 * so it is not recommended to set this flag. 142 */ 143 #ifndef CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS 144 #define CGAL_ACK_USE_BEZOUT_MATRIX_FOR_SUBRESULTANTS 0 145 #endif 146 147 /** 148 * Allows to switch off the specialized method for Status_line_CPA_1 149 * if multiplicity is zero or one. 150 * Since this methods improves the performance, 151 * it is not recommended to set this flag unless for testing 152 */ 153 #ifndef ACK_CGAL_NO_ARC_FLIP 154 #define ACK_CGAL_NO_ARC_FLIP 0 155 #endif 156 157 /** 158 * This flags defines the default strategy to handle degenerate curves 159 * There are three choices currently available: 160 * SHEAR_STRATEGY performs a shear whenever a degenerate situation occurs. 161 * SHEAR_ONLY_AT_IRRATIONAL_STRATEGY handles rational coordinates with 162 * a more direct method, but performs a shear for irrational x-coordinates 163 * that have a degeneracy. Finally, EXCEPTION_STRATEGY throws an exception 164 * whenever a degeneracy occurs. 165 */ 166 #ifndef CGAL_ACK_DEFAULT_DEGENERACY_STRATEGY 167 //#define CGAL_ACK_DEFAULT_DEGENERACY_STRATEGY CGAL::SHEAR_ONLY_AT_IRRATIONAL_STRATEGY 168 #define CGAL_ACK_DEFAULT_DEGENERACY_STRATEGY CGAL::SHEAR_STRATEGY 169 #endif 170 171 /** 172 * The algorithm can also handle non-y-regular curves without shearing, 173 * in case that the resultant multiplicity at vertical asymptotes is one. 174 * This special treatement can be switched off by setting this flag. 175 * It is not recommended to do this because of efficiency 176 */ 177 #ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES 178 #define CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES 0 179 #endif 180 181 /** 182 * At some points in the algorithm, it is checked whether a polynomial 183 * H(x):=h(p(x),q(x)) vanishes for an algebraic number x_0 with polynomial r. 184 * For that check, the computation of H is done modulo r for efficiency. 185 * This can be switched off by this flag, though it is recommended not to 186 * do so. 187 */ 188 #ifndef CGAL_ACK_USE_NO_REDUCTION_MODULO_RESULTANT 189 #define CGAL_ACK_USE_NO_REDUCTION_MODULO_RESULTANT 0 190 #endif 191 192 #ifndef CGAL_AK_DONT_USE_SIMPLE_BOUND_BETWEEN 193 #define CGAL_AK_DONT_USE_SIMPLE_BOUND_BETWEEN 0 194 #endif 195 196 /** 197 * These flags are experimental, concerning interval arithmetic methods 198 * Don't change them! 199 */ 200 #ifndef CGAL_ACK_USE_DERIVATIVE_OPTION 201 #define CGAL_ACK_USE_DERIVATIVE_OPTION 0 202 #endif 203 #ifndef CGAL_ACK_USE_BISECTION_OPTION 204 #define CGAL_ACK_USE_BISECTION_OPTION 0 205 #endif 206 207 208 #endif // CGAL_ACK_FLAGS_H 209