casadi 3.6.4__cp312-none-macosx_10_13_x86_64.macosx_10_13_intel.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- casadi/__init__.py +92 -0
- casadi/_casadi.so +0 -0
- casadi/casadi-cli +0 -0
- casadi/casadi.py +50467 -0
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/casadi-config-version.cmake +11 -0
- casadi/cmake/casadi-config.cmake +8 -0
- casadi/cmake/casadi-targets-release.cmake +19 -0
- casadi/cmake/casadi-targets.cmake +102 -0
- casadi/cmake/highs/highs-config.cmake +24 -0
- casadi/cmake/highs/highs-targets-release.cmake +28 -0
- casadi/cmake/highs/highs-targets.cmake +114 -0
- casadi/cmake/osqp/osqp-config.cmake +1 -0
- casadi/cmake/osqp/osqp-targets-noconfig.cmake +29 -0
- casadi/cmake/osqp/osqp-targets.cmake +109 -0
- casadi/cmake/qdldl/qdldl-config.cmake +1 -0
- casadi/cmake/qdldl/qdldl-targets-noconfig.cmake +29 -0
- casadi/cmake/qdldl/qdldl-targets.cmake +109 -0
- casadi/cmake/sleqp/sleqp-config-version.cmake +65 -0
- casadi/cmake/sleqp/sleqp-config.cmake +1 -0
- casadi/cmake/sleqp/sleqp-targets-release.cmake +20 -0
- casadi/cmake/sleqp/sleqp-targets.cmake +102 -0
- casadi/cmake/trlib/trlib-config-release.cmake +19 -0
- casadi/cmake/trlib/trlib-config-version.cmake +83 -0
- casadi/cmake/trlib/trlib-config.cmake +107 -0
- casadi/highs +0 -0
- casadi/include/casadi/casadi.hpp +31 -0
- casadi/include/casadi/casadi.i +4673 -0
- casadi/include/casadi/casadi_c.h +136 -0
- casadi/include/casadi/casadi_numpy.hpp +97 -0
- casadi/include/casadi/config.h +46 -0
- casadi/include/casadi/core/calculus.hpp +1750 -0
- casadi/include/casadi/core/callback.hpp +226 -0
- casadi/include/casadi/core/casadi_common.hpp +317 -0
- casadi/include/casadi/core/casadi_enum.hpp +90 -0
- casadi/include/casadi/core/casadi_export.h +42 -0
- casadi/include/casadi/core/casadi_interrupt.hpp +83 -0
- casadi/include/casadi/core/casadi_limits.hpp +104 -0
- casadi/include/casadi/core/casadi_logger.hpp +134 -0
- casadi/include/casadi/core/casadi_meta.hpp +107 -0
- casadi/include/casadi/core/casadi_misc.hpp +949 -0
- casadi/include/casadi/core/casadi_types.hpp +65 -0
- casadi/include/casadi/core/code_generator.hpp +918 -0
- casadi/include/casadi/core/conic.hpp +213 -0
- casadi/include/casadi/core/core.hpp +69 -0
- casadi/include/casadi/core/dae_builder.hpp +723 -0
- casadi/include/casadi/core/dm.hpp +87 -0
- casadi/include/casadi/core/dm_fwd.hpp +39 -0
- casadi/include/casadi/core/dple.hpp +138 -0
- casadi/include/casadi/core/exception.hpp +167 -0
- casadi/include/casadi/core/expm.hpp +84 -0
- casadi/include/casadi/core/external.hpp +70 -0
- casadi/include/casadi/core/fmu.hpp +224 -0
- casadi/include/casadi/core/function.hpp +1347 -0
- casadi/include/casadi/core/generic_expression.hpp +760 -0
- casadi/include/casadi/core/generic_matrix.hpp +1598 -0
- casadi/include/casadi/core/generic_type.hpp +287 -0
- casadi/include/casadi/core/global_options.hpp +95 -0
- casadi/include/casadi/core/im.hpp +52 -0
- casadi/include/casadi/core/im_fwd.hpp +35 -0
- casadi/include/casadi/core/importer.hpp +221 -0
- casadi/include/casadi/core/integration_tools.hpp +292 -0
- casadi/include/casadi/core/integrator.hpp +256 -0
- casadi/include/casadi/core/interpolant.hpp +163 -0
- casadi/include/casadi/core/linsol.hpp +171 -0
- casadi/include/casadi/core/matrix_decl.hpp +1337 -0
- casadi/include/casadi/core/matrix_fwd.hpp +37 -0
- casadi/include/casadi/core/mx.hpp +938 -0
- casadi/include/casadi/core/nlp_builder.hpp +162 -0
- casadi/include/casadi/core/nlp_tools.hpp +124 -0
- casadi/include/casadi/core/nlpsol.hpp +234 -0
- casadi/include/casadi/core/nonzeros.hpp +111 -0
- casadi/include/casadi/core/options.hpp +119 -0
- casadi/include/casadi/core/optistack.hpp +647 -0
- casadi/include/casadi/core/polynomial.hpp +126 -0
- casadi/include/casadi/core/printable.hpp +73 -0
- casadi/include/casadi/core/rootfinder.hpp +176 -0
- casadi/include/casadi/core/runtime/casadi_axpy.hpp +8 -0
- casadi/include/casadi/core/runtime/casadi_bfgs.hpp +49 -0
- casadi/include/casadi/core/runtime/casadi_bilin.hpp +42 -0
- casadi/include/casadi/core/runtime/casadi_bound_consistency.hpp +51 -0
- casadi/include/casadi/core/runtime/casadi_cache.hpp +59 -0
- casadi/include/casadi/core/runtime/casadi_clear.hpp +27 -0
- casadi/include/casadi/core/runtime/casadi_clip_max.hpp +33 -0
- casadi/include/casadi/core/runtime/casadi_clip_min.hpp +33 -0
- casadi/include/casadi/core/runtime/casadi_convexify.hpp +182 -0
- casadi/include/casadi/core/runtime/casadi_copy.hpp +31 -0
- casadi/include/casadi/core/runtime/casadi_cvx.hpp +463 -0
- casadi/include/casadi/core/runtime/casadi_de_boor.hpp +36 -0
- casadi/include/casadi/core/runtime/casadi_dense_lsqr.hpp +247 -0
- casadi/include/casadi/core/runtime/casadi_densify.hpp +48 -0
- casadi/include/casadi/core/runtime/casadi_dot.hpp +27 -0
- casadi/include/casadi/core/runtime/casadi_feasiblesqpmethod.hpp +208 -0
- casadi/include/casadi/core/runtime/casadi_file_slurp.hpp +32 -0
- casadi/include/casadi/core/runtime/casadi_fill.hpp +27 -0
- casadi/include/casadi/core/runtime/casadi_finite_diff.hpp +345 -0
- casadi/include/casadi/core/runtime/casadi_flip.hpp +33 -0
- casadi/include/casadi/core/runtime/casadi_getu.hpp +35 -0
- casadi/include/casadi/core/runtime/casadi_iamax.hpp +36 -0
- casadi/include/casadi/core/runtime/casadi_interpn.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_interpn_grad.hpp +72 -0
- casadi/include/casadi/core/runtime/casadi_interpn_interpolate.hpp +43 -0
- casadi/include/casadi/core/runtime/casadi_interpn_weights.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_ipqp.hpp +868 -0
- casadi/include/casadi/core/runtime/casadi_jac.hpp +186 -0
- casadi/include/casadi/core/runtime/casadi_kkt.hpp +67 -0
- casadi/include/casadi/core/runtime/casadi_kron.hpp +50 -0
- casadi/include/casadi/core/runtime/casadi_ldl.hpp +109 -0
- casadi/include/casadi/core/runtime/casadi_logsumexp.hpp +41 -0
- casadi/include/casadi/core/runtime/casadi_low.hpp +65 -0
- casadi/include/casadi/core/runtime/casadi_lsqr.hpp +247 -0
- casadi/include/casadi/core/runtime/casadi_masked_norm_inf.hpp +33 -0
- casadi/include/casadi/core/runtime/casadi_max_viol.hpp +37 -0
- casadi/include/casadi/core/runtime/casadi_mmax.hpp +28 -0
- casadi/include/casadi/core/runtime/casadi_mmin.hpp +29 -0
- casadi/include/casadi/core/runtime/casadi_mtimes.hpp +75 -0
- casadi/include/casadi/core/runtime/casadi_mv.hpp +46 -0
- casadi/include/casadi/core/runtime/casadi_mv_dense.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_nd_boor_dual_eval.hpp +127 -0
- casadi/include/casadi/core/runtime/casadi_nd_boor_eval.hpp +120 -0
- casadi/include/casadi/core/runtime/casadi_newton.hpp +66 -0
- casadi/include/casadi/core/runtime/casadi_nlp.hpp +149 -0
- casadi/include/casadi/core/runtime/casadi_norm_1.hpp +29 -0
- casadi/include/casadi/core/runtime/casadi_norm_2.hpp +24 -0
- casadi/include/casadi/core/runtime/casadi_norm_inf.hpp +28 -0
- casadi/include/casadi/core/runtime/casadi_norm_inf_mul.hpp +105 -0
- casadi/include/casadi/core/runtime/casadi_polyval.hpp +29 -0
- casadi/include/casadi/core/runtime/casadi_project.hpp +39 -0
- casadi/include/casadi/core/runtime/casadi_qp.hpp +86 -0
- casadi/include/casadi/core/runtime/casadi_qr.hpp +272 -0
- casadi/include/casadi/core/runtime/casadi_qrqp.hpp +1239 -0
- casadi/include/casadi/core/runtime/casadi_rank1.hpp +40 -0
- casadi/include/casadi/core/runtime/casadi_regularize.hpp +73 -0
- casadi/include/casadi/core/runtime/casadi_runtime.hpp +315 -0
- casadi/include/casadi/core/runtime/casadi_scal.hpp +26 -0
- casadi/include/casadi/core/runtime/casadi_sparsify.hpp +42 -0
- casadi/include/casadi/core/runtime/casadi_sparsity.hpp +24 -0
- casadi/include/casadi/core/runtime/casadi_sqpmethod.hpp +168 -0
- casadi/include/casadi/core/runtime/casadi_sum.hpp +31 -0
- casadi/include/casadi/core/runtime/casadi_sum_viol.hpp +37 -0
- casadi/include/casadi/core/runtime/casadi_swap.hpp +32 -0
- casadi/include/casadi/core/runtime/casadi_trans.hpp +35 -0
- casadi/include/casadi/core/runtime/casadi_tri_project.hpp +37 -0
- casadi/include/casadi/core/runtime/casadi_trilsolve.hpp +81 -0
- casadi/include/casadi/core/runtime/casadi_triusolve.hpp +81 -0
- casadi/include/casadi/core/runtime/casadi_vector_fmax.hpp +28 -0
- casadi/include/casadi/core/runtime/casadi_vector_fmin.hpp +28 -0
- casadi/include/casadi/core/runtime/casadi_vfmax.hpp +28 -0
- casadi/include/casadi/core/runtime/casadi_vfmin.hpp +28 -0
- casadi/include/casadi/core/runtime/shared.hpp +261 -0
- casadi/include/casadi/core/serializer.hpp +256 -0
- casadi/include/casadi/core/serializing_stream.hpp +329 -0
- casadi/include/casadi/core/shared_object.hpp +270 -0
- casadi/include/casadi/core/slice.hpp +149 -0
- casadi/include/casadi/core/sparsity.hpp +1486 -0
- casadi/include/casadi/core/sparsity_interface.hpp +745 -0
- casadi/include/casadi/core/submatrix.hpp +156 -0
- casadi/include/casadi/core/sx.hpp +203 -0
- casadi/include/casadi/core/sx_elem.hpp +351 -0
- casadi/include/casadi/core/sx_fwd.hpp +45 -0
- casadi/include/casadi/core/timing.hpp +98 -0
- casadi/include/casadi/core/xml_file.hpp +93 -0
- casadi/include/casadi/core/xml_node.hpp +207 -0
- casadi/include/casadi/doc.i +57768 -0
- casadi/include/casadi/doc_merged.i +35612 -0
- casadi/include/casadi/mem.h +310 -0
- casadi/include/casadi/valgrind-casadi.supp +511 -0
- casadi/include/casadi/valgrind-python.supp +1416 -0
- casadi/include/highs/HConfig.h +20 -0
- casadi/include/highs/Highs.h +1459 -0
- casadi/include/highs/filereaderlp/builder.hpp +25 -0
- casadi/include/highs/filereaderlp/model.hpp +68 -0
- casadi/include/highs/filereaderlp/reader.hpp +10 -0
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/include/highs/interfaces/highs_c_api.h +2107 -0
- casadi/include/highs/io/Filereader.h +47 -0
- casadi/include/highs/io/FilereaderEms.h +33 -0
- casadi/include/highs/io/FilereaderLp.h +54 -0
- casadi/include/highs/io/FilereaderMps.h +30 -0
- casadi/include/highs/io/HMPSIO.h +81 -0
- casadi/include/highs/io/HMpsFF.h +233 -0
- casadi/include/highs/io/HighsIO.h +99 -0
- casadi/include/highs/io/LoadOptions.h +27 -0
- casadi/include/highs/ipm/IpxWrapper.h +73 -0
- casadi/include/highs/lp_data/HConst.h +295 -0
- casadi/include/highs/lp_data/HStruct.h +124 -0
- casadi/include/highs/lp_data/HighsAnalysis.h +26 -0
- casadi/include/highs/lp_data/HighsCallback.h +33 -0
- casadi/include/highs/lp_data/HighsCallbackStruct.h +36 -0
- casadi/include/highs/lp_data/HighsDebug.h +37 -0
- casadi/include/highs/lp_data/HighsInfo.h +304 -0
- casadi/include/highs/lp_data/HighsInfoDebug.h +30 -0
- casadi/include/highs/lp_data/HighsLp.h +85 -0
- casadi/include/highs/lp_data/HighsLpSolverObject.h +48 -0
- casadi/include/highs/lp_data/HighsLpUtils.h +266 -0
- casadi/include/highs/lp_data/HighsModelUtils.h +109 -0
- casadi/include/highs/lp_data/HighsOptions.h +1130 -0
- casadi/include/highs/lp_data/HighsRanging.h +46 -0
- casadi/include/highs/lp_data/HighsRuntimeOptions.h +276 -0
- casadi/include/highs/lp_data/HighsSolution.h +137 -0
- casadi/include/highs/lp_data/HighsSolutionDebug.h +90 -0
- casadi/include/highs/lp_data/HighsSolve.h +24 -0
- casadi/include/highs/lp_data/HighsStatus.h +32 -0
- casadi/include/highs/mip/HighsCliqueTable.h +318 -0
- casadi/include/highs/mip/HighsConflictPool.h +112 -0
- casadi/include/highs/mip/HighsCutGeneration.h +96 -0
- casadi/include/highs/mip/HighsCutPool.h +171 -0
- casadi/include/highs/mip/HighsDebugSol.h +142 -0
- casadi/include/highs/mip/HighsDomain.h +633 -0
- casadi/include/highs/mip/HighsDomainChange.h +51 -0
- casadi/include/highs/mip/HighsDynamicRowMatrix.h +105 -0
- casadi/include/highs/mip/HighsGFkSolve.h +441 -0
- casadi/include/highs/mip/HighsImplications.h +146 -0
- casadi/include/highs/mip/HighsLpAggregator.h +53 -0
- casadi/include/highs/mip/HighsLpRelaxation.h +355 -0
- casadi/include/highs/mip/HighsMipSolver.h +103 -0
- casadi/include/highs/mip/HighsMipSolverData.h +193 -0
- casadi/include/highs/mip/HighsModkSeparator.h +63 -0
- casadi/include/highs/mip/HighsNodeQueue.h +312 -0
- casadi/include/highs/mip/HighsObjectiveFunction.h +74 -0
- casadi/include/highs/mip/HighsPathSeparator.h +42 -0
- casadi/include/highs/mip/HighsPrimalHeuristics.h +68 -0
- casadi/include/highs/mip/HighsPseudocost.h +351 -0
- casadi/include/highs/mip/HighsRedcostFixing.h +45 -0
- casadi/include/highs/mip/HighsSearch.h +243 -0
- casadi/include/highs/mip/HighsSeparation.h +44 -0
- casadi/include/highs/mip/HighsSeparator.h +56 -0
- casadi/include/highs/mip/HighsTableauSeparator.h +37 -0
- casadi/include/highs/mip/HighsTransformedLp.h +66 -0
- casadi/include/highs/model/HighsHessian.h +49 -0
- casadi/include/highs/model/HighsHessianUtils.h +47 -0
- casadi/include/highs/model/HighsModel.h +43 -0
- casadi/include/highs/parallel/HighsBinarySemaphore.h +113 -0
- casadi/include/highs/parallel/HighsCacheAlign.h +87 -0
- casadi/include/highs/parallel/HighsCombinable.h +121 -0
- casadi/include/highs/parallel/HighsMutex.h +128 -0
- casadi/include/highs/parallel/HighsParallel.h +128 -0
- casadi/include/highs/parallel/HighsRaceTimer.h +43 -0
- casadi/include/highs/parallel/HighsSchedulerConstants.h +24 -0
- casadi/include/highs/parallel/HighsSpinMutex.h +53 -0
- casadi/include/highs/parallel/HighsSplitDeque.h +583 -0
- casadi/include/highs/parallel/HighsTask.h +176 -0
- casadi/include/highs/parallel/HighsTaskExecutor.h +209 -0
- casadi/include/highs/presolve/HPresolve.h +352 -0
- casadi/include/highs/presolve/HPresolveAnalysis.h +54 -0
- casadi/include/highs/presolve/HighsPostsolveStack.h +883 -0
- casadi/include/highs/presolve/HighsSymmetry.h +283 -0
- casadi/include/highs/presolve/ICrash.h +121 -0
- casadi/include/highs/presolve/ICrashUtil.h +65 -0
- casadi/include/highs/presolve/ICrashX.h +26 -0
- casadi/include/highs/presolve/PresolveComponent.h +93 -0
- casadi/include/highs/qpsolver/a_asm.hpp +56 -0
- casadi/include/highs/qpsolver/a_quass.hpp +12 -0
- casadi/include/highs/qpsolver/perturbation.hpp +8 -0
- casadi/include/highs/qpsolver/quass.hpp +20 -0
- casadi/include/highs/qpsolver/scaling.hpp +8 -0
- casadi/include/highs/qpsolver/vector.hpp +235 -0
- casadi/include/highs/simplex/HApp.h +422 -0
- casadi/include/highs/simplex/HEkk.h +369 -0
- casadi/include/highs/simplex/HEkkDual.h +515 -0
- casadi/include/highs/simplex/HEkkDualRHS.h +138 -0
- casadi/include/highs/simplex/HEkkDualRow.h +204 -0
- casadi/include/highs/simplex/HEkkPrimal.h +190 -0
- casadi/include/highs/simplex/HSimplex.h +47 -0
- casadi/include/highs/simplex/HSimplexDebug.h +51 -0
- casadi/include/highs/simplex/HSimplexNla.h +184 -0
- casadi/include/highs/simplex/HSimplexReport.h +24 -0
- casadi/include/highs/simplex/HighsSimplexAnalysis.h +375 -0
- casadi/include/highs/simplex/SimplexConst.h +274 -0
- casadi/include/highs/simplex/SimplexStruct.h +264 -0
- casadi/include/highs/simplex/SimplexTimer.h +427 -0
- casadi/include/highs/test/DevKkt.h +146 -0
- casadi/include/highs/test/KktCh2.h +82 -0
- casadi/include/highs/util/FactorTimer.h +224 -0
- casadi/include/highs/util/HFactor.h +558 -0
- casadi/include/highs/util/HFactorConst.h +84 -0
- casadi/include/highs/util/HFactorDebug.h +58 -0
- casadi/include/highs/util/HSet.h +92 -0
- casadi/include/highs/util/HVector.h +25 -0
- casadi/include/highs/util/HVectorBase.h +105 -0
- casadi/include/highs/util/HighsCDouble.h +310 -0
- casadi/include/highs/util/HighsComponent.h +56 -0
- casadi/include/highs/util/HighsDataStack.h +86 -0
- casadi/include/highs/util/HighsDisjointSets.h +110 -0
- casadi/include/highs/util/HighsHash.h +1270 -0
- casadi/include/highs/util/HighsHashTree.h +1443 -0
- casadi/include/highs/util/HighsInt.h +39 -0
- casadi/include/highs/util/HighsIntegers.h +216 -0
- casadi/include/highs/util/HighsLinearSumBounds.h +160 -0
- casadi/include/highs/util/HighsMatrixPic.h +40 -0
- casadi/include/highs/util/HighsMatrixSlice.h +561 -0
- casadi/include/highs/util/HighsMatrixUtils.h +57 -0
- casadi/include/highs/util/HighsRandom.h +233 -0
- casadi/include/highs/util/HighsRbTree.h +455 -0
- casadi/include/highs/util/HighsSort.h +134 -0
- casadi/include/highs/util/HighsSparseMatrix.h +144 -0
- casadi/include/highs/util/HighsSparseVectorSum.h +98 -0
- casadi/include/highs/util/HighsSplay.h +138 -0
- casadi/include/highs/util/HighsTimer.h +334 -0
- casadi/include/highs/util/HighsUtils.h +203 -0
- casadi/include/highs/util/stringutil.h +39 -0
- casadi/include/include/blasfeo.h +52 -0
- casadi/include/include/blasfeo_block_size.h +447 -0
- casadi/include/include/blasfeo_common.h +274 -0
- casadi/include/include/blasfeo_d_aux.h +255 -0
- casadi/include/include/blasfeo_d_aux_ext_dep.h +145 -0
- casadi/include/include/blasfeo_d_aux_ext_dep_ref.h +84 -0
- casadi/include/include/blasfeo_d_aux_old.h +75 -0
- casadi/include/include/blasfeo_d_aux_ref.h +208 -0
- casadi/include/include/blasfeo_d_aux_test.h +226 -0
- casadi/include/include/blasfeo_d_blas.h +46 -0
- casadi/include/include/blasfeo_d_blas_api.h +281 -0
- casadi/include/include/blasfeo_d_blasfeo_api.h +364 -0
- casadi/include/include/blasfeo_d_blasfeo_api_ref.h +147 -0
- casadi/include/include/blasfeo_d_blasfeo_hp_api.h +84 -0
- casadi/include/include/blasfeo_d_blasfeo_ref_api.h +283 -0
- casadi/include/include/blasfeo_d_kernel.h +1321 -0
- casadi/include/include/blasfeo_i_aux_ext_dep.h +69 -0
- casadi/include/include/blasfeo_m_aux.h +57 -0
- casadi/include/include/blasfeo_memory.h +62 -0
- casadi/include/include/blasfeo_naming.h +77 -0
- casadi/include/include/blasfeo_processor_features.h +88 -0
- casadi/include/include/blasfeo_s_aux.h +168 -0
- casadi/include/include/blasfeo_s_aux_ext_dep.h +141 -0
- casadi/include/include/blasfeo_s_aux_ext_dep_ref.h +82 -0
- casadi/include/include/blasfeo_s_aux_old.h +64 -0
- casadi/include/include/blasfeo_s_aux_ref.h +147 -0
- casadi/include/include/blasfeo_s_aux_test.h +177 -0
- casadi/include/include/blasfeo_s_blas.h +46 -0
- casadi/include/include/blasfeo_s_blas_api.h +182 -0
- casadi/include/include/blasfeo_s_blasfeo_api.h +284 -0
- casadi/include/include/blasfeo_s_blasfeo_api_ref.h +135 -0
- casadi/include/include/blasfeo_s_blasfeo_ref_api.h +252 -0
- casadi/include/include/blasfeo_s_kernel.h +692 -0
- casadi/include/include/blasfeo_stdlib.h +62 -0
- casadi/include/include/blasfeo_target.h +73 -0
- casadi/include/include/blasfeo_timing.h +114 -0
- casadi/include/include/blasfeo_v_aux_ext_dep.h +83 -0
- casadi/include/include/coin/BonArraysHelpers.hpp +52 -0
- casadi/include/include/coin/BonAuxInfos.hpp +110 -0
- casadi/include/include/coin/BonBabInfos.hpp +57 -0
- casadi/include/include/coin/BonBabSetupBase.hpp +386 -0
- casadi/include/include/coin/BonBonminSetup.hpp +95 -0
- casadi/include/include/coin/BonBranchingTQP.hpp +197 -0
- casadi/include/include/coin/BonCbc.hpp +127 -0
- casadi/include/include/coin/BonCbcLpStrategy.hpp +45 -0
- casadi/include/include/coin/BonCbcNlpStrategy.hpp +98 -0
- casadi/include/include/coin/BonCbcNode.hpp +133 -0
- casadi/include/include/coin/BonChooseVariable.hpp +345 -0
- casadi/include/include/coin/BonCurvBranchingSolver.hpp +77 -0
- casadi/include/include/coin/BonCutStrengthener.hpp +244 -0
- casadi/include/include/coin/BonDiver.hpp +424 -0
- casadi/include/include/coin/BonDummyHeuristic.hpp +53 -0
- casadi/include/include/coin/BonDummyPump.hpp +43 -0
- casadi/include/include/coin/BonEcpCuts.hpp +97 -0
- casadi/include/include/coin/BonExitCodes.hpp +12 -0
- casadi/include/include/coin/BonFixAndSolveHeuristic.hpp +43 -0
- casadi/include/include/coin/BonGuessHeuristic.hpp +46 -0
- casadi/include/include/coin/BonHeuristicDive.hpp +88 -0
- casadi/include/include/coin/BonHeuristicDiveFractional.hpp +67 -0
- casadi/include/include/coin/BonHeuristicDiveMIP.hpp +83 -0
- casadi/include/include/coin/BonHeuristicDiveMIPFractional.hpp +67 -0
- casadi/include/include/coin/BonHeuristicDiveMIPVectorLength.hpp +74 -0
- casadi/include/include/coin/BonHeuristicDiveVectorLength.hpp +74 -0
- casadi/include/include/coin/BonHeuristicFPump.hpp +111 -0
- casadi/include/include/coin/BonHeuristicLocalBranching.hpp +59 -0
- casadi/include/include/coin/BonHeuristicRINS.hpp +55 -0
- casadi/include/include/coin/BonIpoptInteriorWarmStarter.hpp +103 -0
- casadi/include/include/coin/BonIpoptSolver.hpp +188 -0
- casadi/include/include/coin/BonIpoptWarmStart.hpp +148 -0
- casadi/include/include/coin/BonLinearCutsGenerator.hpp +75 -0
- casadi/include/include/coin/BonLocalSolverBasedHeuristic.hpp +102 -0
- casadi/include/include/coin/BonLpBranchingSolver.hpp +80 -0
- casadi/include/include/coin/BonMilpRounding.hpp +74 -0
- casadi/include/include/coin/BonOACutGenerator2.hpp +56 -0
- casadi/include/include/coin/BonOAMessages.hpp +44 -0
- casadi/include/include/coin/BonOaDecBase.hpp +297 -0
- casadi/include/include/coin/BonOaFeasChecker.hpp +73 -0
- casadi/include/include/coin/BonOaNlpOptim.hpp +116 -0
- casadi/include/include/coin/BonOsiTMINLPInterface.hpp +1342 -0
- casadi/include/include/coin/BonOuterApprox.hpp +123 -0
- casadi/include/include/coin/BonPseudoCosts.hpp +91 -0
- casadi/include/include/coin/BonPumpForMinlp.hpp +45 -0
- casadi/include/include/coin/BonQuadCut.hpp +217 -0
- casadi/include/include/coin/BonQuadRow.hpp +122 -0
- casadi/include/include/coin/BonRegisteredOptions.hpp +225 -0
- casadi/include/include/coin/BonStrongBranchingSolver.hpp +69 -0
- casadi/include/include/coin/BonSubMipSolver.hpp +143 -0
- casadi/include/include/coin/BonTMINLP.hpp +420 -0
- casadi/include/include/coin/BonTMINLP2OsiLP.hpp +164 -0
- casadi/include/include/coin/BonTMINLP2Quad.hpp +191 -0
- casadi/include/include/coin/BonTMINLP2TNLP.hpp +509 -0
- casadi/include/include/coin/BonTMINLPLinObj.hpp +216 -0
- casadi/include/include/coin/BonTMatrix.hpp +167 -0
- casadi/include/include/coin/BonTNLP2FPNLP.hpp +264 -0
- casadi/include/include/coin/BonTNLPSolver.hpp +241 -0
- casadi/include/include/coin/BonTypes.hpp +95 -0
- casadi/include/include/coin/BonminConfig.h +19 -0
- casadi/include/include/coin/CbcBranchActual.hpp +26 -0
- casadi/include/include/coin/CbcBranchAllDifferent.hpp +61 -0
- casadi/include/include/coin/CbcBranchBase.hpp +79 -0
- casadi/include/include/coin/CbcBranchCut.hpp +182 -0
- casadi/include/include/coin/CbcBranchDecision.hpp +135 -0
- casadi/include/include/coin/CbcBranchDefaultDecision.hpp +101 -0
- casadi/include/include/coin/CbcBranchDynamic.hpp +210 -0
- casadi/include/include/coin/CbcBranchLotsize.hpp +249 -0
- casadi/include/include/coin/CbcBranchToFixLots.hpp +94 -0
- casadi/include/include/coin/CbcBranchingObject.hpp +245 -0
- casadi/include/include/coin/CbcClique.hpp +309 -0
- casadi/include/include/coin/CbcCompare.hpp +46 -0
- casadi/include/include/coin/CbcCompareActual.hpp +16 -0
- casadi/include/include/coin/CbcCompareBase.hpp +155 -0
- casadi/include/include/coin/CbcCompareDefault.hpp +129 -0
- casadi/include/include/coin/CbcCompareDepth.hpp +48 -0
- casadi/include/include/coin/CbcCompareEstimate.hpp +48 -0
- casadi/include/include/coin/CbcCompareObjective.hpp +50 -0
- casadi/include/include/coin/CbcConfig.h +18 -0
- casadi/include/include/coin/CbcConsequence.hpp +50 -0
- casadi/include/include/coin/CbcCountRowCut.hpp +176 -0
- casadi/include/include/coin/CbcCutGenerator.hpp +550 -0
- casadi/include/include/coin/CbcCutModifier.hpp +59 -0
- casadi/include/include/coin/CbcCutSubsetModifier.hpp +69 -0
- casadi/include/include/coin/CbcDummyBranchingObject.hpp +83 -0
- casadi/include/include/coin/CbcEventHandler.hpp +250 -0
- casadi/include/include/coin/CbcFathom.hpp +136 -0
- casadi/include/include/coin/CbcFathomDynamicProgramming.hpp +177 -0
- casadi/include/include/coin/CbcFeasibilityBase.hpp +60 -0
- casadi/include/include/coin/CbcFixVariable.hpp +68 -0
- casadi/include/include/coin/CbcFollowOn.hpp +207 -0
- casadi/include/include/coin/CbcFullNodeInfo.hpp +171 -0
- casadi/include/include/coin/CbcGeneral.hpp +60 -0
- casadi/include/include/coin/CbcGeneralDepth.hpp +289 -0
- casadi/include/include/coin/CbcHeuristic.hpp +735 -0
- casadi/include/include/coin/CbcHeuristicDINS.hpp +98 -0
- casadi/include/include/coin/CbcHeuristicDW.hpp +374 -0
- casadi/include/include/coin/CbcHeuristicDive.hpp +198 -0
- casadi/include/include/coin/CbcHeuristicDiveCoefficient.hpp +52 -0
- casadi/include/include/coin/CbcHeuristicDiveFractional.hpp +52 -0
- casadi/include/include/coin/CbcHeuristicDiveGuided.hpp +55 -0
- casadi/include/include/coin/CbcHeuristicDiveLineSearch.hpp +52 -0
- casadi/include/include/coin/CbcHeuristicDivePseudoCost.hpp +60 -0
- casadi/include/include/coin/CbcHeuristicDiveVectorLength.hpp +52 -0
- casadi/include/include/coin/CbcHeuristicFPump.hpp +375 -0
- casadi/include/include/coin/CbcHeuristicGreedy.hpp +289 -0
- casadi/include/include/coin/CbcHeuristicLocal.hpp +276 -0
- casadi/include/include/coin/CbcHeuristicPivotAndFix.hpp +58 -0
- casadi/include/include/coin/CbcHeuristicRENS.hpp +79 -0
- casadi/include/include/coin/CbcHeuristicRINS.hpp +106 -0
- casadi/include/include/coin/CbcHeuristicRandRound.hpp +58 -0
- casadi/include/include/coin/CbcHeuristicVND.hpp +95 -0
- casadi/include/include/coin/CbcLinked.hpp +1443 -0
- casadi/include/include/coin/CbcMessage.hpp +94 -0
- casadi/include/include/coin/CbcMipStartIO.hpp +29 -0
- casadi/include/include/coin/CbcModel.hpp +3296 -0
- casadi/include/include/coin/CbcNWay.hpp +171 -0
- casadi/include/include/coin/CbcNode.hpp +380 -0
- casadi/include/include/coin/CbcNodeInfo.hpp +377 -0
- casadi/include/include/coin/CbcObject.hpp +288 -0
- casadi/include/include/coin/CbcObjectUpdateData.hpp +63 -0
- casadi/include/include/coin/CbcOrClpParam.cpp +4321 -0
- casadi/include/include/coin/CbcOrClpParam.hpp +585 -0
- casadi/include/include/coin/CbcParam.hpp +338 -0
- casadi/include/include/coin/CbcPartialNodeInfo.hpp +116 -0
- casadi/include/include/coin/CbcSOS.hpp +290 -0
- casadi/include/include/coin/CbcSimpleInteger.hpp +299 -0
- casadi/include/include/coin/CbcSimpleIntegerDynamicPseudoCost.hpp +619 -0
- casadi/include/include/coin/CbcSimpleIntegerPseudoCost.hpp +122 -0
- casadi/include/include/coin/CbcSolver.hpp +460 -0
- casadi/include/include/coin/CbcStrategy.hpp +269 -0
- casadi/include/include/coin/CbcSubProblem.hpp +84 -0
- casadi/include/include/coin/CbcTree.hpp +493 -0
- casadi/include/include/coin/CbcTreeLocal.hpp +393 -0
- casadi/include/include/coin/Cbc_C_Interface.h +904 -0
- casadi/include/include/coin/Cgl012cut.hpp +464 -0
- casadi/include/include/coin/CglAllDifferent.hpp +115 -0
- casadi/include/include/coin/CglClique.hpp +312 -0
- casadi/include/include/coin/CglConfig.h +19 -0
- casadi/include/include/coin/CglCutGenerator.hpp +133 -0
- casadi/include/include/coin/CglDuplicateRow.hpp +189 -0
- casadi/include/include/coin/CglFlowCover.hpp +371 -0
- casadi/include/include/coin/CglGMI.hpp +364 -0
- casadi/include/include/coin/CglGMIParam.hpp +313 -0
- casadi/include/include/coin/CglGomory.hpp +204 -0
- casadi/include/include/coin/CglKnapsackCover.hpp +310 -0
- casadi/include/include/coin/CglLandP.hpp +306 -0
- casadi/include/include/coin/CglLandPValidator.hpp +130 -0
- casadi/include/include/coin/CglLiftAndProject.hpp +104 -0
- casadi/include/include/coin/CglMessage.hpp +49 -0
- casadi/include/include/coin/CglMixedIntegerRounding.hpp +429 -0
- casadi/include/include/coin/CglMixedIntegerRounding2.hpp +427 -0
- casadi/include/include/coin/CglOddHole.hpp +160 -0
- casadi/include/include/coin/CglParam.hpp +93 -0
- casadi/include/include/coin/CglPreProcess.hpp +600 -0
- casadi/include/include/coin/CglProbing.hpp +543 -0
- casadi/include/include/coin/CglRedSplit.hpp +448 -0
- casadi/include/include/coin/CglRedSplit2.hpp +494 -0
- casadi/include/include/coin/CglRedSplit2Param.hpp +495 -0
- casadi/include/include/coin/CglRedSplitParam.hpp +272 -0
- casadi/include/include/coin/CglResidualCapacity.hpp +240 -0
- casadi/include/include/coin/CglSimpleRounding.hpp +174 -0
- casadi/include/include/coin/CglStored.hpp +140 -0
- casadi/include/include/coin/CglTreeInfo.hpp +216 -0
- casadi/include/include/coin/CglTwomir.hpp +562 -0
- casadi/include/include/coin/CglZeroHalf.hpp +133 -0
- casadi/include/include/coin/ClpAmplObjective.hpp +113 -0
- casadi/include/include/coin/ClpCholeskyBase.hpp +321 -0
- casadi/include/include/coin/ClpCholeskyDense.hpp +157 -0
- casadi/include/include/coin/ClpCholeskyMumps.hpp +65 -0
- casadi/include/include/coin/ClpCholeskyPardiso.hpp +67 -0
- casadi/include/include/coin/ClpConfig.h +17 -0
- casadi/include/include/coin/ClpConstraint.hpp +129 -0
- casadi/include/include/coin/ClpConstraintAmpl.hpp +109 -0
- casadi/include/include/coin/ClpConstraintLinear.hpp +113 -0
- casadi/include/include/coin/ClpConstraintQuadratic.hpp +123 -0
- casadi/include/include/coin/ClpDualRowDantzig.hpp +72 -0
- casadi/include/include/coin/ClpDualRowPivot.hpp +136 -0
- casadi/include/include/coin/ClpDualRowSteepest.hpp +160 -0
- casadi/include/include/coin/ClpDummyMatrix.hpp +186 -0
- casadi/include/include/coin/ClpDynamicExampleMatrix.hpp +199 -0
- casadi/include/include/coin/ClpDynamicMatrix.hpp +420 -0
- casadi/include/include/coin/ClpEventHandler.hpp +193 -0
- casadi/include/include/coin/ClpFactorization.hpp +556 -0
- casadi/include/include/coin/ClpGubDynamicMatrix.hpp +270 -0
- casadi/include/include/coin/ClpGubMatrix.hpp +373 -0
- casadi/include/include/coin/ClpInterior.hpp +622 -0
- casadi/include/include/coin/ClpLinearObjective.hpp +104 -0
- casadi/include/include/coin/ClpMatrixBase.hpp +561 -0
- casadi/include/include/coin/ClpMessage.hpp +131 -0
- casadi/include/include/coin/ClpModel.hpp +1442 -0
- casadi/include/include/coin/ClpNetworkMatrix.hpp +235 -0
- casadi/include/include/coin/ClpNode.hpp +364 -0
- casadi/include/include/coin/ClpNonLinearCost.hpp +432 -0
- casadi/include/include/coin/ClpObjective.hpp +142 -0
- casadi/include/include/coin/ClpPEDualRowDantzig.hpp +84 -0
- casadi/include/include/coin/ClpPEDualRowSteepest.hpp +100 -0
- casadi/include/include/coin/ClpPEPrimalColumnDantzig.hpp +71 -0
- casadi/include/include/coin/ClpPEPrimalColumnSteepest.hpp +107 -0
- casadi/include/include/coin/ClpPESimplex.hpp +231 -0
- casadi/include/include/coin/ClpPackedMatrix.hpp +778 -0
- casadi/include/include/coin/ClpParameters.hpp +132 -0
- casadi/include/include/coin/ClpPdcoBase.hpp +110 -0
- casadi/include/include/coin/ClpPlusMinusOneMatrix.hpp +565 -0
- casadi/include/include/coin/ClpPresolve.hpp +379 -0
- casadi/include/include/coin/ClpPrimalColumnDantzig.hpp +74 -0
- casadi/include/include/coin/ClpPrimalColumnPivot.hpp +163 -0
- casadi/include/include/coin/ClpPrimalColumnSteepest.hpp +281 -0
- casadi/include/include/coin/ClpQuadraticObjective.hpp +161 -0
- casadi/include/include/coin/ClpSimplex.hpp +2137 -0
- casadi/include/include/coin/ClpSimplexDual.hpp +304 -0
- casadi/include/include/coin/ClpSimplexNonlinear.hpp +117 -0
- casadi/include/include/coin/ClpSimplexOther.hpp +282 -0
- casadi/include/include/coin/ClpSimplexPrimal.hpp +244 -0
- casadi/include/include/coin/ClpSolve.hpp +505 -0
- casadi/include/include/coin/Clp_C_Interface.h +554 -0
- casadi/include/include/coin/CoinAlloc.hpp +179 -0
- casadi/include/include/coin/CoinBuild.hpp +159 -0
- casadi/include/include/coin/CoinDenseFactorization.hpp +452 -0
- casadi/include/include/coin/CoinDenseVector.hpp +401 -0
- casadi/include/include/coin/CoinDistance.hpp +51 -0
- casadi/include/include/coin/CoinError.hpp +274 -0
- casadi/include/include/coin/CoinFactorization.hpp +2178 -0
- casadi/include/include/coin/CoinFileIO.hpp +185 -0
- casadi/include/include/coin/CoinFinite.hpp +37 -0
- casadi/include/include/coin/CoinFloatEqual.hpp +204 -0
- casadi/include/include/coin/CoinHelperFunctions.hpp +1270 -0
- casadi/include/include/coin/CoinIndexedVector.hpp +1437 -0
- casadi/include/include/coin/CoinLpIO.hpp +836 -0
- casadi/include/include/coin/CoinMessage.hpp +95 -0
- casadi/include/include/coin/CoinMessageHandler.hpp +717 -0
- casadi/include/include/coin/CoinModel.hpp +1214 -0
- casadi/include/include/coin/CoinModelUseful.hpp +518 -0
- casadi/include/include/coin/CoinMpsIO.hpp +1142 -0
- casadi/include/include/coin/CoinOslFactorization.hpp +287 -0
- casadi/include/include/coin/CoinPackedMatrix.hpp +956 -0
- casadi/include/include/coin/CoinPackedVector.hpp +670 -0
- casadi/include/include/coin/CoinPackedVectorBase.hpp +274 -0
- casadi/include/include/coin/CoinParam.hpp +644 -0
- casadi/include/include/coin/CoinPragma.hpp +29 -0
- casadi/include/include/coin/CoinPresolveDoubleton.hpp +76 -0
- casadi/include/include/coin/CoinPresolveDual.hpp +84 -0
- casadi/include/include/coin/CoinPresolveDupcol.hpp +259 -0
- casadi/include/include/coin/CoinPresolveEmpty.hpp +120 -0
- casadi/include/include/coin/CoinPresolveFixed.hpp +185 -0
- casadi/include/include/coin/CoinPresolveForcing.hpp +69 -0
- casadi/include/include/coin/CoinPresolveImpliedFree.hpp +66 -0
- casadi/include/include/coin/CoinPresolveIsolated.hpp +59 -0
- casadi/include/include/coin/CoinPresolveMatrix.hpp +1996 -0
- casadi/include/include/coin/CoinPresolveMonitor.hpp +105 -0
- casadi/include/include/coin/CoinPresolvePsdebug.hpp +169 -0
- casadi/include/include/coin/CoinPresolveSingleton.hpp +115 -0
- casadi/include/include/coin/CoinPresolveSubst.hpp +103 -0
- casadi/include/include/coin/CoinPresolveTighten.hpp +58 -0
- casadi/include/include/coin/CoinPresolveTripleton.hpp +69 -0
- casadi/include/include/coin/CoinPresolveUseless.hpp +63 -0
- casadi/include/include/coin/CoinPresolveZeros.hpp +65 -0
- casadi/include/include/coin/CoinRational.hpp +43 -0
- casadi/include/include/coin/CoinSearchTree.hpp +523 -0
- casadi/include/include/coin/CoinShallowPackedVector.hpp +149 -0
- casadi/include/include/coin/CoinSignal.hpp +127 -0
- casadi/include/include/coin/CoinSimpFactorization.hpp +432 -0
- casadi/include/include/coin/CoinSmartPtr.hpp +548 -0
- casadi/include/include/coin/CoinSnapshot.hpp +572 -0
- casadi/include/include/coin/CoinSort.hpp +753 -0
- casadi/include/include/coin/CoinStructuredModel.hpp +270 -0
- casadi/include/include/coin/CoinTime.hpp +350 -0
- casadi/include/include/coin/CoinTypes.hpp +67 -0
- casadi/include/include/coin/CoinUtility.hpp +26 -0
- casadi/include/include/coin/CoinUtilsConfig.h +34 -0
- casadi/include/include/coin/CoinWarmStart.hpp +56 -0
- casadi/include/include/coin/CoinWarmStartBasis.hpp +468 -0
- casadi/include/include/coin/CoinWarmStartDual.hpp +180 -0
- casadi/include/include/coin/CoinWarmStartPrimalDual.hpp +233 -0
- casadi/include/include/coin/CoinWarmStartVector.hpp +523 -0
- casadi/include/include/coin/Coin_C_defines.h +149 -0
- casadi/include/include/coin/Idiot.hpp +327 -0
- casadi/include/include/coin/OsiAuxInfo.hpp +261 -0
- casadi/include/include/coin/OsiBranchingObject.hpp +1097 -0
- casadi/include/include/coin/OsiCbcSolverInterface.hpp +791 -0
- casadi/include/include/coin/OsiChooseVariable.hpp +645 -0
- casadi/include/include/coin/OsiClpSolverInterface.hpp +1604 -0
- casadi/include/include/coin/OsiColCut.hpp +322 -0
- casadi/include/include/coin/OsiCollections.hpp +34 -0
- casadi/include/include/coin/OsiConfig.h +19 -0
- casadi/include/include/coin/OsiCut.hpp +251 -0
- casadi/include/include/coin/OsiCuts.hpp +505 -0
- casadi/include/include/coin/OsiPresolve.hpp +272 -0
- casadi/include/include/coin/OsiRowCut.hpp +345 -0
- casadi/include/include/coin/OsiRowCutDebugger.hpp +190 -0
- casadi/include/include/coin/OsiSolverBranch.hpp +169 -0
- casadi/include/include/coin/OsiSolverInterface.hpp +2221 -0
- casadi/include/include/coin/OsiSolverParameters.hpp +144 -0
- casadi/include/include/coin/OsiUnitTests.hpp +390 -0
- casadi/include/include/coin-or/IpAlgBuilder.hpp +417 -0
- casadi/include/include/coin-or/IpAlgStrategy.hpp +201 -0
- casadi/include/include/coin-or/IpAlgTypes.hpp +64 -0
- casadi/include/include/coin-or/IpAugSystemSolver.hpp +212 -0
- casadi/include/include/coin-or/IpBlas.hpp +426 -0
- casadi/include/include/coin-or/IpCachedResults.hpp +897 -0
- casadi/include/include/coin-or/IpCompoundMatrix.hpp +423 -0
- casadi/include/include/coin-or/IpCompoundSymMatrix.hpp +348 -0
- casadi/include/include/coin-or/IpCompoundVector.hpp +395 -0
- casadi/include/include/coin-or/IpConvCheck.hpp +97 -0
- casadi/include/include/coin-or/IpDebug.hpp +167 -0
- casadi/include/include/coin-or/IpDenseVector.hpp +626 -0
- casadi/include/include/coin-or/IpDiagMatrix.hpp +158 -0
- casadi/include/include/coin-or/IpEqMultCalculator.hpp +76 -0
- casadi/include/include/coin-or/IpException.hpp +156 -0
- casadi/include/include/coin-or/IpExpansionMatrix.hpp +245 -0
- casadi/include/include/coin-or/IpGenTMatrix.hpp +290 -0
- casadi/include/include/coin-or/IpHessianUpdater.hpp +73 -0
- casadi/include/include/coin-or/IpIdentityMatrix.hpp +167 -0
- casadi/include/include/coin-or/IpIpoptAlg.hpp +257 -0
- casadi/include/include/coin-or/IpIpoptApplication.hpp +367 -0
- casadi/include/include/coin-or/IpIpoptCalculatedQuantities.hpp +1009 -0
- casadi/include/include/coin-or/IpIpoptData.hpp +966 -0
- casadi/include/include/coin-or/IpIpoptNLP.hpp +328 -0
- casadi/include/include/coin-or/IpIterateInitializer.hpp +68 -0
- casadi/include/include/coin-or/IpIteratesVector.hpp +840 -0
- casadi/include/include/coin-or/IpIterationOutput.hpp +78 -0
- casadi/include/include/coin-or/IpJournalist.hpp +573 -0
- casadi/include/include/coin-or/IpLapack.hpp +227 -0
- casadi/include/include/coin-or/IpLibraryLoader.hpp +76 -0
- casadi/include/include/coin-or/IpLineSearch.hpp +106 -0
- casadi/include/include/coin-or/IpLinearSolvers.h +46 -0
- casadi/include/include/coin-or/IpMatrix.hpp +434 -0
- casadi/include/include/coin-or/IpMuUpdate.hpp +77 -0
- casadi/include/include/coin-or/IpNLP.hpp +306 -0
- casadi/include/include/coin-or/IpNLPScaling.hpp +582 -0
- casadi/include/include/coin-or/IpObserver.hpp +422 -0
- casadi/include/include/coin-or/IpOptionsList.hpp +412 -0
- casadi/include/include/coin-or/IpOrigIpoptNLP.hpp +603 -0
- casadi/include/include/coin-or/IpPDSystemSolver.hpp +137 -0
- casadi/include/include/coin-or/IpReferenced.hpp +262 -0
- casadi/include/include/coin-or/IpRegOptions.hpp +1152 -0
- casadi/include/include/coin-or/IpReturnCodes.h +23 -0
- casadi/include/include/coin-or/IpReturnCodes.hpp +18 -0
- casadi/include/include/coin-or/IpReturnCodes.inc +71 -0
- casadi/include/include/coin-or/IpReturnCodes_inc.h +45 -0
- casadi/include/include/coin-or/IpScaledMatrix.hpp +291 -0
- casadi/include/include/coin-or/IpSearchDirCalculator.hpp +72 -0
- casadi/include/include/coin-or/IpSmartPtr.hpp +865 -0
- casadi/include/include/coin-or/IpSolveStatistics.hpp +210 -0
- casadi/include/include/coin-or/IpSparseSymLinearSolverInterface.hpp +260 -0
- casadi/include/include/coin-or/IpStdAugSystemSolver.cpp +555 -0
- casadi/include/include/coin-or/IpStdCInterface.h +428 -0
- casadi/include/include/coin-or/IpSumSymMatrix.hpp +186 -0
- casadi/include/include/coin-or/IpSymLinearSolver.hpp +141 -0
- casadi/include/include/coin-or/IpSymMatrix.hpp +167 -0
- casadi/include/include/coin-or/IpSymScaledMatrix.hpp +255 -0
- casadi/include/include/coin-or/IpSymTMatrix.hpp +275 -0
- casadi/include/include/coin-or/IpTNLP.hpp +820 -0
- casadi/include/include/coin-or/IpTNLPAdapter.hpp +648 -0
- casadi/include/include/coin-or/IpTNLPReducer.hpp +274 -0
- casadi/include/include/coin-or/IpTaggedObject.hpp +128 -0
- casadi/include/include/coin-or/IpTimedTask.hpp +218 -0
- casadi/include/include/coin-or/IpTimingStatistics.hpp +323 -0
- casadi/include/include/coin-or/IpTripletHelper.hpp +308 -0
- casadi/include/include/coin-or/IpTypes.h +81 -0
- casadi/include/include/coin-or/IpTypes.hpp +30 -0
- casadi/include/include/coin-or/IpUtils.hpp +166 -0
- casadi/include/include/coin-or/IpVector.hpp +892 -0
- casadi/include/include/coin-or/IpZeroSymMatrix.hpp +155 -0
- casadi/include/include/coin-or/IpoptConfig.h +45 -0
- casadi/include/include/coin-or/SensAlgorithm.hpp +114 -0
- casadi/include/include/coin-or/SensApplication.hpp +188 -0
- casadi/include/include/coin-or/SensBacksolver.hpp +36 -0
- casadi/include/include/coin-or/SensMeasurement.hpp +56 -0
- casadi/include/include/coin-or/SensPCalculator.hpp +137 -0
- casadi/include/include/coin-or/SensRegOp.hpp +21 -0
- casadi/include/include/coin-or/SensSchurData.hpp +182 -0
- casadi/include/include/coin-or/SensSchurDriver.hpp +118 -0
- casadi/include/include/coin-or/SensSimpleBacksolver.hpp +49 -0
- casadi/include/include/coin-or/SensStepCalc.hpp +85 -0
- casadi/include/include/coin-or/SensUtils.hpp +63 -0
- casadi/include/include/coin-or/metis/defs.h +161 -0
- casadi/include/include/coin-or/metis/macros.h +143 -0
- casadi/include/include/coin-or/metis/metis.h +37 -0
- casadi/include/include/coin-or/metis/proto.h +505 -0
- casadi/include/include/coin-or/metis/rename.h +418 -0
- casadi/include/include/coin-or/metis/struct.h +251 -0
- casadi/include/include/coin-or/mumps/dmumps_c.h +142 -0
- casadi/include/include/coin-or/mumps/mumps_c_types.h +72 -0
- casadi/include/include/coin-or/mumps/mumps_compat.h +27 -0
- casadi/include/include/coin-or/mumps/mumps_int_def.h +11 -0
- casadi/include/include/coin-or/mumps/mumps_mpi.h +67 -0
- casadi/include/include/d_blas.h +78 -0
- casadi/include/include/d_blas_64.h +73 -0
- casadi/include/include/highs/HConfig.h +20 -0
- casadi/include/include/highs/Highs.h +1459 -0
- casadi/include/include/highs/filereaderlp/builder.hpp +25 -0
- casadi/include/include/highs/filereaderlp/model.hpp +68 -0
- casadi/include/include/highs/filereaderlp/reader.hpp +10 -0
- casadi/include/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/include/include/highs/interfaces/highs_c_api.h +2107 -0
- casadi/include/include/highs/io/Filereader.h +47 -0
- casadi/include/include/highs/io/FilereaderEms.h +33 -0
- casadi/include/include/highs/io/FilereaderLp.h +54 -0
- casadi/include/include/highs/io/FilereaderMps.h +30 -0
- casadi/include/include/highs/io/HMPSIO.h +81 -0
- casadi/include/include/highs/io/HMpsFF.h +233 -0
- casadi/include/include/highs/io/HighsIO.h +99 -0
- casadi/include/include/highs/io/LoadOptions.h +27 -0
- casadi/include/include/highs/ipm/IpxWrapper.h +73 -0
- casadi/include/include/highs/lp_data/HConst.h +295 -0
- casadi/include/include/highs/lp_data/HStruct.h +124 -0
- casadi/include/include/highs/lp_data/HighsAnalysis.h +26 -0
- casadi/include/include/highs/lp_data/HighsCallback.h +33 -0
- casadi/include/include/highs/lp_data/HighsCallbackStruct.h +36 -0
- casadi/include/include/highs/lp_data/HighsDebug.h +37 -0
- casadi/include/include/highs/lp_data/HighsInfo.h +304 -0
- casadi/include/include/highs/lp_data/HighsInfoDebug.h +30 -0
- casadi/include/include/highs/lp_data/HighsLp.h +85 -0
- casadi/include/include/highs/lp_data/HighsLpSolverObject.h +48 -0
- casadi/include/include/highs/lp_data/HighsLpUtils.h +266 -0
- casadi/include/include/highs/lp_data/HighsModelUtils.h +109 -0
- casadi/include/include/highs/lp_data/HighsOptions.h +1130 -0
- casadi/include/include/highs/lp_data/HighsRanging.h +46 -0
- casadi/include/include/highs/lp_data/HighsRuntimeOptions.h +276 -0
- casadi/include/include/highs/lp_data/HighsSolution.h +137 -0
- casadi/include/include/highs/lp_data/HighsSolutionDebug.h +90 -0
- casadi/include/include/highs/lp_data/HighsSolve.h +24 -0
- casadi/include/include/highs/lp_data/HighsStatus.h +32 -0
- casadi/include/include/highs/mip/HighsCliqueTable.h +318 -0
- casadi/include/include/highs/mip/HighsConflictPool.h +112 -0
- casadi/include/include/highs/mip/HighsCutGeneration.h +96 -0
- casadi/include/include/highs/mip/HighsCutPool.h +171 -0
- casadi/include/include/highs/mip/HighsDebugSol.h +142 -0
- casadi/include/include/highs/mip/HighsDomain.h +633 -0
- casadi/include/include/highs/mip/HighsDomainChange.h +51 -0
- casadi/include/include/highs/mip/HighsDynamicRowMatrix.h +105 -0
- casadi/include/include/highs/mip/HighsGFkSolve.h +441 -0
- casadi/include/include/highs/mip/HighsImplications.h +146 -0
- casadi/include/include/highs/mip/HighsLpAggregator.h +53 -0
- casadi/include/include/highs/mip/HighsLpRelaxation.h +355 -0
- casadi/include/include/highs/mip/HighsMipSolver.h +103 -0
- casadi/include/include/highs/mip/HighsMipSolverData.h +193 -0
- casadi/include/include/highs/mip/HighsModkSeparator.h +63 -0
- casadi/include/include/highs/mip/HighsNodeQueue.h +312 -0
- casadi/include/include/highs/mip/HighsObjectiveFunction.h +74 -0
- casadi/include/include/highs/mip/HighsPathSeparator.h +42 -0
- casadi/include/include/highs/mip/HighsPrimalHeuristics.h +68 -0
- casadi/include/include/highs/mip/HighsPseudocost.h +351 -0
- casadi/include/include/highs/mip/HighsRedcostFixing.h +45 -0
- casadi/include/include/highs/mip/HighsSearch.h +243 -0
- casadi/include/include/highs/mip/HighsSeparation.h +44 -0
- casadi/include/include/highs/mip/HighsSeparator.h +56 -0
- casadi/include/include/highs/mip/HighsTableauSeparator.h +37 -0
- casadi/include/include/highs/mip/HighsTransformedLp.h +66 -0
- casadi/include/include/highs/model/HighsHessian.h +49 -0
- casadi/include/include/highs/model/HighsHessianUtils.h +47 -0
- casadi/include/include/highs/model/HighsModel.h +43 -0
- casadi/include/include/highs/parallel/HighsBinarySemaphore.h +113 -0
- casadi/include/include/highs/parallel/HighsCacheAlign.h +87 -0
- casadi/include/include/highs/parallel/HighsCombinable.h +121 -0
- casadi/include/include/highs/parallel/HighsMutex.h +128 -0
- casadi/include/include/highs/parallel/HighsParallel.h +128 -0
- casadi/include/include/highs/parallel/HighsRaceTimer.h +43 -0
- casadi/include/include/highs/parallel/HighsSchedulerConstants.h +24 -0
- casadi/include/include/highs/parallel/HighsSpinMutex.h +53 -0
- casadi/include/include/highs/parallel/HighsSplitDeque.h +583 -0
- casadi/include/include/highs/parallel/HighsTask.h +176 -0
- casadi/include/include/highs/parallel/HighsTaskExecutor.h +209 -0
- casadi/include/include/highs/presolve/HPresolve.h +352 -0
- casadi/include/include/highs/presolve/HPresolveAnalysis.h +54 -0
- casadi/include/include/highs/presolve/HighsPostsolveStack.h +883 -0
- casadi/include/include/highs/presolve/HighsSymmetry.h +283 -0
- casadi/include/include/highs/presolve/ICrash.h +121 -0
- casadi/include/include/highs/presolve/ICrashUtil.h +65 -0
- casadi/include/include/highs/presolve/ICrashX.h +26 -0
- casadi/include/include/highs/presolve/PresolveComponent.h +93 -0
- casadi/include/include/highs/qpsolver/a_asm.hpp +56 -0
- casadi/include/include/highs/qpsolver/a_quass.hpp +12 -0
- casadi/include/include/highs/qpsolver/perturbation.hpp +8 -0
- casadi/include/include/highs/qpsolver/quass.hpp +20 -0
- casadi/include/include/highs/qpsolver/scaling.hpp +8 -0
- casadi/include/include/highs/qpsolver/vector.hpp +235 -0
- casadi/include/include/highs/simplex/HApp.h +422 -0
- casadi/include/include/highs/simplex/HEkk.h +369 -0
- casadi/include/include/highs/simplex/HEkkDual.h +515 -0
- casadi/include/include/highs/simplex/HEkkDualRHS.h +138 -0
- casadi/include/include/highs/simplex/HEkkDualRow.h +204 -0
- casadi/include/include/highs/simplex/HEkkPrimal.h +190 -0
- casadi/include/include/highs/simplex/HSimplex.h +47 -0
- casadi/include/include/highs/simplex/HSimplexDebug.h +51 -0
- casadi/include/include/highs/simplex/HSimplexNla.h +184 -0
- casadi/include/include/highs/simplex/HSimplexReport.h +24 -0
- casadi/include/include/highs/simplex/HighsSimplexAnalysis.h +375 -0
- casadi/include/include/highs/simplex/SimplexConst.h +274 -0
- casadi/include/include/highs/simplex/SimplexStruct.h +264 -0
- casadi/include/include/highs/simplex/SimplexTimer.h +427 -0
- casadi/include/include/highs/test/DevKkt.h +146 -0
- casadi/include/include/highs/test/KktCh2.h +82 -0
- casadi/include/include/highs/util/FactorTimer.h +224 -0
- casadi/include/include/highs/util/HFactor.h +558 -0
- casadi/include/include/highs/util/HFactorConst.h +84 -0
- casadi/include/include/highs/util/HFactorDebug.h +58 -0
- casadi/include/include/highs/util/HSet.h +92 -0
- casadi/include/include/highs/util/HVector.h +25 -0
- casadi/include/include/highs/util/HVectorBase.h +105 -0
- casadi/include/include/highs/util/HighsCDouble.h +310 -0
- casadi/include/include/highs/util/HighsComponent.h +56 -0
- casadi/include/include/highs/util/HighsDataStack.h +86 -0
- casadi/include/include/highs/util/HighsDisjointSets.h +110 -0
- casadi/include/include/highs/util/HighsHash.h +1270 -0
- casadi/include/include/highs/util/HighsHashTree.h +1443 -0
- casadi/include/include/highs/util/HighsInt.h +39 -0
- casadi/include/include/highs/util/HighsIntegers.h +216 -0
- casadi/include/include/highs/util/HighsLinearSumBounds.h +160 -0
- casadi/include/include/highs/util/HighsMatrixPic.h +40 -0
- casadi/include/include/highs/util/HighsMatrixSlice.h +561 -0
- casadi/include/include/highs/util/HighsMatrixUtils.h +57 -0
- casadi/include/include/highs/util/HighsRandom.h +233 -0
- casadi/include/include/highs/util/HighsRbTree.h +455 -0
- casadi/include/include/highs/util/HighsSort.h +134 -0
- casadi/include/include/highs/util/HighsSparseMatrix.h +144 -0
- casadi/include/include/highs/util/HighsSparseVectorSum.h +98 -0
- casadi/include/include/highs/util/HighsSplay.h +138 -0
- casadi/include/include/highs/util/HighsTimer.h +334 -0
- casadi/include/include/highs/util/HighsUtils.h +203 -0
- casadi/include/include/highs/util/stringutil.h +39 -0
- casadi/include/include/highs_export.h +42 -0
- casadi/include/include/hpipm_aux_mem.h +52 -0
- casadi/include/include/hpipm_aux_string.h +50 -0
- casadi/include/include/hpipm_common.h +76 -0
- casadi/include/include/hpipm_d_cast_qcqp.h +71 -0
- casadi/include/include/hpipm_d_cond.h +135 -0
- casadi/include/include/hpipm_d_cond_aux.h +92 -0
- casadi/include/include/hpipm_d_cond_qcqp.h +129 -0
- casadi/include/include/hpipm_d_core_qp_ipm.h +101 -0
- casadi/include/include/hpipm_d_core_qp_ipm_aux.h +68 -0
- casadi/include/include/hpipm_d_dense_qcqp.h +199 -0
- casadi/include/include/hpipm_d_dense_qcqp_dim.h +98 -0
- casadi/include/include/hpipm_d_dense_qcqp_ipm.h +193 -0
- casadi/include/include/hpipm_d_dense_qcqp_res.h +108 -0
- casadi/include/include/hpipm_d_dense_qcqp_sol.h +85 -0
- casadi/include/include/hpipm_d_dense_qcqp_utils.h +82 -0
- casadi/include/include/hpipm_d_dense_qp.h +207 -0
- casadi/include/include/hpipm_d_dense_qp_dim.h +92 -0
- casadi/include/include/hpipm_d_dense_qp_ipm.h +260 -0
- casadi/include/include/hpipm_d_dense_qp_kkt.h +72 -0
- casadi/include/include/hpipm_d_dense_qp_res.h +106 -0
- casadi/include/include/hpipm_d_dense_qp_sol.h +94 -0
- casadi/include/include/hpipm_d_dense_qp_utils.h +83 -0
- casadi/include/include/hpipm_d_ocp_qcqp.h +322 -0
- casadi/include/include/hpipm_d_ocp_qcqp_dim.h +130 -0
- casadi/include/include/hpipm_d_ocp_qcqp_ipm.h +192 -0
- casadi/include/include/hpipm_d_ocp_qcqp_red.h +118 -0
- casadi/include/include/hpipm_d_ocp_qcqp_res.h +115 -0
- casadi/include/include/hpipm_d_ocp_qcqp_sol.h +114 -0
- casadi/include/include/hpipm_d_ocp_qcqp_utils.h +81 -0
- casadi/include/include/hpipm_d_ocp_qp.h +306 -0
- casadi/include/include/hpipm_d_ocp_qp_dim.h +142 -0
- casadi/include/include/hpipm_d_ocp_qp_ipm.h +252 -0
- casadi/include/include/hpipm_d_ocp_qp_kkt.h +66 -0
- casadi/include/include/hpipm_d_ocp_qp_red.h +117 -0
- casadi/include/include/hpipm_d_ocp_qp_res.h +113 -0
- casadi/include/include/hpipm_d_ocp_qp_sol.h +128 -0
- casadi/include/include/hpipm_d_ocp_qp_utils.h +82 -0
- casadi/include/include/hpipm_d_part_cond.h +115 -0
- casadi/include/include/hpipm_d_part_cond_qcqp.h +106 -0
- casadi/include/include/hpipm_d_sim_erk.h +122 -0
- casadi/include/include/hpipm_d_sim_rk.h +71 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp.h +213 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp_dim.h +117 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp_ipm.h +191 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp_res.h +109 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp_sol.h +99 -0
- casadi/include/include/hpipm_d_tree_ocp_qcqp_utils.h +84 -0
- casadi/include/include/hpipm_d_tree_ocp_qp.h +195 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_dim.h +111 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_ipm.h +209 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_kkt.h +52 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_res.h +107 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_sol.h +100 -0
- casadi/include/include/hpipm_d_tree_ocp_qp_utils.h +83 -0
- casadi/include/include/hpipm_m_dense_qp.h +68 -0
- casadi/include/include/hpipm_m_dense_qp_dim.h +68 -0
- casadi/include/include/hpipm_m_ocp_qp.h +49 -0
- casadi/include/include/hpipm_m_ocp_qp_ipm_hard.h +115 -0
- casadi/include/include/hpipm_m_ocp_qp_kkt.h +45 -0
- casadi/include/include/hpipm_s_cast_qcqp.h +72 -0
- casadi/include/include/hpipm_s_cond.h +137 -0
- casadi/include/include/hpipm_s_cond_aux.h +92 -0
- casadi/include/include/hpipm_s_cond_qcqp.h +130 -0
- casadi/include/include/hpipm_s_core_qp_ipm.h +101 -0
- casadi/include/include/hpipm_s_core_qp_ipm_aux.h +68 -0
- casadi/include/include/hpipm_s_dense_qcqp.h +200 -0
- casadi/include/include/hpipm_s_dense_qcqp_dim.h +99 -0
- casadi/include/include/hpipm_s_dense_qcqp_ipm.h +204 -0
- casadi/include/include/hpipm_s_dense_qcqp_res.h +109 -0
- casadi/include/include/hpipm_s_dense_qcqp_sol.h +86 -0
- casadi/include/include/hpipm_s_dense_qcqp_utils.h +83 -0
- casadi/include/include/hpipm_s_dense_qp.h +207 -0
- casadi/include/include/hpipm_s_dense_qp_dim.h +94 -0
- casadi/include/include/hpipm_s_dense_qp_ipm.h +260 -0
- casadi/include/include/hpipm_s_dense_qp_kkt.h +72 -0
- casadi/include/include/hpipm_s_dense_qp_res.h +107 -0
- casadi/include/include/hpipm_s_dense_qp_sol.h +94 -0
- casadi/include/include/hpipm_s_dense_qp_utils.h +84 -0
- casadi/include/include/hpipm_s_ocp_qcqp.h +322 -0
- casadi/include/include/hpipm_s_ocp_qcqp_dim.h +131 -0
- casadi/include/include/hpipm_s_ocp_qcqp_ipm.h +193 -0
- casadi/include/include/hpipm_s_ocp_qcqp_red.h +119 -0
- casadi/include/include/hpipm_s_ocp_qcqp_res.h +116 -0
- casadi/include/include/hpipm_s_ocp_qcqp_sol.h +115 -0
- casadi/include/include/hpipm_s_ocp_qcqp_utils.h +82 -0
- casadi/include/include/hpipm_s_ocp_qp.h +306 -0
- casadi/include/include/hpipm_s_ocp_qp_dim.h +141 -0
- casadi/include/include/hpipm_s_ocp_qp_ipm.h +252 -0
- casadi/include/include/hpipm_s_ocp_qp_kkt.h +66 -0
- casadi/include/include/hpipm_s_ocp_qp_red.h +118 -0
- casadi/include/include/hpipm_s_ocp_qp_res.h +115 -0
- casadi/include/include/hpipm_s_ocp_qp_sol.h +128 -0
- casadi/include/include/hpipm_s_ocp_qp_utils.h +83 -0
- casadi/include/include/hpipm_s_part_cond.h +115 -0
- casadi/include/include/hpipm_s_part_cond_qcqp.h +107 -0
- casadi/include/include/hpipm_s_sim_erk.h +121 -0
- casadi/include/include/hpipm_s_sim_rk.h +72 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp.h +213 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp_dim.h +118 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp_ipm.h +192 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp_res.h +110 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp_sol.h +97 -0
- casadi/include/include/hpipm_s_tree_ocp_qcqp_utils.h +85 -0
- casadi/include/include/hpipm_s_tree_ocp_qp.h +196 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_dim.h +111 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_ipm.h +208 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_kkt.h +54 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_res.h +108 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_sol.h +98 -0
- casadi/include/include/hpipm_s_tree_ocp_qp_utils.h +84 -0
- casadi/include/include/hpipm_scenario_tree.h +70 -0
- casadi/include/include/hpipm_timing.h +67 -0
- casadi/include/include/hpipm_tree.h +76 -0
- casadi/include/include/osqp/auxil.h +181 -0
- casadi/include/include/osqp/constants.h +129 -0
- casadi/include/include/osqp/cs.h +180 -0
- casadi/include/include/osqp/ctrlc.h +56 -0
- casadi/include/include/osqp/error.h +38 -0
- casadi/include/include/osqp/glob_opts.h +167 -0
- casadi/include/include/osqp/lin_alg.h +216 -0
- casadi/include/include/osqp/lin_sys.h +54 -0
- casadi/include/include/osqp/osqp.h +430 -0
- casadi/include/include/osqp/osqp_configure.h +49 -0
- casadi/include/include/osqp/polish.h +25 -0
- casadi/include/include/osqp/proj.h +37 -0
- casadi/include/include/osqp/scaling.h +44 -0
- casadi/include/include/osqp/types.h +326 -0
- casadi/include/include/osqp/util.h +222 -0
- casadi/include/include/qdldl/qdldl.h +169 -0
- casadi/include/include/qdldl/qdldl_types.h +23 -0
- casadi/include/include/s_blas.h +78 -0
- casadi/include/include/s_blas_64.h +73 -0
- casadi/include/include/sleqp/defs.h +58 -0
- casadi/include/include/sleqp/export.h +42 -0
- casadi/include/include/sleqp/pub_cmp.h +18 -0
- casadi/include/include/sleqp/pub_dyn.h +140 -0
- casadi/include/include/sleqp/pub_error.h +50 -0
- casadi/include/include/sleqp/pub_func.h +257 -0
- casadi/include/include/sleqp/pub_hess_struct.h +105 -0
- casadi/include/include/sleqp/pub_iterate.h +88 -0
- casadi/include/include/sleqp/pub_log.h +88 -0
- casadi/include/include/sleqp/pub_lsq.h +158 -0
- casadi/include/include/sleqp/pub_mem.h +52 -0
- casadi/include/include/sleqp/pub_problem.h +213 -0
- casadi/include/include/sleqp/pub_scale.h +150 -0
- casadi/include/include/sleqp/pub_settings.h +162 -0
- casadi/include/include/sleqp/pub_solver.h +155 -0
- casadi/include/include/sleqp/pub_types.h +230 -0
- casadi/include/include/sleqp/pub_working_set.h +135 -0
- casadi/include/include/sleqp/sparse/pub_mat.h +153 -0
- casadi/include/include/sleqp/sparse/pub_vec.h +336 -0
- casadi/include/include/sleqp.h +38 -0
- casadi/include/include/superscs/cones.h +185 -0
- casadi/include/include/superscs/constants.h +144 -0
- casadi/include/include/superscs/cs.h +109 -0
- casadi/include/include/superscs/ctrlc.h +77 -0
- casadi/include/include/superscs/directions.h +125 -0
- casadi/include/include/superscs/glbopts.h +240 -0
- casadi/include/include/superscs/linAlg.h +437 -0
- casadi/include/include/superscs/linSys.h +205 -0
- casadi/include/include/superscs/linsys/amatrix.h +77 -0
- casadi/include/include/superscs/linsys/common.h +49 -0
- casadi/include/include/superscs/normalize.h +138 -0
- casadi/include/include/superscs/scs.h +656 -0
- casadi/include/include/superscs/scs_blas.h +79 -0
- casadi/include/include/superscs/scs_parser.h +187 -0
- casadi/include/include/superscs/unit_test_util.h +210 -0
- casadi/include/include/superscs/util.h +354 -0
- casadi/include/include/trlib/trlib_eigen_inverse.h +118 -0
- casadi/include/include/trlib/trlib_krylov.h +493 -0
- casadi/include/include/trlib/trlib_leftmost.h +181 -0
- casadi/include/include/trlib/trlib_private.h +109 -0
- casadi/include/include/trlib/trlib_quadratic_zero.h +57 -0
- casadi/include/include/trlib/trlib_tri_factor.h +409 -0
- casadi/include/include/trlib/trlib_types.h +36 -0
- casadi/include/include/trlib.h +44 -0
- casadi/include/licenses/CSparse/Doc/License.txt +19 -0
- casadi/include/licenses/FMI-Standard-2.0.2/LICENSE.txt +473 -0
- casadi/include/licenses/FMI-Standard-3.0/LICENSE.txt +464 -0
- casadi/include/licenses/blasfeo-external/LICENSE.txt +26 -0
- casadi/include/licenses/bonmin-external/Bonmin/LICENSE +87 -0
- casadi/include/licenses/bonmin-external/LICENSE +3 -0
- casadi/include/licenses/casadi/LICENSE/LICENSE.txt +165 -0
- casadi/include/licenses/casadi-sundials/LICENSE +64 -0
- casadi/include/licenses/casadi-sundials/cvodes/LICENSE +60 -0
- casadi/include/licenses/casadi-sundials/idas/LICENSE +59 -0
- casadi/include/licenses/casadi-sundials/kinsol/LICENSE +59 -0
- casadi/include/licenses/casadi-sundials/sundials/LICENSE +67 -0
- casadi/include/licenses/cbc-external/Cbc/LICENSE +239 -0
- casadi/include/licenses/cbc-external/LICENSE +245 -0
- casadi/include/licenses/cgl-external/Cgl/LICENSE +239 -0
- casadi/include/licenses/cgl-external/LICENSE +245 -0
- casadi/include/licenses/clp-external/Clp/LICENSE +239 -0
- casadi/include/licenses/clp-external/LICENSE +245 -0
- casadi/include/licenses/coinutils-external/CoinUtils/LICENSE +239 -0
- casadi/include/licenses/coinutils-external/LICENSE +245 -0
- casadi/include/licenses/highs-external/LICENSE +21 -0
- casadi/include/licenses/highs-external/extern/filereaderlp/LICENSE +19 -0
- casadi/include/licenses/highs-external/extern/pdqsort/license.txt +16 -0
- casadi/include/licenses/hpipm-external/LICENSE.txt +26 -0
- casadi/include/licenses/hpipm-external/experimental/andrea/prototype/code/plotregion/license.txt +24 -0
- casadi/include/licenses/ipopt-external/LICENSE +260 -0
- casadi/include/licenses/metis-external/LICENSE +87 -0
- casadi/include/licenses/metis-external/metis-4.0/LICENSE +18 -0
- casadi/include/licenses/mockups-external/LICENSE +21 -0
- casadi/include/licenses/mumps-external/LICENSE +87 -0
- casadi/include/licenses/mumps-external/MUMPS/LICENSE +50 -0
- casadi/include/licenses/osi-external/LICENSE +245 -0
- casadi/include/licenses/osi-external/Osi/LICENSE +239 -0
- casadi/include/licenses/osqp-external/LICENSE +201 -0
- casadi/include/licenses/osqp-external/lin_sys/direct/qdldl/amd/LICENSE +36 -0
- casadi/include/licenses/osqp-external/lin_sys/direct/qdldl/qdldl_sources/LICENSE +201 -0
- casadi/include/licenses/qpOASES/LICENSE.txt +503 -0
- casadi/include/licenses/sleqp-external/LICENSE +165 -0
- casadi/include/licenses/superscs-external/LICENSE.txt +24 -0
- casadi/include/licenses/tinyxml2-9.0.0/LICENSE.txt +18 -0
- casadi/include/licenses/trlib-external/LICENSE +21 -0
- casadi/include/osqp/auxil.h +181 -0
- casadi/include/osqp/constants.h +129 -0
- casadi/include/osqp/cs.h +180 -0
- casadi/include/osqp/ctrlc.h +56 -0
- casadi/include/osqp/error.h +38 -0
- casadi/include/osqp/glob_opts.h +167 -0
- casadi/include/osqp/lin_alg.h +216 -0
- casadi/include/osqp/lin_sys.h +54 -0
- casadi/include/osqp/osqp.h +430 -0
- casadi/include/osqp/osqp_configure.h +49 -0
- casadi/include/osqp/polish.h +25 -0
- casadi/include/osqp/proj.h +37 -0
- casadi/include/osqp/scaling.h +44 -0
- casadi/include/osqp/types.h +326 -0
- casadi/include/osqp/util.h +222 -0
- casadi/include/superscs/cones.h +185 -0
- casadi/include/superscs/constants.h +144 -0
- casadi/include/superscs/cs.h +109 -0
- casadi/include/superscs/ctrlc.h +77 -0
- casadi/include/superscs/directions.h +125 -0
- casadi/include/superscs/glbopts.h +240 -0
- casadi/include/superscs/linAlg.h +437 -0
- casadi/include/superscs/linSys.h +205 -0
- casadi/include/superscs/linsys/amatrix.h +77 -0
- casadi/include/superscs/linsys/common.h +49 -0
- casadi/include/superscs/normalize.h +138 -0
- casadi/include/superscs/scs.h +656 -0
- casadi/include/superscs/scs_blas.h +79 -0
- casadi/include/superscs/scs_parser.h +187 -0
- casadi/include/superscs/unit_test_util.h +210 -0
- casadi/include/superscs/util.h +354 -0
- casadi/include/tinyxml2.h +2380 -0
- casadi/include/trlib/trlib_eigen_inverse.h +118 -0
- casadi/include/trlib/trlib_krylov.h +493 -0
- casadi/include/trlib/trlib_leftmost.h +181 -0
- casadi/include/trlib/trlib_private.h +109 -0
- casadi/include/trlib/trlib_quadratic_zero.h +57 -0
- casadi/include/trlib/trlib_tri_factor.h +409 -0
- casadi/include/trlib/trlib_types.h +36 -0
- casadi/lib/cmake/tinyxml2/tinyxml2-config-version.cmake +65 -0
- casadi/lib/cmake/tinyxml2/tinyxml2-config.cmake +57 -0
- casadi/lib/cmake/tinyxml2/tinyxml2-static-targets-release.cmake +19 -0
- casadi/lib/cmake/tinyxml2/tinyxml2-static-targets.cmake +103 -0
- casadi/lib/libtinyxml2.a +0 -0
- casadi/lib/pkgconfig/tinyxml2.pc +10 -0
- casadi/libCbc.3.10.11.dylib +0 -0
- casadi/libCbc.3.dylib +0 -0
- casadi/libCbc.dylib +0 -0
- casadi/libCbc.la +35 -0
- casadi/libCbcSolver.3.10.11.dylib +0 -0
- casadi/libCbcSolver.3.dylib +0 -0
- casadi/libCbcSolver.dylib +0 -0
- casadi/libCbcSolver.la +35 -0
- casadi/libCgl.1.10.8.dylib +0 -0
- casadi/libCgl.1.dylib +0 -0
- casadi/libCgl.dylib +0 -0
- casadi/libCgl.la +35 -0
- casadi/libClp.1.14.9.dylib +0 -0
- casadi/libClp.1.dylib +0 -0
- casadi/libClp.dylib +0 -0
- casadi/libClp.la +35 -0
- casadi/libClpSolver.1.14.9.dylib +0 -0
- casadi/libClpSolver.1.dylib +0 -0
- casadi/libClpSolver.dylib +0 -0
- casadi/libClpSolver.la +35 -0
- casadi/libCoinUtils.3.11.10.dylib +0 -0
- casadi/libCoinUtils.3.dylib +0 -0
- casadi/libCoinUtils.dylib +0 -0
- casadi/libCoinUtils.la +35 -0
- casadi/libFortranHighs.dylib +0 -0
- casadi/libOsi.1.13.9.dylib +0 -0
- casadi/libOsi.1.dylib +0 -0
- casadi/libOsi.dylib +0 -0
- casadi/libOsi.la +35 -0
- casadi/libOsiCbc.3.10.11.dylib +0 -0
- casadi/libOsiCbc.3.dylib +0 -0
- casadi/libOsiCbc.dylib +0 -0
- casadi/libOsiCbc.la +35 -0
- casadi/libOsiClp.1.14.9.dylib +0 -0
- casadi/libOsiClp.1.dylib +0 -0
- casadi/libOsiClp.dylib +0 -0
- casadi/libOsiClp.la +35 -0
- casadi/libOsiCommonTests.1.13.9.dylib +0 -0
- casadi/libOsiCommonTests.1.dylib +0 -0
- casadi/libOsiCommonTests.dylib +0 -0
- casadi/libOsiCommonTests.la +35 -0
- casadi/libblasfeo.dylib +0 -0
- casadi/libbonmin.4.8.9.dylib +0 -0
- casadi/libbonmin.4.dylib +0 -0
- casadi/libbonmin.dylib +0 -0
- casadi/libbonmin.la +35 -0
- casadi/libc++.1.0.dylib +0 -0
- casadi/libcasadi.3.7.dylib +0 -0
- casadi/libcasadi.dylib +0 -0
- casadi/libcasadi_conic_cbc.3.7.dylib +0 -0
- casadi/libcasadi_conic_cbc.dylib +0 -0
- casadi/libcasadi_conic_clp.3.7.dylib +0 -0
- casadi/libcasadi_conic_clp.dylib +0 -0
- casadi/libcasadi_conic_cplex.3.7.dylib +0 -0
- casadi/libcasadi_conic_cplex.dylib +0 -0
- casadi/libcasadi_conic_gurobi.3.7.dylib +0 -0
- casadi/libcasadi_conic_gurobi.dylib +0 -0
- casadi/libcasadi_conic_highs.3.7.dylib +0 -0
- casadi/libcasadi_conic_highs.dylib +0 -0
- casadi/libcasadi_conic_hpipm.3.7.dylib +0 -0
- casadi/libcasadi_conic_hpipm.dylib +0 -0
- casadi/libcasadi_conic_ipqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_ipqp.dylib +0 -0
- casadi/libcasadi_conic_nlpsol.3.7.dylib +0 -0
- casadi/libcasadi_conic_nlpsol.dylib +0 -0
- casadi/libcasadi_conic_osqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_osqp.dylib +0 -0
- casadi/libcasadi_conic_qpoases.3.7.dylib +0 -0
- casadi/libcasadi_conic_qpoases.dylib +0 -0
- casadi/libcasadi_conic_qrqp.3.7.dylib +0 -0
- casadi/libcasadi_conic_qrqp.dylib +0 -0
- casadi/libcasadi_conic_superscs.3.7.dylib +0 -0
- casadi/libcasadi_conic_superscs.dylib +0 -0
- casadi/libcasadi_importer_shell.3.7.dylib +0 -0
- casadi/libcasadi_importer_shell.dylib +0 -0
- casadi/libcasadi_integrator_collocation.3.7.dylib +0 -0
- casadi/libcasadi_integrator_collocation.dylib +0 -0
- casadi/libcasadi_integrator_cvodes.3.7.dylib +0 -0
- casadi/libcasadi_integrator_cvodes.dylib +0 -0
- casadi/libcasadi_integrator_idas.3.7.dylib +0 -0
- casadi/libcasadi_integrator_idas.dylib +0 -0
- casadi/libcasadi_integrator_rk.3.7.dylib +0 -0
- casadi/libcasadi_integrator_rk.dylib +0 -0
- casadi/libcasadi_interpolant_bspline.3.7.dylib +0 -0
- casadi/libcasadi_interpolant_bspline.dylib +0 -0
- casadi/libcasadi_interpolant_linear.3.7.dylib +0 -0
- casadi/libcasadi_interpolant_linear.dylib +0 -0
- casadi/libcasadi_linsol_csparse.3.7.dylib +0 -0
- casadi/libcasadi_linsol_csparse.dylib +0 -0
- casadi/libcasadi_linsol_csparsecholesky.3.7.dylib +0 -0
- casadi/libcasadi_linsol_csparsecholesky.dylib +0 -0
- casadi/libcasadi_linsol_lapacklu.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lapacklu.dylib +0 -0
- casadi/libcasadi_linsol_lapackqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lapackqr.dylib +0 -0
- casadi/libcasadi_linsol_ldl.3.7.dylib +0 -0
- casadi/libcasadi_linsol_ldl.dylib +0 -0
- casadi/libcasadi_linsol_lsqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_lsqr.dylib +0 -0
- casadi/libcasadi_linsol_ma27.3.7.dylib +0 -0
- casadi/libcasadi_linsol_ma27.dylib +0 -0
- casadi/libcasadi_linsol_mumps.3.7.dylib +0 -0
- casadi/libcasadi_linsol_mumps.dylib +0 -0
- casadi/libcasadi_linsol_qr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_qr.dylib +0 -0
- casadi/libcasadi_linsol_symbolicqr.3.7.dylib +0 -0
- casadi/libcasadi_linsol_symbolicqr.dylib +0 -0
- casadi/libcasadi_linsol_tridiag.3.7.dylib +0 -0
- casadi/libcasadi_linsol_tridiag.dylib +0 -0
- casadi/libcasadi_nlpsol_ampl.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_ampl.dylib +0 -0
- casadi/libcasadi_nlpsol_blocksqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_blocksqp.dylib +0 -0
- casadi/libcasadi_nlpsol_bonmin.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_bonmin.dylib +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.dylib +0 -0
- casadi/libcasadi_nlpsol_ipopt.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_ipopt.dylib +0 -0
- casadi/libcasadi_nlpsol_knitro.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_knitro.dylib +0 -0
- casadi/libcasadi_nlpsol_qrsqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_qrsqp.dylib +0 -0
- casadi/libcasadi_nlpsol_scpgen.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_scpgen.dylib +0 -0
- casadi/libcasadi_nlpsol_sleqp.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_sleqp.dylib +0 -0
- casadi/libcasadi_nlpsol_snopt.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_snopt.dylib +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.3.7.dylib +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.dylib +0 -0
- casadi/libcasadi_rootfinder_fast_newton.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_fast_newton.dylib +0 -0
- casadi/libcasadi_rootfinder_kinsol.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_kinsol.dylib +0 -0
- casadi/libcasadi_rootfinder_newton.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_newton.dylib +0 -0
- casadi/libcasadi_rootfinder_nlpsol.3.7.dylib +0 -0
- casadi/libcasadi_rootfinder_nlpsol.dylib +0 -0
- casadi/libcasadi_sundials_common.3.7.dylib +0 -0
- casadi/libcasadi_sundials_common.dylib +0 -0
- casadi/libcasadi_xmlfile_tinyxml.3.7.dylib +0 -0
- casadi/libcasadi_xmlfile_tinyxml.dylib +0 -0
- casadi/libcoinmetis.2.dylib +0 -0
- casadi/libcoinmetis.dylib +0 -0
- casadi/libcoinmetis.la +41 -0
- casadi/libcoinmumps.3.dylib +0 -0
- casadi/libcoinmumps.dylib +0 -0
- casadi/libcoinmumps.la +41 -0
- casadi/libcplex_adaptor.dylib +0 -0
- casadi/libgcc_s.1.1.dylib +0 -0
- casadi/libgcc_s.1.dylib +0 -0
- casadi/libgfortran.5.dylib +0 -0
- casadi/libgurobi_adaptor.dylib +0 -0
- casadi/libhighs.1.6.0.dylib +0 -0
- casadi/libhighs.1.6.dylib +0 -0
- casadi/libhighs.dylib +0 -0
- casadi/libhpipm.dylib +0 -0
- casadi/libindirect.a +0 -0
- casadi/libipopt.3.dylib +0 -0
- casadi/libipopt.dylib +0 -0
- casadi/libipopt.la +41 -0
- casadi/liblinsys.a +0 -0
- casadi/libosqp.a +0 -0
- casadi/libosqp.dylib +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libqdldl.dylib +0 -0
- casadi/libquadmath.0.dylib +0 -0
- casadi/libsipopt.3.dylib +0 -0
- casadi/libsipopt.dylib +0 -0
- casadi/libsipopt.la +41 -0
- casadi/libsleqp.1.0.1.dylib +0 -0
- casadi/libsleqp.dylib +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/libtrlib.0.4.dylib +0 -0
- casadi/libtrlib.dylib +0 -0
- casadi/libz.1.2.13.dylib +0 -0
- casadi/pkgconfig/bonmin.pc +12 -0
- casadi/pkgconfig/casadi.pc +12 -0
- casadi/pkgconfig/cbc.pc +12 -0
- casadi/pkgconfig/cgl.pc +12 -0
- casadi/pkgconfig/clp.pc +12 -0
- casadi/pkgconfig/coinmetis.pc +13 -0
- casadi/pkgconfig/coinmumps.pc +15 -0
- casadi/pkgconfig/coinutils.pc +12 -0
- casadi/pkgconfig/highs.pc +12 -0
- casadi/pkgconfig/ipopt.pc +15 -0
- casadi/pkgconfig/osi-cbc.pc +12 -0
- casadi/pkgconfig/osi-clp.pc +12 -0
- casadi/pkgconfig/osi-unittests.pc +12 -0
- casadi/pkgconfig/osi.pc +12 -0
- casadi/pkgconfig/sleqp.pc +10 -0
- casadi/tools/__init__.py +48 -0
- casadi/tools/bounds.py +107 -0
- casadi/tools/graph/__init__.py +35 -0
- casadi/tools/graph/graph.py +747 -0
- casadi/tools/in_out.py +89 -0
- casadi/tools/structure.py +1446 -0
- casadi/tools/structure3.py +1441 -0
- casadi-3.6.4.dist-info/METADATA +37 -0
- casadi-3.6.4.dist-info/RECORD +1327 -0
- casadi-3.6.4.dist-info/WHEEL +5 -0
- dummy.txt +1 -0
@@ -0,0 +1,1443 @@
|
|
1
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
2
|
+
/* */
|
3
|
+
/* This file is part of the HiGHS linear optimization suite */
|
4
|
+
/* */
|
5
|
+
/* Written and engineered 2008-2023 by Julian Hall, Ivet Galabova, */
|
6
|
+
/* Leona Gottwald and Michael Feldmeier */
|
7
|
+
/* */
|
8
|
+
/* Available as open-source under the MIT License */
|
9
|
+
/* */
|
10
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
11
|
+
#ifndef HIGHS_UTIL_HASH_TREE_H_
|
12
|
+
#define HIGHS_UTIL_HASH_TREE_H_
|
13
|
+
|
14
|
+
#include <stdexcept>
|
15
|
+
|
16
|
+
#include "util/HighsHash.h"
|
17
|
+
|
18
|
+
using std::memcpy;
|
19
|
+
using std::memmove;
|
20
|
+
|
21
|
+
template <typename K, typename V = void>
|
22
|
+
class HighsHashTree {
|
23
|
+
using Entry = HighsHashTableEntry<K, V>;
|
24
|
+
using ValueType =
|
25
|
+
typename std::remove_reference<decltype(Entry().value())>::type;
|
26
|
+
|
27
|
+
enum Type {
|
28
|
+
kEmpty = 0,
|
29
|
+
kListLeaf = 1,
|
30
|
+
kInnerLeafSizeClass1 = 2,
|
31
|
+
kInnerLeafSizeClass2 = 3,
|
32
|
+
kInnerLeafSizeClass3 = 4,
|
33
|
+
kInnerLeafSizeClass4 = 5,
|
34
|
+
kBranchNode = 6,
|
35
|
+
};
|
36
|
+
|
37
|
+
enum Constants {
|
38
|
+
kBitsPerLevel = 6,
|
39
|
+
kBranchFactor = 1 << kBitsPerLevel,
|
40
|
+
// even though we could use up to 64 bits of the hash this would require
|
41
|
+
// additional handling in the last levels to avoid negative shift values
|
42
|
+
// up to 9 depth levels are Ok though as up to index 8 the
|
43
|
+
// get_hash_chunks16() function shifts right by a non-negative amount
|
44
|
+
kMaxDepth = 9,
|
45
|
+
kMinLeafSize = 6,
|
46
|
+
kLeafBurstThreshold = 54,
|
47
|
+
};
|
48
|
+
|
49
|
+
static uint64_t compute_hash(const K& key) {
|
50
|
+
return HighsHashHelpers::hash(key);
|
51
|
+
}
|
52
|
+
|
53
|
+
static uint8_t get_hash_chunk(uint64_t hash, int pos) {
|
54
|
+
return (hash >> (64 - kBitsPerLevel - pos * kBitsPerLevel)) &
|
55
|
+
(kBranchFactor - 1);
|
56
|
+
}
|
57
|
+
|
58
|
+
static uint16_t get_hash_chunks16(uint64_t hash, int pos) {
|
59
|
+
return (hash >> (48 - pos * kBitsPerLevel));
|
60
|
+
}
|
61
|
+
|
62
|
+
static uint8_t get_first_chunk16(uint16_t chunks) {
|
63
|
+
return chunks >> (16 - kBitsPerLevel);
|
64
|
+
}
|
65
|
+
|
66
|
+
static void set_hash_chunk(uint64_t& hash, uint64_t chunk, int chunkPos) {
|
67
|
+
const int shiftAmount = (60 - kBitsPerLevel - chunkPos * kBitsPerLevel);
|
68
|
+
chunk ^= (hash >> shiftAmount) & (kBranchFactor - 1);
|
69
|
+
hash ^= chunk << shiftAmount;
|
70
|
+
}
|
71
|
+
|
72
|
+
struct Occupation {
|
73
|
+
uint64_t occupation;
|
74
|
+
|
75
|
+
Occupation() {}
|
76
|
+
Occupation(uint64_t occupation) : occupation(occupation) {}
|
77
|
+
operator uint64_t() const { return occupation; }
|
78
|
+
|
79
|
+
void set(uint8_t pos) { occupation |= uint64_t{1} << (pos); }
|
80
|
+
|
81
|
+
void flip(uint8_t pos) { occupation ^= uint64_t{1} << (pos); }
|
82
|
+
|
83
|
+
bool test(uint8_t pos) const { return occupation & (uint64_t{1} << pos); }
|
84
|
+
|
85
|
+
int num_set_until(uint8_t pos) const {
|
86
|
+
return HighsHashHelpers::popcnt(occupation >> pos);
|
87
|
+
}
|
88
|
+
|
89
|
+
int num_set_after(uint8_t pos) const {
|
90
|
+
return HighsHashHelpers::popcnt(occupation << (63 - (pos)));
|
91
|
+
}
|
92
|
+
|
93
|
+
int num_set() const { return HighsHashHelpers::popcnt(occupation); }
|
94
|
+
};
|
95
|
+
|
96
|
+
static constexpr int entries_to_size_class(unsigned int numEntries) {
|
97
|
+
return 1 + unsigned(numEntries + ((kLeafBurstThreshold - kMinLeafSize) / 3 -
|
98
|
+
kMinLeafSize - 1)) /
|
99
|
+
((kLeafBurstThreshold - kMinLeafSize) / 3);
|
100
|
+
}
|
101
|
+
|
102
|
+
template <int kSizeClass>
|
103
|
+
struct InnerLeaf {
|
104
|
+
static constexpr int capacity() {
|
105
|
+
return kMinLeafSize +
|
106
|
+
(kSizeClass - 1) * (kLeafBurstThreshold - kMinLeafSize) / 3;
|
107
|
+
}
|
108
|
+
// the leaf stores entries the same way as inner nodes
|
109
|
+
// but handles collisions on the occupation flag like a
|
110
|
+
// linear probing hash table.
|
111
|
+
// Since the occupation flag has 64 bits and we only use
|
112
|
+
// 15 collisions should be rare and most often we won't need
|
113
|
+
// to do a linear scan and key comparisons at all
|
114
|
+
Occupation occupation;
|
115
|
+
int size;
|
116
|
+
uint64_t hashes[capacity() + 1];
|
117
|
+
Entry entries[capacity()];
|
118
|
+
|
119
|
+
InnerLeaf() : occupation(0), size(0) { hashes[0] = 0; }
|
120
|
+
|
121
|
+
template <int kOtherSize>
|
122
|
+
InnerLeaf(InnerLeaf<kOtherSize>&& other) {
|
123
|
+
assert(other.size <= capacity());
|
124
|
+
memcpy((void*)this, (void*)&other,
|
125
|
+
(char*)&other.hashes[other.size + 1] - (char*)&other);
|
126
|
+
std::move(&other.entries[0], &other.entries[size], &entries[0]);
|
127
|
+
}
|
128
|
+
|
129
|
+
int get_num_entries() const { return size; }
|
130
|
+
|
131
|
+
std::pair<ValueType*, bool> insert_entry(uint64_t fullHash, int hashPos,
|
132
|
+
Entry& entry) {
|
133
|
+
assert(size < capacity());
|
134
|
+
uint16_t hash = get_hash_chunks16(fullHash, hashPos);
|
135
|
+
uint8_t hashChunk = get_first_chunk16(hash);
|
136
|
+
|
137
|
+
int pos = occupation.num_set_until(hashChunk);
|
138
|
+
|
139
|
+
if (occupation.test(hashChunk)) {
|
140
|
+
// since the occupation flag is set we need to start searching from
|
141
|
+
// pos-1 and can rely on a hash chunk with the same value existing for
|
142
|
+
// the scan
|
143
|
+
--pos;
|
144
|
+
while (hashes[pos] > hash) ++pos;
|
145
|
+
|
146
|
+
while (pos != size && hashes[pos] == hash) {
|
147
|
+
if (entry.key() == entries[pos].key())
|
148
|
+
return std::make_pair(&entries[pos].value(), false);
|
149
|
+
|
150
|
+
++pos;
|
151
|
+
}
|
152
|
+
|
153
|
+
if (pos < size) {
|
154
|
+
std::move_backward(&entries[pos], &entries[size], &entries[size + 1]);
|
155
|
+
memmove(&hashes[pos + 1], &hashes[pos],
|
156
|
+
sizeof(hashes[0]) * (size - pos));
|
157
|
+
}
|
158
|
+
|
159
|
+
entries[pos] = std::move(entry);
|
160
|
+
hashes[pos] = hash;
|
161
|
+
++size;
|
162
|
+
hashes[size] = 0;
|
163
|
+
} else {
|
164
|
+
occupation.set(hashChunk);
|
165
|
+
|
166
|
+
if (pos < size) {
|
167
|
+
while (hashes[pos] > hash) ++pos;
|
168
|
+
std::move_backward(&entries[pos], &entries[size], &entries[size + 1]);
|
169
|
+
memmove(&hashes[pos + 1], &hashes[pos],
|
170
|
+
sizeof(hashes[0]) * (size - pos));
|
171
|
+
}
|
172
|
+
|
173
|
+
entries[pos] = std::move(entry);
|
174
|
+
hashes[pos] = hash;
|
175
|
+
++size;
|
176
|
+
hashes[size] = 0;
|
177
|
+
}
|
178
|
+
|
179
|
+
return std::make_pair(&entries[pos].value(), true);
|
180
|
+
}
|
181
|
+
|
182
|
+
ValueType* find_entry(uint64_t fullHash, int hashPos, const K& key) {
|
183
|
+
uint16_t hash = get_hash_chunks16(fullHash, hashPos);
|
184
|
+
uint8_t hashChunk = get_first_chunk16(hash);
|
185
|
+
if (!occupation.test(hashChunk)) return nullptr;
|
186
|
+
|
187
|
+
int pos = occupation.num_set_until(hashChunk) - 1;
|
188
|
+
while (hashes[pos] > hash) ++pos;
|
189
|
+
|
190
|
+
while (pos != size && hashes[pos] == hash) {
|
191
|
+
if (key == entries[pos].key()) return &entries[pos].value();
|
192
|
+
++pos;
|
193
|
+
}
|
194
|
+
|
195
|
+
return nullptr;
|
196
|
+
}
|
197
|
+
|
198
|
+
bool erase_entry(uint64_t fullHash, int hashPos, const K& key) {
|
199
|
+
uint16_t hash = get_hash_chunks16(fullHash, hashPos);
|
200
|
+
uint8_t hashChunk = get_first_chunk16(hash);
|
201
|
+
if (!occupation.test(hashChunk)) return false;
|
202
|
+
|
203
|
+
int startPos = occupation.num_set_until(hashChunk) - 1;
|
204
|
+
while (get_first_chunk16(hashes[startPos]) > hashChunk) ++startPos;
|
205
|
+
|
206
|
+
int pos = startPos;
|
207
|
+
while (hashes[pos] > hash) ++pos;
|
208
|
+
|
209
|
+
while (pos != size && hashes[pos] == hash) {
|
210
|
+
if (key == entries[pos].key()) {
|
211
|
+
--size;
|
212
|
+
if (pos < size) {
|
213
|
+
std::move(&entries[pos + 1], &entries[size + 1], &entries[pos]);
|
214
|
+
memmove(&hashes[pos], &hashes[pos + 1],
|
215
|
+
sizeof(hashes[0]) * (size - pos));
|
216
|
+
if (get_first_chunk16(hashes[startPos]) != hashChunk)
|
217
|
+
occupation.flip(hashChunk);
|
218
|
+
} else if (startPos == pos)
|
219
|
+
occupation.flip(hashChunk);
|
220
|
+
|
221
|
+
hashes[size] = 0;
|
222
|
+
return true;
|
223
|
+
}
|
224
|
+
|
225
|
+
++pos;
|
226
|
+
}
|
227
|
+
|
228
|
+
return false;
|
229
|
+
}
|
230
|
+
|
231
|
+
void rehash(int hashPos) {
|
232
|
+
// function needs to possibly reorder elements by a different hash value
|
233
|
+
// chances are very high we are already ordered correctly as we use 16
|
234
|
+
// bits of the hash and one level is uses 6 bits, so the new values
|
235
|
+
// are guaranteed to be ordered correctly by their 10 most significant
|
236
|
+
// bits if increasing the hash position by 1 and only if the 10 bits of
|
237
|
+
// the hash had a collision the new 6 bits might break a tie differently.
|
238
|
+
// It is, however, important to maintain the exact ordering as otherwise
|
239
|
+
// elements may not be found.
|
240
|
+
occupation = 0;
|
241
|
+
for (int i = 0; i < size; ++i) {
|
242
|
+
hashes[i] = get_hash_chunks16(compute_hash(entries[i].key()), hashPos);
|
243
|
+
occupation.set(get_first_chunk16(hashes[i]));
|
244
|
+
}
|
245
|
+
|
246
|
+
int i = 0;
|
247
|
+
while (i < size) {
|
248
|
+
uint8_t hashChunk = get_first_chunk16(hashes[i]);
|
249
|
+
int pos = occupation.num_set_until(hashChunk) - 1;
|
250
|
+
|
251
|
+
// if the position is after i the element definitely comes later, so we
|
252
|
+
// swap it to that position and proceed without increasing i until
|
253
|
+
// eventually an element appears that comes at position i or before
|
254
|
+
if (pos > i) {
|
255
|
+
std::swap(hashes[pos], hashes[i]);
|
256
|
+
std::swap(entries[pos], entries[i]);
|
257
|
+
continue;
|
258
|
+
}
|
259
|
+
|
260
|
+
// the position is before or at i, now check where the exact location
|
261
|
+
// should be for the ordering by hash so that the invariant is that all
|
262
|
+
// elements up to i are properly sorted. Essentially insertion sort but
|
263
|
+
// with the modification of having a high chance to guess the correct
|
264
|
+
// position already using the occupation flags.
|
265
|
+
while (pos < i && hashes[pos] >= hashes[i]) ++pos;
|
266
|
+
|
267
|
+
// if the final position is before i we need to move elements to
|
268
|
+
// make space at that position, otherwise nothing needs to be done but
|
269
|
+
// incrementing i increasing the sorted range by 1.
|
270
|
+
if (pos < i) {
|
271
|
+
uint16_t hash = hashes[i];
|
272
|
+
auto entry = std::move(entries[i]);
|
273
|
+
std::move_backward(&entries[pos], &entries[i], &entries[i + 1]);
|
274
|
+
memmove(&hashes[pos + 1], &hashes[pos],
|
275
|
+
sizeof(hashes[0]) * (size - pos));
|
276
|
+
hashes[pos] = hash;
|
277
|
+
entries[pos] = std::move(entry);
|
278
|
+
}
|
279
|
+
++i;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
};
|
283
|
+
|
284
|
+
struct ListNode {
|
285
|
+
ListNode* next;
|
286
|
+
HighsHashTableEntry<K, V> entry;
|
287
|
+
ListNode(HighsHashTableEntry<K, V>&& entry)
|
288
|
+
: next(nullptr), entry(std::move(entry)) {}
|
289
|
+
};
|
290
|
+
struct ListLeaf {
|
291
|
+
ListNode first;
|
292
|
+
int count;
|
293
|
+
|
294
|
+
ListLeaf(HighsHashTableEntry<K, V>&& entry)
|
295
|
+
: first(std::move(entry)), count(1) {}
|
296
|
+
};
|
297
|
+
|
298
|
+
struct BranchNode;
|
299
|
+
|
300
|
+
struct NodePtr {
|
301
|
+
uintptr_t ptrAndType;
|
302
|
+
|
303
|
+
NodePtr() : ptrAndType(kEmpty) {}
|
304
|
+
NodePtr(std::nullptr_t) : ptrAndType(kEmpty) {}
|
305
|
+
NodePtr(ListLeaf* ptr)
|
306
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kListLeaf) {}
|
307
|
+
NodePtr(InnerLeaf<1>* ptr)
|
308
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kInnerLeafSizeClass1) {}
|
309
|
+
NodePtr(InnerLeaf<2>* ptr)
|
310
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kInnerLeafSizeClass2) {}
|
311
|
+
NodePtr(InnerLeaf<3>* ptr)
|
312
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kInnerLeafSizeClass3) {}
|
313
|
+
NodePtr(InnerLeaf<4>* ptr)
|
314
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kInnerLeafSizeClass4) {}
|
315
|
+
NodePtr(BranchNode* ptr)
|
316
|
+
: ptrAndType(reinterpret_cast<uintptr_t>(ptr) | kBranchNode) {
|
317
|
+
assert(ptr != nullptr);
|
318
|
+
}
|
319
|
+
|
320
|
+
Type getType() const { return Type(ptrAndType & 7u); }
|
321
|
+
|
322
|
+
int numEntriesEstimate() const {
|
323
|
+
switch (getType()) {
|
324
|
+
case kEmpty:
|
325
|
+
return 0;
|
326
|
+
case kListLeaf:
|
327
|
+
return 1;
|
328
|
+
case kInnerLeafSizeClass1:
|
329
|
+
return InnerLeaf<1>::capacity();
|
330
|
+
case kInnerLeafSizeClass2:
|
331
|
+
return InnerLeaf<2>::capacity();
|
332
|
+
case kInnerLeafSizeClass3:
|
333
|
+
return InnerLeaf<3>::capacity();
|
334
|
+
case kInnerLeafSizeClass4:
|
335
|
+
return InnerLeaf<4>::capacity();
|
336
|
+
case kBranchNode:
|
337
|
+
// something large should be returned so that the number of entries
|
338
|
+
// is estimated above the threshold to merge when the parent checks
|
339
|
+
// its children after deletion
|
340
|
+
return kBranchFactor;
|
341
|
+
default:
|
342
|
+
throw std::logic_error("Unexpected type in hash tree");
|
343
|
+
}
|
344
|
+
}
|
345
|
+
|
346
|
+
int numEntries() const {
|
347
|
+
switch (getType()) {
|
348
|
+
case kEmpty:
|
349
|
+
return 0;
|
350
|
+
case kListLeaf:
|
351
|
+
return getListLeaf()->count;
|
352
|
+
case kInnerLeafSizeClass1:
|
353
|
+
return getInnerLeafSizeClass1()->size;
|
354
|
+
case kInnerLeafSizeClass2:
|
355
|
+
return getInnerLeafSizeClass2()->size;
|
356
|
+
case kInnerLeafSizeClass3:
|
357
|
+
return getInnerLeafSizeClass3()->size;
|
358
|
+
case kInnerLeafSizeClass4:
|
359
|
+
return getInnerLeafSizeClass4()->size;
|
360
|
+
case kBranchNode:
|
361
|
+
// something large should be returned so that the number of entries
|
362
|
+
// is estimated above the threshold to merge when the parent checks
|
363
|
+
// its children after deletion
|
364
|
+
return kBranchFactor;
|
365
|
+
default:
|
366
|
+
throw std::logic_error("Unexpected type in hash tree");
|
367
|
+
}
|
368
|
+
}
|
369
|
+
|
370
|
+
ListLeaf* getListLeaf() const {
|
371
|
+
assert(getType() == kListLeaf);
|
372
|
+
return reinterpret_cast<ListLeaf*>(ptrAndType & ~uintptr_t{7});
|
373
|
+
}
|
374
|
+
|
375
|
+
InnerLeaf<1>* getInnerLeafSizeClass1() const {
|
376
|
+
assert(getType() == kInnerLeafSizeClass1);
|
377
|
+
return reinterpret_cast<InnerLeaf<1>*>(ptrAndType & ~uintptr_t{7});
|
378
|
+
}
|
379
|
+
InnerLeaf<2>* getInnerLeafSizeClass2() const {
|
380
|
+
assert(getType() == kInnerLeafSizeClass2);
|
381
|
+
return reinterpret_cast<InnerLeaf<2>*>(ptrAndType & ~uintptr_t{7});
|
382
|
+
}
|
383
|
+
|
384
|
+
InnerLeaf<3>* getInnerLeafSizeClass3() const {
|
385
|
+
assert(getType() == kInnerLeafSizeClass3);
|
386
|
+
return reinterpret_cast<InnerLeaf<3>*>(ptrAndType & ~uintptr_t{7});
|
387
|
+
}
|
388
|
+
|
389
|
+
InnerLeaf<4>* getInnerLeafSizeClass4() const {
|
390
|
+
assert(getType() == kInnerLeafSizeClass4);
|
391
|
+
return reinterpret_cast<InnerLeaf<4>*>(ptrAndType & ~uintptr_t{7});
|
392
|
+
}
|
393
|
+
|
394
|
+
BranchNode* getBranchNode() const {
|
395
|
+
assert(getType() == kBranchNode);
|
396
|
+
return reinterpret_cast<BranchNode*>(ptrAndType & ~uintptr_t{7});
|
397
|
+
}
|
398
|
+
};
|
399
|
+
|
400
|
+
struct BranchNode {
|
401
|
+
Occupation occupation;
|
402
|
+
NodePtr child[1];
|
403
|
+
};
|
404
|
+
|
405
|
+
// allocate branch nodes in multiples of 64 bytes to reduce allocator stress
|
406
|
+
// with different sizes and reduce reallocations of nodes
|
407
|
+
static constexpr size_t getBranchNodeSize(int numChilds) {
|
408
|
+
return (sizeof(BranchNode) + size_t(numChilds - 1) * sizeof(NodePtr) + 63) &
|
409
|
+
~63;
|
410
|
+
};
|
411
|
+
|
412
|
+
static BranchNode* createBranchingNode(int numChilds) {
|
413
|
+
BranchNode* branch =
|
414
|
+
(BranchNode*)::operator new(getBranchNodeSize(numChilds));
|
415
|
+
branch->occupation = 0;
|
416
|
+
return branch;
|
417
|
+
}
|
418
|
+
|
419
|
+
static void destroyBranchingNode(void* innerNode) {
|
420
|
+
::operator delete(innerNode);
|
421
|
+
}
|
422
|
+
|
423
|
+
static BranchNode* addChildToBranchNode(BranchNode* branch, uint8_t hashValue,
|
424
|
+
int location) {
|
425
|
+
int rightChilds = branch->occupation.num_set_after(hashValue);
|
426
|
+
assert(rightChilds + location == branch->occupation.num_set());
|
427
|
+
|
428
|
+
size_t newSize = getBranchNodeSize(location + rightChilds + 1);
|
429
|
+
size_t rightSize = rightChilds * sizeof(NodePtr);
|
430
|
+
|
431
|
+
if (newSize == getBranchNodeSize(location + rightChilds)) {
|
432
|
+
memmove(&branch->child[location + 1], &branch->child[location],
|
433
|
+
rightSize);
|
434
|
+
|
435
|
+
return branch;
|
436
|
+
}
|
437
|
+
|
438
|
+
BranchNode* newBranch = (BranchNode*)::operator new(newSize);
|
439
|
+
// sizeof(Branch) already contains the size for 1 pointer. So we just
|
440
|
+
// need to add the left and right sizes up for the number of
|
441
|
+
// additional pointers
|
442
|
+
size_t leftSize = sizeof(BranchNode) + (location - 1) * sizeof(NodePtr);
|
443
|
+
|
444
|
+
memcpy(newBranch, branch, leftSize);
|
445
|
+
memcpy(&newBranch->child[location + 1], &branch->child[location],
|
446
|
+
rightSize);
|
447
|
+
|
448
|
+
destroyBranchingNode(branch);
|
449
|
+
|
450
|
+
return newBranch;
|
451
|
+
}
|
452
|
+
|
453
|
+
template <int SizeClass1, int SizeClass2>
|
454
|
+
static void mergeIntoLeaf(InnerLeaf<SizeClass1>* leaf,
|
455
|
+
InnerLeaf<SizeClass2>* mergeLeaf, int hashPos) {
|
456
|
+
for (int i = 0; i < mergeLeaf->size; ++i)
|
457
|
+
leaf->insert_entry(compute_hash(mergeLeaf->entries[i].key()), hashPos,
|
458
|
+
mergeLeaf->entries[i]);
|
459
|
+
}
|
460
|
+
|
461
|
+
template <int SizeClass>
|
462
|
+
static void mergeIntoLeaf(InnerLeaf<SizeClass>* leaf, int hashPos,
|
463
|
+
NodePtr mergeNode) {
|
464
|
+
switch (mergeNode.getType()) {
|
465
|
+
case kListLeaf: {
|
466
|
+
ListLeaf* mergeLeaf = mergeNode.getListLeaf();
|
467
|
+
leaf->insert_entry(compute_hash(mergeLeaf->first.entry.key()), hashPos,
|
468
|
+
mergeLeaf->first.entry);
|
469
|
+
ListNode* iter = mergeLeaf->first.next;
|
470
|
+
while (iter != nullptr) {
|
471
|
+
ListNode* next = iter->next;
|
472
|
+
leaf->insert_entry(compute_hash(iter->entry.key()), hashPos,
|
473
|
+
iter->entry);
|
474
|
+
delete iter;
|
475
|
+
iter = next;
|
476
|
+
}
|
477
|
+
break;
|
478
|
+
}
|
479
|
+
case kInnerLeafSizeClass1:
|
480
|
+
mergeIntoLeaf(leaf, mergeNode.getInnerLeafSizeClass1(), hashPos);
|
481
|
+
delete mergeNode.getInnerLeafSizeClass1();
|
482
|
+
break;
|
483
|
+
case kInnerLeafSizeClass2:
|
484
|
+
mergeIntoLeaf(leaf, mergeNode.getInnerLeafSizeClass2(), hashPos);
|
485
|
+
delete mergeNode.getInnerLeafSizeClass2();
|
486
|
+
break;
|
487
|
+
case kInnerLeafSizeClass3:
|
488
|
+
mergeIntoLeaf(leaf, mergeNode.getInnerLeafSizeClass3(), hashPos);
|
489
|
+
delete mergeNode.getInnerLeafSizeClass3();
|
490
|
+
break;
|
491
|
+
case kInnerLeafSizeClass4:
|
492
|
+
mergeIntoLeaf(leaf, mergeNode.getInnerLeafSizeClass4(), hashPos);
|
493
|
+
delete mergeNode.getInnerLeafSizeClass4();
|
494
|
+
break;
|
495
|
+
default:
|
496
|
+
break;
|
497
|
+
}
|
498
|
+
}
|
499
|
+
|
500
|
+
template <int SizeClass1, int SizeClass2>
|
501
|
+
static HighsHashTableEntry<K, V>* findCommonInLeaf(
|
502
|
+
InnerLeaf<SizeClass1>* leaf1, InnerLeaf<SizeClass2>* leaf2, int hashPos) {
|
503
|
+
uint64_t matchMask = leaf1->occupation & leaf2->occupation;
|
504
|
+
if (matchMask == 0) return nullptr;
|
505
|
+
|
506
|
+
int offset1 = -1;
|
507
|
+
int offset2 = -1;
|
508
|
+
while (matchMask) {
|
509
|
+
int pos = HighsHashHelpers::log2i(matchMask);
|
510
|
+
matchMask ^= (uint64_t{1} << pos);
|
511
|
+
|
512
|
+
int i = leaf1->occupation.num_set_until(pos) + offset1;
|
513
|
+
while (get_first_chunk16(leaf1->hashes[i]) != pos) {
|
514
|
+
++i;
|
515
|
+
++offset1;
|
516
|
+
}
|
517
|
+
|
518
|
+
int j = leaf2->occupation.num_set_until(pos) + offset2;
|
519
|
+
while (get_first_chunk16(leaf2->hashes[j]) != pos) {
|
520
|
+
++j;
|
521
|
+
++offset2;
|
522
|
+
}
|
523
|
+
|
524
|
+
while (true) {
|
525
|
+
if (leaf1->hashes[i] > leaf2->hashes[j]) {
|
526
|
+
++i;
|
527
|
+
if (i == leaf1->size || get_first_chunk16(leaf1->hashes[i]) != pos)
|
528
|
+
break;
|
529
|
+
} else if (leaf2->hashes[j] > leaf1->hashes[i]) {
|
530
|
+
++j;
|
531
|
+
if (j == leaf2->size || get_first_chunk16(leaf2->hashes[j]) != pos)
|
532
|
+
break;
|
533
|
+
} else {
|
534
|
+
if (leaf1->entries[i].key() == leaf2->entries[j].key())
|
535
|
+
return &leaf1->entries[i];
|
536
|
+
|
537
|
+
++i;
|
538
|
+
if (i == leaf1->size || get_first_chunk16(leaf1->hashes[i]) != pos)
|
539
|
+
break;
|
540
|
+
++j;
|
541
|
+
if (j == leaf2->size || get_first_chunk16(leaf2->hashes[j]) != pos)
|
542
|
+
break;
|
543
|
+
}
|
544
|
+
};
|
545
|
+
}
|
546
|
+
|
547
|
+
return nullptr;
|
548
|
+
}
|
549
|
+
|
550
|
+
template <int SizeClass>
|
551
|
+
static HighsHashTableEntry<K, V>* findCommonInLeaf(InnerLeaf<SizeClass>* leaf,
|
552
|
+
NodePtr n2, int hashPos) {
|
553
|
+
switch (n2.getType()) {
|
554
|
+
case kInnerLeafSizeClass1:
|
555
|
+
return findCommonInLeaf(leaf, n2.getInnerLeafSizeClass1(), hashPos);
|
556
|
+
case kInnerLeafSizeClass2:
|
557
|
+
return findCommonInLeaf(leaf, n2.getInnerLeafSizeClass2(), hashPos);
|
558
|
+
case kInnerLeafSizeClass3:
|
559
|
+
return findCommonInLeaf(leaf, n2.getInnerLeafSizeClass3(), hashPos);
|
560
|
+
case kInnerLeafSizeClass4:
|
561
|
+
return findCommonInLeaf(leaf, n2.getInnerLeafSizeClass4(), hashPos);
|
562
|
+
case kBranchNode: {
|
563
|
+
BranchNode* branch = n2.getBranchNode();
|
564
|
+
uint64_t matchMask = branch->occupation & leaf->occupation;
|
565
|
+
|
566
|
+
int offset = -1;
|
567
|
+
while (matchMask) {
|
568
|
+
int pos = HighsHashHelpers::log2i(matchMask);
|
569
|
+
matchMask ^= (uint64_t{1} << pos);
|
570
|
+
|
571
|
+
int i = leaf->occupation.num_set_until(pos) + offset;
|
572
|
+
while (get_first_chunk16(leaf->hashes[i]) != pos) {
|
573
|
+
++i;
|
574
|
+
++offset;
|
575
|
+
}
|
576
|
+
|
577
|
+
int j = branch->occupation.num_set_until(pos) - 1;
|
578
|
+
|
579
|
+
do {
|
580
|
+
if (find_recurse(branch->child[j],
|
581
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
582
|
+
leaf->entries[i].key()))
|
583
|
+
return &leaf->entries[i];
|
584
|
+
++i;
|
585
|
+
} while (i < leaf->size && get_first_chunk16(leaf->hashes[i]) == pos);
|
586
|
+
}
|
587
|
+
break;
|
588
|
+
}
|
589
|
+
default:
|
590
|
+
break;
|
591
|
+
}
|
592
|
+
|
593
|
+
return nullptr;
|
594
|
+
}
|
595
|
+
|
596
|
+
static NodePtr removeChildFromBranchNode(BranchNode* branch, int location,
|
597
|
+
uint64_t hash, int hashPos) {
|
598
|
+
NodePtr newNode;
|
599
|
+
int newNumChild = branch->occupation.num_set();
|
600
|
+
|
601
|
+
// first check if we might be able to merge all children into one new leaf
|
602
|
+
// based on the node numbers and assuming all of them might be in the
|
603
|
+
// smallest size class
|
604
|
+
if (newNumChild * InnerLeaf<1>::capacity() <= kLeafBurstThreshold) {
|
605
|
+
// since we have a good chance of merging we now check the actual size
|
606
|
+
// classes to see if that yields a number of entries at most the burst
|
607
|
+
// threshold
|
608
|
+
int childEntries = 0;
|
609
|
+
for (int i = 0; i <= newNumChild; ++i) {
|
610
|
+
childEntries += branch->child[i].numEntriesEstimate();
|
611
|
+
if (childEntries > kLeafBurstThreshold) break;
|
612
|
+
}
|
613
|
+
|
614
|
+
if (childEntries < kLeafBurstThreshold) {
|
615
|
+
// create a new merged inner leaf node containing all entries of
|
616
|
+
// children first recompute the number of entries, but this time access
|
617
|
+
// each child to get the actual number of entries needed and determine
|
618
|
+
// this nodes size class since before we estimated the number of child
|
619
|
+
// entries from the capacities of our child leaf node types which are
|
620
|
+
// stored in the branch nodes pointers directly and avoid unnecessary
|
621
|
+
// accesses of nodes that are not in cache.
|
622
|
+
childEntries = 0;
|
623
|
+
for (int i = 0; i <= newNumChild; ++i)
|
624
|
+
childEntries += branch->child[i].numEntries();
|
625
|
+
|
626
|
+
// check again if we exceed due to the extremely unlikely case
|
627
|
+
// of having less than 5 list nodes with together more than 30 entries
|
628
|
+
// as list nodes are only created in the last depth level
|
629
|
+
if (childEntries < kLeafBurstThreshold) {
|
630
|
+
switch (entries_to_size_class(childEntries)) {
|
631
|
+
case 1: {
|
632
|
+
InnerLeaf<1>* newLeafSize1 = new InnerLeaf<1>;
|
633
|
+
newNode = newLeafSize1;
|
634
|
+
for (int i = 0; i <= newNumChild; ++i)
|
635
|
+
mergeIntoLeaf(newLeafSize1, hashPos, branch->child[i]);
|
636
|
+
break;
|
637
|
+
}
|
638
|
+
case 2: {
|
639
|
+
InnerLeaf<2>* newLeafSize2 = new InnerLeaf<2>;
|
640
|
+
newNode = newLeafSize2;
|
641
|
+
for (int i = 0; i <= newNumChild; ++i)
|
642
|
+
mergeIntoLeaf(newLeafSize2, hashPos, branch->child[i]);
|
643
|
+
break;
|
644
|
+
}
|
645
|
+
case 3: {
|
646
|
+
InnerLeaf<3>* newLeafSize3 = new InnerLeaf<3>;
|
647
|
+
newNode = newLeafSize3;
|
648
|
+
for (int i = 0; i <= newNumChild; ++i)
|
649
|
+
mergeIntoLeaf(newLeafSize3, hashPos, branch->child[i]);
|
650
|
+
break;
|
651
|
+
}
|
652
|
+
case 4: {
|
653
|
+
InnerLeaf<4>* newLeafSize4 = new InnerLeaf<4>;
|
654
|
+
newNode = newLeafSize4;
|
655
|
+
for (int i = 0; i <= newNumChild; ++i)
|
656
|
+
mergeIntoLeaf(newLeafSize4, hashPos, branch->child[i]);
|
657
|
+
}
|
658
|
+
}
|
659
|
+
|
660
|
+
destroyBranchingNode(branch);
|
661
|
+
return newNode;
|
662
|
+
}
|
663
|
+
}
|
664
|
+
}
|
665
|
+
|
666
|
+
size_t newSize = getBranchNodeSize(newNumChild);
|
667
|
+
size_t rightSize = (newNumChild - location) * sizeof(NodePtr);
|
668
|
+
if (newSize == getBranchNodeSize(newNumChild + 1)) {
|
669
|
+
// allocated size class is the same, so we do not allocate a new node
|
670
|
+
memmove(&branch->child[location], &branch->child[location + 1],
|
671
|
+
rightSize);
|
672
|
+
newNode = branch;
|
673
|
+
} else {
|
674
|
+
// allocated size class changed, so we allocate a smaller branch node
|
675
|
+
BranchNode* compressedBranch = (BranchNode*)::operator new(newSize);
|
676
|
+
newNode = compressedBranch;
|
677
|
+
|
678
|
+
size_t leftSize =
|
679
|
+
offsetof(BranchNode, child) + location * sizeof(NodePtr);
|
680
|
+
memcpy(compressedBranch, branch, leftSize);
|
681
|
+
memcpy(&compressedBranch->child[location], &branch->child[location + 1],
|
682
|
+
rightSize);
|
683
|
+
|
684
|
+
destroyBranchingNode(branch);
|
685
|
+
}
|
686
|
+
|
687
|
+
return newNode;
|
688
|
+
}
|
689
|
+
|
690
|
+
NodePtr root;
|
691
|
+
|
692
|
+
template <int SizeClass>
|
693
|
+
static std::pair<ValueType*, bool> insert_into_leaf(
|
694
|
+
NodePtr* insertNode, InnerLeaf<SizeClass>* leaf, uint64_t hash,
|
695
|
+
int hashPos, HighsHashTableEntry<K, V>& entry) {
|
696
|
+
if (leaf->size == InnerLeaf<SizeClass>::capacity()) {
|
697
|
+
auto existingEntry = leaf->find_entry(hash, hashPos, entry.key());
|
698
|
+
if (existingEntry) return std::make_pair(existingEntry, false);
|
699
|
+
|
700
|
+
InnerLeaf<SizeClass + 1>* newLeaf =
|
701
|
+
new InnerLeaf<SizeClass + 1>(std::move(*leaf));
|
702
|
+
*insertNode = newLeaf;
|
703
|
+
delete leaf;
|
704
|
+
return newLeaf->insert_entry(hash, hashPos, entry);
|
705
|
+
}
|
706
|
+
|
707
|
+
return leaf->insert_entry(hash, hashPos, entry);
|
708
|
+
}
|
709
|
+
|
710
|
+
static std::pair<ValueType*, bool> insert_recurse(
|
711
|
+
NodePtr* insertNode, uint64_t hash, int hashPos,
|
712
|
+
HighsHashTableEntry<K, V>& entry) {
|
713
|
+
switch (insertNode->getType()) {
|
714
|
+
case kEmpty: {
|
715
|
+
if (hashPos == kMaxDepth) {
|
716
|
+
ListLeaf* leaf = new ListLeaf(std::move(entry));
|
717
|
+
*insertNode = leaf;
|
718
|
+
return std::make_pair(&leaf->first.entry.value(), true);
|
719
|
+
} else {
|
720
|
+
InnerLeaf<1>* leaf = new InnerLeaf<1>;
|
721
|
+
*insertNode = leaf;
|
722
|
+
return leaf->insert_entry(hash, hashPos, entry);
|
723
|
+
}
|
724
|
+
}
|
725
|
+
case kListLeaf: {
|
726
|
+
ListLeaf* leaf = insertNode->getListLeaf();
|
727
|
+
ListNode* iter = &leaf->first;
|
728
|
+
while (true) {
|
729
|
+
// check for existing key
|
730
|
+
if (iter->entry.key() == entry.key())
|
731
|
+
return std::make_pair(&iter->entry.value(), false);
|
732
|
+
|
733
|
+
if (iter->next == nullptr) {
|
734
|
+
// reached the end of the list and key is not duplicate, so insert
|
735
|
+
iter->next = new ListNode(std::move(entry));
|
736
|
+
++leaf->count;
|
737
|
+
return std::make_pair(&iter->next->entry.value(), true);
|
738
|
+
}
|
739
|
+
iter = iter->next;
|
740
|
+
}
|
741
|
+
|
742
|
+
break;
|
743
|
+
}
|
744
|
+
case kInnerLeafSizeClass1:
|
745
|
+
return insert_into_leaf(insertNode,
|
746
|
+
insertNode->getInnerLeafSizeClass1(), hash,
|
747
|
+
hashPos, entry);
|
748
|
+
break;
|
749
|
+
case kInnerLeafSizeClass2:
|
750
|
+
return insert_into_leaf(insertNode,
|
751
|
+
insertNode->getInnerLeafSizeClass2(), hash,
|
752
|
+
hashPos, entry);
|
753
|
+
break;
|
754
|
+
case kInnerLeafSizeClass3:
|
755
|
+
return insert_into_leaf(insertNode,
|
756
|
+
insertNode->getInnerLeafSizeClass3(), hash,
|
757
|
+
hashPos, entry);
|
758
|
+
break;
|
759
|
+
case kInnerLeafSizeClass4: {
|
760
|
+
InnerLeaf<4>* leaf = insertNode->getInnerLeafSizeClass4();
|
761
|
+
if (leaf->size < InnerLeaf<4>::capacity())
|
762
|
+
return leaf->insert_entry(hash, hashPos, entry);
|
763
|
+
|
764
|
+
auto existingEntry = leaf->find_entry(hash, hashPos, entry.key());
|
765
|
+
if (existingEntry) return std::make_pair(existingEntry, false);
|
766
|
+
Occupation occupation = leaf->occupation;
|
767
|
+
|
768
|
+
uint8_t hashChunk = get_hash_chunk(hash, hashPos);
|
769
|
+
occupation.set(hashChunk);
|
770
|
+
|
771
|
+
int branchSize = occupation.num_set();
|
772
|
+
|
773
|
+
BranchNode* branch = createBranchingNode(branchSize);
|
774
|
+
*insertNode = branch;
|
775
|
+
branch->occupation = occupation;
|
776
|
+
|
777
|
+
if (hashPos + 1 == kMaxDepth) {
|
778
|
+
for (int i = 0; i < branchSize; ++i) branch->child[i] = nullptr;
|
779
|
+
|
780
|
+
for (int i = 0; i < leaf->size; ++i) {
|
781
|
+
int pos =
|
782
|
+
occupation.num_set_until(get_first_chunk16(leaf->hashes[i])) -
|
783
|
+
1;
|
784
|
+
if (branch->child[pos].getType() == kEmpty)
|
785
|
+
branch->child[pos] = new ListLeaf(std::move(leaf->entries[i]));
|
786
|
+
else {
|
787
|
+
ListLeaf* listLeaf = branch->child[pos].getListLeaf();
|
788
|
+
ListNode* newNode = new ListNode(std::move(listLeaf->first));
|
789
|
+
listLeaf->first.next = newNode;
|
790
|
+
listLeaf->first.entry = std::move(leaf->entries[i]);
|
791
|
+
++listLeaf->count;
|
792
|
+
}
|
793
|
+
}
|
794
|
+
|
795
|
+
delete leaf;
|
796
|
+
|
797
|
+
ListLeaf* listLeaf;
|
798
|
+
|
799
|
+
int pos = occupation.num_set_until(get_hash_chunk(hash, hashPos)) - 1;
|
800
|
+
if (branch->child[pos].getType() == kEmpty) {
|
801
|
+
listLeaf = new ListLeaf(std::move(entry));
|
802
|
+
branch->child[pos] = listLeaf;
|
803
|
+
} else {
|
804
|
+
listLeaf = branch->child[pos].getListLeaf();
|
805
|
+
ListNode* newNode = new ListNode(std::move(listLeaf->first));
|
806
|
+
listLeaf->first.next = newNode;
|
807
|
+
listLeaf->first.entry = std::move(entry);
|
808
|
+
++listLeaf->count;
|
809
|
+
}
|
810
|
+
|
811
|
+
return std::make_pair(&listLeaf->first.entry.value(), true);
|
812
|
+
}
|
813
|
+
|
814
|
+
if (branchSize > 1) {
|
815
|
+
// maxsize in one bucket = number of items - (num buckets-1)
|
816
|
+
// since each bucket has at least 1 item the largest one can only
|
817
|
+
// have all remaining ones After adding the item: If it does not
|
818
|
+
// collid
|
819
|
+
int maxEntriesPerLeaf = 2 + leaf->size - branchSize;
|
820
|
+
|
821
|
+
if (maxEntriesPerLeaf <= InnerLeaf<1>::capacity()) {
|
822
|
+
// all items can go into the smalles leaf size
|
823
|
+
for (int i = 0; i < branchSize; ++i)
|
824
|
+
branch->child[i] = new InnerLeaf<1>;
|
825
|
+
|
826
|
+
for (int i = 0; i < leaf->size; ++i) {
|
827
|
+
int pos =
|
828
|
+
occupation.num_set_until(get_first_chunk16(leaf->hashes[i])) -
|
829
|
+
1;
|
830
|
+
branch->child[pos].getInnerLeafSizeClass1()->insert_entry(
|
831
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
832
|
+
leaf->entries[i]);
|
833
|
+
}
|
834
|
+
|
835
|
+
delete leaf;
|
836
|
+
|
837
|
+
int pos =
|
838
|
+
occupation.num_set_until(get_hash_chunk(hash, hashPos)) - 1;
|
839
|
+
return branch->child[pos].getInnerLeafSizeClass1()->insert_entry(
|
840
|
+
hash, hashPos + 1, entry);
|
841
|
+
} else {
|
842
|
+
// there are many collisions, determine the exact sizes first
|
843
|
+
uint8_t sizes[InnerLeaf<4>::capacity() + 1];
|
844
|
+
memset(sizes, 0, branchSize);
|
845
|
+
sizes[occupation.num_set_until(hashChunk) - 1] += 1;
|
846
|
+
for (int i = 0; i < leaf->size; ++i) {
|
847
|
+
int pos =
|
848
|
+
occupation.num_set_until(get_first_chunk16(leaf->hashes[i])) -
|
849
|
+
1;
|
850
|
+
sizes[pos] += 1;
|
851
|
+
}
|
852
|
+
|
853
|
+
for (int i = 0; i < branchSize; ++i) {
|
854
|
+
switch (entries_to_size_class(sizes[i])) {
|
855
|
+
case 1:
|
856
|
+
branch->child[i] = new InnerLeaf<1>;
|
857
|
+
break;
|
858
|
+
case 2:
|
859
|
+
branch->child[i] = new InnerLeaf<2>;
|
860
|
+
break;
|
861
|
+
case 3:
|
862
|
+
branch->child[i] = new InnerLeaf<3>;
|
863
|
+
break;
|
864
|
+
case 4:
|
865
|
+
branch->child[i] = new InnerLeaf<4>;
|
866
|
+
break;
|
867
|
+
}
|
868
|
+
}
|
869
|
+
|
870
|
+
for (int i = 0; i < leaf->size; ++i) {
|
871
|
+
int pos =
|
872
|
+
occupation.num_set_until(get_first_chunk16(leaf->hashes[i])) -
|
873
|
+
1;
|
874
|
+
|
875
|
+
switch (branch->child[pos].getType()) {
|
876
|
+
case kInnerLeafSizeClass1:
|
877
|
+
branch->child[pos].getInnerLeafSizeClass1()->insert_entry(
|
878
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
879
|
+
leaf->entries[i]);
|
880
|
+
break;
|
881
|
+
case kInnerLeafSizeClass2:
|
882
|
+
branch->child[pos].getInnerLeafSizeClass2()->insert_entry(
|
883
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
884
|
+
leaf->entries[i]);
|
885
|
+
break;
|
886
|
+
case kInnerLeafSizeClass3:
|
887
|
+
branch->child[pos].getInnerLeafSizeClass3()->insert_entry(
|
888
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
889
|
+
leaf->entries[i]);
|
890
|
+
break;
|
891
|
+
case kInnerLeafSizeClass4:
|
892
|
+
branch->child[pos].getInnerLeafSizeClass4()->insert_entry(
|
893
|
+
compute_hash(leaf->entries[i].key()), hashPos + 1,
|
894
|
+
leaf->entries[i]);
|
895
|
+
break;
|
896
|
+
default:
|
897
|
+
break;
|
898
|
+
}
|
899
|
+
}
|
900
|
+
}
|
901
|
+
|
902
|
+
delete leaf;
|
903
|
+
|
904
|
+
int pos = occupation.num_set_until(hashChunk) - 1;
|
905
|
+
insertNode = &branch->child[pos];
|
906
|
+
++hashPos;
|
907
|
+
} else {
|
908
|
+
// extremely unlikely that the new branch node only gets one
|
909
|
+
// child in that case create it and defer the insertion into
|
910
|
+
// the next depth
|
911
|
+
branch->child[0] = leaf;
|
912
|
+
insertNode = &branch->child[0];
|
913
|
+
++hashPos;
|
914
|
+
leaf->rehash(hashPos);
|
915
|
+
}
|
916
|
+
|
917
|
+
break;
|
918
|
+
}
|
919
|
+
case kBranchNode: {
|
920
|
+
BranchNode* branch = insertNode->getBranchNode();
|
921
|
+
|
922
|
+
int location =
|
923
|
+
branch->occupation.num_set_until(get_hash_chunk(hash, hashPos));
|
924
|
+
|
925
|
+
if (branch->occupation.test(get_hash_chunk(hash, hashPos))) {
|
926
|
+
--location;
|
927
|
+
} else {
|
928
|
+
branch = addChildToBranchNode(branch, get_hash_chunk(hash, hashPos),
|
929
|
+
location);
|
930
|
+
|
931
|
+
branch->child[location] = nullptr;
|
932
|
+
branch->occupation.set(get_hash_chunk(hash, hashPos));
|
933
|
+
}
|
934
|
+
|
935
|
+
*insertNode = branch;
|
936
|
+
insertNode = &branch->child[location];
|
937
|
+
++hashPos;
|
938
|
+
}
|
939
|
+
}
|
940
|
+
|
941
|
+
return insert_recurse(insertNode, hash, hashPos, entry);
|
942
|
+
}
|
943
|
+
|
944
|
+
static void erase_recurse(NodePtr* erase_node, uint64_t hash, int hashPos,
|
945
|
+
const K& key) {
|
946
|
+
switch (erase_node->getType()) {
|
947
|
+
case kEmpty: {
|
948
|
+
return;
|
949
|
+
}
|
950
|
+
case kListLeaf: {
|
951
|
+
ListLeaf* leaf = erase_node->getListLeaf();
|
952
|
+
|
953
|
+
// check for existing key
|
954
|
+
ListNode* iter = &leaf->first;
|
955
|
+
|
956
|
+
do {
|
957
|
+
ListNode* next = iter->next;
|
958
|
+
if (iter->entry.key() == key) {
|
959
|
+
// key found, decrease count
|
960
|
+
--leaf->count;
|
961
|
+
if (next != nullptr) {
|
962
|
+
// if we have a next node after replace the entry in iter by
|
963
|
+
// moving that node into it
|
964
|
+
*iter = std::move(*next);
|
965
|
+
// delete memory of that node
|
966
|
+
delete next;
|
967
|
+
}
|
968
|
+
|
969
|
+
break;
|
970
|
+
}
|
971
|
+
|
972
|
+
iter = next;
|
973
|
+
} while (iter != nullptr);
|
974
|
+
|
975
|
+
if (leaf->count == 0) {
|
976
|
+
delete leaf;
|
977
|
+
*erase_node = nullptr;
|
978
|
+
}
|
979
|
+
|
980
|
+
return;
|
981
|
+
}
|
982
|
+
case kInnerLeafSizeClass1: {
|
983
|
+
InnerLeaf<1>* leaf = erase_node->getInnerLeafSizeClass1();
|
984
|
+
if (leaf->erase_entry(hash, hashPos, key)) {
|
985
|
+
if (leaf->size == 0) {
|
986
|
+
delete leaf;
|
987
|
+
*erase_node = nullptr;
|
988
|
+
}
|
989
|
+
}
|
990
|
+
|
991
|
+
return;
|
992
|
+
}
|
993
|
+
case kInnerLeafSizeClass2: {
|
994
|
+
InnerLeaf<2>* leaf = erase_node->getInnerLeafSizeClass2();
|
995
|
+
|
996
|
+
if (leaf->erase_entry(hash, hashPos, key)) {
|
997
|
+
if (leaf->size == InnerLeaf<1>::capacity()) {
|
998
|
+
InnerLeaf<1>* newLeaf = new InnerLeaf<1>(std::move(*leaf));
|
999
|
+
*erase_node = newLeaf;
|
1000
|
+
delete leaf;
|
1001
|
+
}
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
return;
|
1005
|
+
}
|
1006
|
+
case kInnerLeafSizeClass3: {
|
1007
|
+
InnerLeaf<3>* leaf = erase_node->getInnerLeafSizeClass3();
|
1008
|
+
|
1009
|
+
if (leaf->erase_entry(hash, hashPos, key)) {
|
1010
|
+
if (leaf->size == InnerLeaf<2>::capacity()) {
|
1011
|
+
InnerLeaf<2>* newLeaf = new InnerLeaf<2>(std::move(*leaf));
|
1012
|
+
*erase_node = newLeaf;
|
1013
|
+
delete leaf;
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
return;
|
1018
|
+
}
|
1019
|
+
case kInnerLeafSizeClass4: {
|
1020
|
+
InnerLeaf<4>* leaf = erase_node->getInnerLeafSizeClass4();
|
1021
|
+
|
1022
|
+
if (leaf->erase_entry(hash, hashPos, key)) {
|
1023
|
+
if (leaf->size == InnerLeaf<3>::capacity()) {
|
1024
|
+
InnerLeaf<3>* newLeaf = new InnerLeaf<3>(std::move(*leaf));
|
1025
|
+
*erase_node = newLeaf;
|
1026
|
+
delete leaf;
|
1027
|
+
}
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
return;
|
1031
|
+
}
|
1032
|
+
case kBranchNode: {
|
1033
|
+
BranchNode* branch = erase_node->getBranchNode();
|
1034
|
+
|
1035
|
+
if (!branch->occupation.test(get_hash_chunk(hash, hashPos))) return;
|
1036
|
+
|
1037
|
+
int location =
|
1038
|
+
branch->occupation.num_set_until(get_hash_chunk(hash, hashPos)) - 1;
|
1039
|
+
erase_recurse(&branch->child[location], hash, hashPos + 1, key);
|
1040
|
+
|
1041
|
+
if (branch->child[location].getType() != kEmpty) return;
|
1042
|
+
|
1043
|
+
branch->occupation.flip(get_hash_chunk(hash, hashPos));
|
1044
|
+
|
1045
|
+
*erase_node =
|
1046
|
+
removeChildFromBranchNode(branch, location, hash, hashPos);
|
1047
|
+
break;
|
1048
|
+
}
|
1049
|
+
}
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
static const ValueType* find_recurse(NodePtr node, uint64_t hash, int hashPos,
|
1053
|
+
const K& key) {
|
1054
|
+
int startPos = hashPos;
|
1055
|
+
switch (node.getType()) {
|
1056
|
+
case kEmpty:
|
1057
|
+
return nullptr;
|
1058
|
+
case kListLeaf: {
|
1059
|
+
ListLeaf* leaf = node.getListLeaf();
|
1060
|
+
ListNode* iter = &leaf->first;
|
1061
|
+
do {
|
1062
|
+
if (iter->entry.key() == key) return &iter->entry.value();
|
1063
|
+
iter = iter->next;
|
1064
|
+
} while (iter != nullptr);
|
1065
|
+
return nullptr;
|
1066
|
+
}
|
1067
|
+
case kInnerLeafSizeClass1: {
|
1068
|
+
InnerLeaf<1>* leaf = node.getInnerLeafSizeClass1();
|
1069
|
+
return leaf->find_entry(hash, hashPos, key);
|
1070
|
+
}
|
1071
|
+
case kInnerLeafSizeClass2: {
|
1072
|
+
InnerLeaf<2>* leaf = node.getInnerLeafSizeClass2();
|
1073
|
+
return leaf->find_entry(hash, hashPos, key);
|
1074
|
+
}
|
1075
|
+
case kInnerLeafSizeClass3: {
|
1076
|
+
InnerLeaf<3>* leaf = node.getInnerLeafSizeClass3();
|
1077
|
+
return leaf->find_entry(hash, hashPos, key);
|
1078
|
+
}
|
1079
|
+
case kInnerLeafSizeClass4: {
|
1080
|
+
InnerLeaf<4>* leaf = node.getInnerLeafSizeClass4();
|
1081
|
+
return leaf->find_entry(hash, hashPos, key);
|
1082
|
+
}
|
1083
|
+
case kBranchNode: {
|
1084
|
+
BranchNode* branch = node.getBranchNode();
|
1085
|
+
if (!branch->occupation.test(get_hash_chunk(hash, hashPos)))
|
1086
|
+
return nullptr;
|
1087
|
+
int location =
|
1088
|
+
branch->occupation.num_set_until(get_hash_chunk(hash, hashPos)) - 1;
|
1089
|
+
node = branch->child[location];
|
1090
|
+
++hashPos;
|
1091
|
+
}
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
assert(hashPos > startPos);
|
1095
|
+
|
1096
|
+
return find_recurse(node, hash, hashPos, key);
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
static const HighsHashTableEntry<K, V>* find_common_recurse(NodePtr n1,
|
1100
|
+
NodePtr n2,
|
1101
|
+
int hashPos) {
|
1102
|
+
if (n1.getType() > n2.getType()) std::swap(n1, n2);
|
1103
|
+
|
1104
|
+
switch (n1.getType()) {
|
1105
|
+
case kEmpty:
|
1106
|
+
return nullptr;
|
1107
|
+
case kListLeaf: {
|
1108
|
+
ListLeaf* leaf = n1.getListLeaf();
|
1109
|
+
ListNode* iter = &leaf->first;
|
1110
|
+
do {
|
1111
|
+
if (find_recurse(n2, compute_hash(iter->entry.key()), hashPos,
|
1112
|
+
iter->entry.key()))
|
1113
|
+
return &iter->entry;
|
1114
|
+
iter = iter->next;
|
1115
|
+
} while (iter != nullptr);
|
1116
|
+
return nullptr;
|
1117
|
+
}
|
1118
|
+
case kInnerLeafSizeClass1:
|
1119
|
+
return findCommonInLeaf(n1.getInnerLeafSizeClass1(), n2, hashPos);
|
1120
|
+
case kInnerLeafSizeClass2:
|
1121
|
+
return findCommonInLeaf(n1.getInnerLeafSizeClass2(), n2, hashPos);
|
1122
|
+
case kInnerLeafSizeClass3:
|
1123
|
+
return findCommonInLeaf(n1.getInnerLeafSizeClass3(), n2, hashPos);
|
1124
|
+
case kInnerLeafSizeClass4:
|
1125
|
+
return findCommonInLeaf(n1.getInnerLeafSizeClass4(), n2, hashPos);
|
1126
|
+
case kBranchNode: {
|
1127
|
+
BranchNode* branch1 = n1.getBranchNode();
|
1128
|
+
BranchNode* branch2 = n2.getBranchNode();
|
1129
|
+
|
1130
|
+
uint64_t matchMask = branch1->occupation & branch2->occupation;
|
1131
|
+
|
1132
|
+
while (matchMask) {
|
1133
|
+
int pos = HighsHashHelpers::log2i(matchMask);
|
1134
|
+
assert((branch1->occupation >> pos) & 1);
|
1135
|
+
assert((branch2->occupation >> pos) & 1);
|
1136
|
+
assert((matchMask >> pos) & 1);
|
1137
|
+
|
1138
|
+
matchMask ^= (uint64_t{1} << pos);
|
1139
|
+
|
1140
|
+
assert(((matchMask >> pos) & 1) == 0);
|
1141
|
+
|
1142
|
+
int location1 = branch1->occupation.num_set_until(pos) - 1;
|
1143
|
+
int location2 = branch2->occupation.num_set_until(pos) - 1;
|
1144
|
+
|
1145
|
+
const HighsHashTableEntry<K, V>* match =
|
1146
|
+
find_common_recurse(branch1->child[location1],
|
1147
|
+
branch2->child[location2], hashPos + 1);
|
1148
|
+
if (match != nullptr) return match;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
return nullptr;
|
1152
|
+
}
|
1153
|
+
default:
|
1154
|
+
throw std::logic_error("Unexpected type in hash tree");
|
1155
|
+
}
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
static void destroy_recurse(NodePtr node) {
|
1159
|
+
switch (node.getType()) {
|
1160
|
+
case kEmpty:
|
1161
|
+
break;
|
1162
|
+
case kListLeaf: {
|
1163
|
+
ListLeaf* leaf = node.getListLeaf();
|
1164
|
+
ListNode* iter = leaf->first.next;
|
1165
|
+
delete leaf;
|
1166
|
+
while (iter != nullptr) {
|
1167
|
+
ListNode* next = iter->next;
|
1168
|
+
delete iter;
|
1169
|
+
iter = next;
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
break;
|
1173
|
+
}
|
1174
|
+
case kInnerLeafSizeClass1:
|
1175
|
+
delete node.getInnerLeafSizeClass1();
|
1176
|
+
break;
|
1177
|
+
case kInnerLeafSizeClass2:
|
1178
|
+
delete node.getInnerLeafSizeClass2();
|
1179
|
+
break;
|
1180
|
+
case kInnerLeafSizeClass3:
|
1181
|
+
delete node.getInnerLeafSizeClass3();
|
1182
|
+
break;
|
1183
|
+
case kInnerLeafSizeClass4:
|
1184
|
+
delete node.getInnerLeafSizeClass4();
|
1185
|
+
break;
|
1186
|
+
case kBranchNode: {
|
1187
|
+
BranchNode* branch = node.getBranchNode();
|
1188
|
+
int size = branch->occupation.num_set();
|
1189
|
+
|
1190
|
+
for (int i = 0; i < size; ++i) destroy_recurse(branch->child[i]);
|
1191
|
+
|
1192
|
+
destroyBranchingNode(branch);
|
1193
|
+
}
|
1194
|
+
}
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
static NodePtr copy_recurse(NodePtr node) {
|
1198
|
+
switch (node.getType()) {
|
1199
|
+
case kEmpty:
|
1200
|
+
throw std::logic_error("Unexpected node type in empty in hash tree");
|
1201
|
+
case kListLeaf: {
|
1202
|
+
ListLeaf* leaf = node.getListLeaf();
|
1203
|
+
|
1204
|
+
ListLeaf* copyLeaf = new ListLeaf(*leaf);
|
1205
|
+
|
1206
|
+
ListNode* iter = &leaf->first;
|
1207
|
+
ListNode* copyIter = ©Leaf->first;
|
1208
|
+
do {
|
1209
|
+
copyIter->next = new ListNode(*iter->next);
|
1210
|
+
iter = iter->next;
|
1211
|
+
copyIter = copyIter->next;
|
1212
|
+
} while (iter->next != nullptr);
|
1213
|
+
|
1214
|
+
return copyLeaf;
|
1215
|
+
}
|
1216
|
+
case kInnerLeafSizeClass1: {
|
1217
|
+
InnerLeaf<1>* leaf = node.getInnerLeafSizeClass1();
|
1218
|
+
return new InnerLeaf<1>(*leaf);
|
1219
|
+
}
|
1220
|
+
case kInnerLeafSizeClass2: {
|
1221
|
+
InnerLeaf<2>* leaf = node.getInnerLeafSizeClass2();
|
1222
|
+
return new InnerLeaf<2>(*leaf);
|
1223
|
+
}
|
1224
|
+
case kInnerLeafSizeClass3: {
|
1225
|
+
InnerLeaf<3>* leaf = node.getInnerLeafSizeClass3();
|
1226
|
+
return new InnerLeaf<3>(*leaf);
|
1227
|
+
}
|
1228
|
+
case kInnerLeafSizeClass4: {
|
1229
|
+
InnerLeaf<4>* leaf = node.getInnerLeafSizeClass4();
|
1230
|
+
return new InnerLeaf<4>(*leaf);
|
1231
|
+
}
|
1232
|
+
case kBranchNode: {
|
1233
|
+
BranchNode* branch = node.getBranchNode();
|
1234
|
+
int size = branch->occupation.num_set();
|
1235
|
+
BranchNode* newBranch =
|
1236
|
+
(BranchNode*)::operator new(getBranchNodeSize(size));
|
1237
|
+
newBranch->occupation = branch->occupation;
|
1238
|
+
for (int i = 0; i < size; ++i)
|
1239
|
+
newBranch->child[i] = copy_recurse(branch->child[i]);
|
1240
|
+
|
1241
|
+
return newBranch;
|
1242
|
+
}
|
1243
|
+
default:
|
1244
|
+
throw std::logic_error("Unexpected type in hash tree");
|
1245
|
+
}
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
template <typename R, typename F,
|
1249
|
+
typename std::enable_if<std::is_void<R>::value, int>::type = 0>
|
1250
|
+
static void for_each_recurse(NodePtr node, F&& f) {
|
1251
|
+
switch (node.getType()) {
|
1252
|
+
case kEmpty:
|
1253
|
+
break;
|
1254
|
+
case kListLeaf: {
|
1255
|
+
ListLeaf* leaf = node.getListLeaf();
|
1256
|
+
ListNode* iter = &leaf->first;
|
1257
|
+
do {
|
1258
|
+
iter->entry.forward(f);
|
1259
|
+
iter = iter->next;
|
1260
|
+
} while (iter != nullptr);
|
1261
|
+
break;
|
1262
|
+
}
|
1263
|
+
case kInnerLeafSizeClass1: {
|
1264
|
+
InnerLeaf<1>* leaf = node.getInnerLeafSizeClass1();
|
1265
|
+
for (int i = 0; i < leaf->size; ++i) leaf->entries[i].forward(f);
|
1266
|
+
|
1267
|
+
break;
|
1268
|
+
}
|
1269
|
+
case kInnerLeafSizeClass2: {
|
1270
|
+
InnerLeaf<2>* leaf = node.getInnerLeafSizeClass2();
|
1271
|
+
for (int i = 0; i < leaf->size; ++i) leaf->entries[i].forward(f);
|
1272
|
+
|
1273
|
+
break;
|
1274
|
+
}
|
1275
|
+
case kInnerLeafSizeClass3: {
|
1276
|
+
InnerLeaf<3>* leaf = node.getInnerLeafSizeClass3();
|
1277
|
+
for (int i = 0; i < leaf->size; ++i) leaf->entries[i].forward(f);
|
1278
|
+
|
1279
|
+
break;
|
1280
|
+
}
|
1281
|
+
case kInnerLeafSizeClass4: {
|
1282
|
+
InnerLeaf<4>* leaf = node.getInnerLeafSizeClass4();
|
1283
|
+
for (int i = 0; i < leaf->size; ++i) leaf->entries[i].forward(f);
|
1284
|
+
|
1285
|
+
break;
|
1286
|
+
}
|
1287
|
+
case kBranchNode: {
|
1288
|
+
BranchNode* branch = node.getBranchNode();
|
1289
|
+
int size = branch->occupation.num_set();
|
1290
|
+
|
1291
|
+
for (int i = 0; i < size; ++i) for_each_recurse<R>(branch->child[i], f);
|
1292
|
+
}
|
1293
|
+
}
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
template <typename R, typename F,
|
1297
|
+
typename std::enable_if<!std::is_void<R>::value, int>::type = 0>
|
1298
|
+
static R for_each_recurse(NodePtr node, F&& f) {
|
1299
|
+
switch (node.getType()) {
|
1300
|
+
case kEmpty:
|
1301
|
+
break;
|
1302
|
+
case kListLeaf: {
|
1303
|
+
ListLeaf* leaf = node.getListLeaf();
|
1304
|
+
ListNode* iter = &leaf->first;
|
1305
|
+
do {
|
1306
|
+
auto x = iter->entry.forward(f);
|
1307
|
+
if (x) return x;
|
1308
|
+
iter = iter->next;
|
1309
|
+
} while (iter != nullptr);
|
1310
|
+
break;
|
1311
|
+
}
|
1312
|
+
case kInnerLeafSizeClass1: {
|
1313
|
+
InnerLeaf<1>* leaf = node.getInnerLeafSizeClass1();
|
1314
|
+
for (int i = 0; i < leaf->size; ++i) {
|
1315
|
+
auto x = leaf->entries[i].forward(f);
|
1316
|
+
if (x) return x;
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
break;
|
1320
|
+
}
|
1321
|
+
case kInnerLeafSizeClass2: {
|
1322
|
+
InnerLeaf<2>* leaf = node.getInnerLeafSizeClass2();
|
1323
|
+
for (int i = 0; i < leaf->size; ++i) {
|
1324
|
+
auto x = leaf->entries[i].forward(f);
|
1325
|
+
if (x) return x;
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
break;
|
1329
|
+
}
|
1330
|
+
case kInnerLeafSizeClass3: {
|
1331
|
+
InnerLeaf<3>* leaf = node.getInnerLeafSizeClass3();
|
1332
|
+
for (int i = 0; i < leaf->size; ++i) {
|
1333
|
+
auto x = leaf->entries[i].forward(f);
|
1334
|
+
if (x) return x;
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
break;
|
1338
|
+
}
|
1339
|
+
case kInnerLeafSizeClass4: {
|
1340
|
+
InnerLeaf<4>* leaf = node.getInnerLeafSizeClass4();
|
1341
|
+
for (int i = 0; i < leaf->size; ++i) {
|
1342
|
+
auto x = leaf->entries[i].forward(f);
|
1343
|
+
if (x) return x;
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
break;
|
1347
|
+
}
|
1348
|
+
case kBranchNode: {
|
1349
|
+
BranchNode* branch = node.getBranchNode();
|
1350
|
+
int size = branch->occupation.num_set();
|
1351
|
+
|
1352
|
+
for (int i = 0; i < size; ++i) {
|
1353
|
+
auto x = for_each_recurse<R>(branch->child[i], f);
|
1354
|
+
if (x) return x;
|
1355
|
+
}
|
1356
|
+
}
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
return R();
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
public:
|
1363
|
+
template <typename... Args>
|
1364
|
+
bool insert(Args&&... args) {
|
1365
|
+
HighsHashTableEntry<K, V> entry(std::forward<Args>(args)...);
|
1366
|
+
uint64_t hash = compute_hash(entry.key());
|
1367
|
+
return insert_recurse(&root, hash, 0, entry).second;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
template <typename... Args>
|
1371
|
+
std::pair<ValueType*, bool> insert_or_get(Args&&... args) {
|
1372
|
+
HighsHashTableEntry<K, V> entry(std::forward<Args>(args)...);
|
1373
|
+
uint64_t hash = compute_hash(entry.key());
|
1374
|
+
return insert_recurse(&root, hash, 0, entry);
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
void erase(const K& key) {
|
1378
|
+
uint64_t hash = compute_hash(key);
|
1379
|
+
|
1380
|
+
erase_recurse(&root, hash, 0, key);
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
bool contains(const K& key) const {
|
1384
|
+
uint64_t hash = compute_hash(key);
|
1385
|
+
return find_recurse(root, hash, 0, key) != nullptr;
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
const ValueType* find(const K& key) const {
|
1389
|
+
uint64_t hash = compute_hash(key);
|
1390
|
+
|
1391
|
+
return find_recurse(root, hash, 0, key);
|
1392
|
+
}
|
1393
|
+
|
1394
|
+
ValueType* find(const K& key) {
|
1395
|
+
uint64_t hash = compute_hash(key);
|
1396
|
+
|
1397
|
+
return find_recurse(root, hash, 0, key);
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
const HighsHashTableEntry<K, V>* find_common(
|
1401
|
+
const HighsHashTree<K, V>& other) const {
|
1402
|
+
return find_common_recurse(root, other.root, 0);
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
bool empty() const { return root.getType() == kEmpty; }
|
1406
|
+
|
1407
|
+
void clear() {
|
1408
|
+
destroy_recurse(root);
|
1409
|
+
root = nullptr;
|
1410
|
+
}
|
1411
|
+
|
1412
|
+
template <typename F>
|
1413
|
+
auto for_each(F&& f) const
|
1414
|
+
-> decltype(HighsHashTableEntry<K, V>().forward(f)) {
|
1415
|
+
using R = decltype(for_each(f));
|
1416
|
+
return for_each_recurse<R>(root, f);
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
HighsHashTree() = default;
|
1420
|
+
|
1421
|
+
HighsHashTree(HighsHashTree&& other) : root(other.root) {
|
1422
|
+
other.root = nullptr;
|
1423
|
+
}
|
1424
|
+
|
1425
|
+
HighsHashTree(const HighsHashTree& other) : root(copy_recurse(other.root)) {}
|
1426
|
+
|
1427
|
+
HighsHashTree& operator=(HighsHashTree&& other) {
|
1428
|
+
destroy_recurse(root);
|
1429
|
+
root = other.root;
|
1430
|
+
other.root = nullptr;
|
1431
|
+
return *this;
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
HighsHashTree& operator=(const HighsHashTree& other) {
|
1435
|
+
destroy_recurse(root);
|
1436
|
+
root = copy_recurse(other.root);
|
1437
|
+
return *this;
|
1438
|
+
}
|
1439
|
+
|
1440
|
+
~HighsHashTree() { destroy_recurse(root); }
|
1441
|
+
};
|
1442
|
+
|
1443
|
+
#endif
|