casadi 3.6.3__cp311-none-manylinux2014_i686.whl → 3.6.4__cp311-none-manylinux2014_i686.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/_casadi.so +0 -0
- casadi/casadi.py +87 -10
- casadi/cbc +0 -0
- casadi/clp +0 -0
- casadi/cmake/alpaqa/alpaqaConfig.cmake +24 -0
- casadi/cmake/alpaqa/alpaqaConfigVersion.cmake +70 -0
- casadi/cmake/alpaqa/alpaqaTargets-release.cmake +29 -0
- casadi/cmake/alpaqa/alpaqaTargets.cmake +131 -0
- casadi/cmake/casadi-config-version.cmake +1 -1
- casadi/cmake/highs/highs-config.cmake +18 -4
- casadi/cmake/highs/highs-targets-release.cmake +3 -3
- casadi/cmake/highs/highs-targets.cmake +1 -1
- casadi/cmake/sleqp/sleqp-config-version.cmake +70 -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 +88 -0
- casadi/cmake/trlib/trlib-config.cmake +107 -0
- casadi/highs +0 -0
- casadi/include/casadi/casadi.i +13 -3
- casadi/include/casadi/config.h +8 -8
- casadi/include/casadi/core/calculus.hpp +1 -1
- casadi/include/casadi/core/fmu.hpp +29 -1
- casadi/include/casadi/core/nlpsol.hpp +0 -2
- casadi/include/casadi/core/serializing_stream.hpp +12 -0
- casadi/include/casadi/doc.i +407 -125
- casadi/include/casadi/doc_merged.i +324 -70
- casadi/include/highs/HConfig.h +4 -7
- casadi/include/highs/Highs.h +240 -51
- casadi/include/highs/filereaderlp/builder.hpp +12 -13
- casadi/include/highs/filereaderlp/model.hpp +32 -35
- casadi/include/highs/fortran/highs_fortran_api.mod +0 -0
- casadi/include/highs/interfaces/highs_c_api.h +964 -577
- casadi/include/highs/io/Filereader.h +2 -4
- casadi/include/highs/io/FilereaderEms.h +2 -4
- casadi/include/highs/io/FilereaderLp.h +2 -4
- casadi/include/highs/io/FilereaderMps.h +2 -4
- casadi/include/highs/io/HMPSIO.h +2 -4
- casadi/include/highs/io/HMpsFF.h +2 -4
- casadi/include/highs/io/HighsIO.h +19 -13
- casadi/include/highs/io/LoadOptions.h +7 -6
- casadi/include/highs/ipm/IpxWrapper.h +4 -5
- casadi/include/highs/lp_data/HConst.h +60 -15
- casadi/include/highs/lp_data/HStruct.h +32 -8
- casadi/include/highs/lp_data/HighsAnalysis.h +2 -4
- 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 +2 -4
- casadi/include/highs/lp_data/HighsInfo.h +22 -23
- casadi/include/highs/lp_data/HighsInfoDebug.h +2 -4
- casadi/include/highs/lp_data/HighsLp.h +14 -6
- casadi/include/highs/lp_data/HighsLpSolverObject.h +6 -5
- casadi/include/highs/lp_data/HighsLpUtils.h +23 -12
- casadi/include/highs/lp_data/HighsModelUtils.h +22 -8
- casadi/include/highs/lp_data/HighsOptions.h +175 -106
- casadi/include/highs/lp_data/HighsRanging.h +2 -4
- casadi/include/highs/lp_data/HighsRuntimeOptions.h +21 -6
- casadi/include/highs/lp_data/HighsSolution.h +4 -4
- casadi/include/highs/lp_data/HighsSolutionDebug.h +2 -4
- casadi/include/highs/lp_data/HighsSolve.h +2 -4
- casadi/include/highs/lp_data/HighsStatus.h +2 -4
- casadi/include/highs/mip/HighsCliqueTable.h +18 -20
- casadi/include/highs/mip/HighsConflictPool.h +2 -4
- casadi/include/highs/mip/HighsCutGeneration.h +2 -4
- casadi/include/highs/mip/HighsCutPool.h +2 -4
- casadi/include/highs/mip/HighsDebugSol.h +2 -4
- casadi/include/highs/mip/HighsDomain.h +5 -5
- casadi/include/highs/mip/HighsDomainChange.h +2 -4
- casadi/include/highs/mip/HighsDynamicRowMatrix.h +2 -4
- casadi/include/highs/mip/HighsGFkSolve.h +2 -4
- casadi/include/highs/mip/HighsImplications.h +2 -4
- casadi/include/highs/mip/HighsLpAggregator.h +2 -4
- casadi/include/highs/mip/HighsLpRelaxation.h +2 -4
- casadi/include/highs/mip/HighsMipSolver.h +18 -6
- casadi/include/highs/mip/HighsMipSolverData.h +8 -4
- casadi/include/highs/mip/HighsModkSeparator.h +2 -4
- casadi/include/highs/mip/HighsNodeQueue.h +3 -9
- casadi/include/highs/mip/HighsObjectiveFunction.h +2 -4
- casadi/include/highs/mip/HighsPathSeparator.h +2 -4
- casadi/include/highs/mip/HighsPrimalHeuristics.h +2 -4
- casadi/include/highs/mip/HighsPseudocost.h +2 -4
- casadi/include/highs/mip/HighsRedcostFixing.h +2 -4
- casadi/include/highs/mip/HighsSearch.h +2 -4
- casadi/include/highs/mip/HighsSeparation.h +2 -4
- casadi/include/highs/mip/HighsSeparator.h +2 -4
- casadi/include/highs/mip/HighsTableauSeparator.h +2 -4
- casadi/include/highs/mip/HighsTransformedLp.h +2 -4
- casadi/include/highs/model/HighsHessian.h +3 -1
- casadi/include/highs/model/HighsModel.h +2 -0
- casadi/include/highs/parallel/HighsSpinMutex.h +2 -1
- casadi/include/highs/parallel/HighsSplitDeque.h +1 -1
- casadi/include/highs/parallel/HighsTaskExecutor.h +10 -2
- casadi/include/highs/presolve/HPresolve.h +9 -6
- casadi/include/highs/presolve/HPresolveAnalysis.h +5 -4
- casadi/include/highs/presolve/HighsPostsolveStack.h +50 -13
- casadi/include/highs/presolve/HighsSymmetry.h +2 -4
- casadi/include/highs/presolve/ICrash.h +4 -3
- casadi/include/highs/presolve/ICrashUtil.h +2 -2
- casadi/include/highs/presolve/ICrashX.h +4 -6
- casadi/include/highs/presolve/PresolveComponent.h +4 -42
- casadi/include/highs/qpsolver/a_asm.hpp +56 -0
- casadi/include/highs/qpsolver/a_quass.hpp +12 -0
- casadi/include/highs/qpsolver/quass.hpp +1 -4
- casadi/include/highs/simplex/HApp.h +14 -16
- casadi/include/highs/simplex/HEkk.h +12 -11
- casadi/include/highs/simplex/HEkkDual.h +2 -4
- casadi/include/highs/simplex/HEkkDualRHS.h +5 -6
- casadi/include/highs/simplex/HEkkDualRow.h +2 -4
- casadi/include/highs/simplex/HEkkPrimal.h +2 -4
- casadi/include/highs/simplex/HSimplex.h +2 -4
- casadi/include/highs/simplex/HSimplexDebug.h +2 -4
- casadi/include/highs/simplex/HSimplexNla.h +2 -4
- casadi/include/highs/simplex/HSimplexReport.h +3 -5
- casadi/include/highs/simplex/HighsSimplexAnalysis.h +2 -4
- casadi/include/highs/simplex/SimplexConst.h +7 -5
- casadi/include/highs/simplex/SimplexStruct.h +11 -5
- casadi/include/highs/simplex/SimplexTimer.h +2 -4
- casadi/include/highs/test/DevKkt.h +2 -4
- casadi/include/highs/test/KktCh2.h +2 -4
- casadi/include/highs/util/FactorTimer.h +2 -4
- casadi/include/highs/util/HFactor.h +2 -4
- casadi/include/highs/util/HFactorConst.h +2 -4
- casadi/include/highs/util/HFactorDebug.h +2 -4
- casadi/include/highs/util/HSet.h +3 -5
- casadi/include/highs/util/HVector.h +2 -4
- casadi/include/highs/util/HVectorBase.h +2 -4
- casadi/include/highs/util/HighsCDouble.h +2 -4
- casadi/include/highs/util/HighsComponent.h +2 -4
- casadi/include/highs/util/HighsDataStack.h +3 -5
- casadi/include/highs/util/HighsDisjointSets.h +8 -10
- casadi/include/highs/util/HighsHash.h +22 -7
- casadi/include/highs/util/HighsHashTree.h +25 -7
- casadi/include/highs/util/HighsInt.h +2 -4
- casadi/include/highs/util/HighsIntegers.h +2 -4
- casadi/include/highs/util/HighsLinearSumBounds.h +2 -4
- casadi/include/highs/util/HighsMatrixPic.h +2 -4
- casadi/include/highs/util/HighsMatrixSlice.h +2 -4
- casadi/include/highs/util/HighsMatrixUtils.h +2 -4
- casadi/include/highs/util/HighsRandom.h +2 -4
- casadi/include/highs/util/HighsRbTree.h +2 -4
- casadi/include/highs/util/HighsSort.h +2 -4
- casadi/include/highs/util/HighsSparseMatrix.h +11 -7
- casadi/include/highs/util/HighsSparseVectorSum.h +2 -4
- casadi/include/highs/util/HighsSplay.h +2 -4
- casadi/include/highs/util/HighsTimer.h +3 -4
- casadi/include/highs/util/HighsUtils.h +14 -4
- casadi/include/highs/util/stringutil.h +2 -4
- casadi/include/licenses/alpaqa-external/LICENSE +165 -0
- casadi/include/licenses/highs-external/LICENSE +1 -1
- casadi/include/licenses/sleqp-external/LICENSE +165 -0
- casadi/include/licenses/trlib-external/LICENSE +21 -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/libtinyxml2.a +0 -0
- casadi/libCbc.la +3 -3
- casadi/libCbc.so +0 -0
- casadi/libCbc.so.3 +0 -0
- casadi/libCbc.so.3.10.11 +0 -0
- casadi/libCbcSolver.la +3 -3
- casadi/libCbcSolver.so +0 -0
- casadi/libCbcSolver.so.3 +0 -0
- casadi/libCbcSolver.so.3.10.11 +0 -0
- casadi/libCgl.la +2 -2
- casadi/libCgl.so +0 -0
- casadi/libCgl.so.1 +0 -0
- casadi/libCgl.so.1.10.8 +0 -0
- casadi/libClp.la +2 -2
- casadi/libClp.so +0 -0
- casadi/libClp.so.1 +0 -0
- casadi/{libClp.so.1.14.7 → libClp.so.1.14.9} +0 -0
- casadi/libClpSolver.la +2 -2
- casadi/libClpSolver.so +0 -0
- casadi/libClpSolver.so.1 +0 -0
- casadi/{libClpSolver.so.1.14.7 → libClpSolver.so.1.14.9} +0 -0
- casadi/libCoinUtils.la +2 -2
- casadi/libCoinUtils.so +0 -0
- casadi/libCoinUtils.so.3 +0 -0
- casadi/libCoinUtils.so.3.11.10 +0 -0
- casadi/libFortranHighs.so +0 -0
- casadi/libOsi.la +2 -2
- casadi/libOsiCbc.la +3 -3
- casadi/libOsiCbc.so +0 -0
- casadi/libOsiCbc.so.3 +0 -0
- casadi/{libOsiCbc.so.3.10.6 → libOsiCbc.so.3.10.11} +0 -0
- casadi/libOsiClp.la +2 -2
- casadi/libOsiClp.so +0 -0
- casadi/libOsiClp.so.1 +0 -0
- casadi/libOsiClp.so.1.14.9 +0 -0
- casadi/libOsiCommonTests.la +2 -2
- casadi/libOsiCommonTests.so +0 -0
- casadi/libOsiCommonTests.so.1 +0 -0
- casadi/{libOsiCommonTests.so.1.13.7 → libOsiCommonTests.so.1.13.9} +0 -0
- casadi/libalpaqa-dl-loader.so +0 -0
- casadi/libalpaqa-dl-loader.so.1.0.0 +0 -0
- casadi/libalpaqa.so +0 -0
- casadi/libalpaqa.so.1.0.0 +0 -0
- casadi/libbonmin.la +3 -3
- casadi/libbonmin.so +0 -0
- casadi/libbonmin.so.4 +0 -0
- casadi/libbonmin.so.4.8.9 +0 -0
- casadi/libcasadi.so +0 -0
- casadi/libcasadi.so.3.7 +0 -0
- casadi/libcasadi_conic_cbc.so +0 -0
- casadi/libcasadi_conic_cbc.so.3.7 +0 -0
- casadi/libcasadi_conic_clp.so +0 -0
- casadi/libcasadi_conic_clp.so.3.7 +0 -0
- casadi/libcasadi_conic_gurobi.so +0 -0
- casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
- casadi/libcasadi_conic_highs.so +0 -0
- casadi/libcasadi_conic_highs.so.3.7 +0 -0
- casadi/libcasadi_conic_ipqp.so +0 -0
- casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
- casadi/libcasadi_conic_nlpsol.so +0 -0
- casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
- casadi/libcasadi_conic_osqp.so +0 -0
- casadi/libcasadi_conic_osqp.so.3.7 +0 -0
- casadi/libcasadi_conic_proxqp.so +0 -0
- casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
- casadi/libcasadi_conic_qpoases.so +0 -0
- casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
- casadi/libcasadi_conic_qrqp.so +0 -0
- casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
- casadi/libcasadi_conic_superscs.so +0 -0
- casadi/libcasadi_conic_superscs.so.3.7 +0 -0
- casadi/libcasadi_integrator_collocation.so +0 -0
- casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
- casadi/libcasadi_integrator_cvodes.so +0 -0
- casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
- casadi/libcasadi_integrator_idas.so +0 -0
- casadi/libcasadi_integrator_idas.so.3.7 +0 -0
- casadi/libcasadi_interpolant_bspline.so +0 -0
- casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
- casadi/libcasadi_interpolant_linear.so +0 -0
- casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
- casadi/libcasadi_linsol_lapacklu.so +0 -0
- casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
- casadi/libcasadi_linsol_lapackqr.so +0 -0
- casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
- casadi/libcasadi_linsol_ldl.so +0 -0
- casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
- casadi/libcasadi_linsol_mumps.so +0 -0
- casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
- casadi/libcasadi_linsol_qr.so +0 -0
- casadi/libcasadi_linsol_qr.so.3.7 +0 -0
- casadi/libcasadi_linsol_symbolicqr.so +0 -0
- casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so +0 -0
- casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ampl.so +0 -0
- casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so +0 -0
- casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_bonmin.so +0 -0
- casadi/libcasadi_nlpsol_bonmin.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_ipopt.so +0 -0
- casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_knitro.so +0 -0
- casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so +0 -0
- casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sleqp.so +0 -0
- casadi/libcasadi_nlpsol_sleqp.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_snopt.so +0 -0
- casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
- casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
- casadi/libcasadi_nlpsol_worhp.so +0 -0
- casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so +0 -0
- casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
- casadi/libcasadi_rootfinder_newton.so +0 -0
- casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
- casadi/libcasadi_sundials_common.so +0 -0
- casadi/libcasadi_sundials_common.so.3.7 +0 -0
- casadi/libhighs.so +0 -0
- casadi/libhighs.so.1.6 +0 -0
- casadi/libhighs.so.1.6.0 +0 -0
- casadi/libindirect.a +0 -0
- casadi/liblinsys.a +0 -0
- casadi/libosqp.a +0 -0
- casadi/libqdldl.a +0 -0
- casadi/libsleqp.so +0 -0
- casadi/libsleqp.so.1.0.1 +0 -0
- casadi/libspral.a +0 -0
- casadi/libsuperscs.a +0 -0
- casadi/libtrlib.so +0 -0
- casadi/libtrlib.so.0.4 +0 -0
- casadi/pkgconfig/blas.pc +11 -0
- casadi/pkgconfig/bonmin.pc +1 -1
- casadi/pkgconfig/casadi.pc +1 -1
- casadi/pkgconfig/cbc.pc +2 -2
- casadi/pkgconfig/cgl.pc +2 -2
- casadi/pkgconfig/clp.pc +1 -1
- casadi/pkgconfig/coinutils.pc +1 -1
- casadi/pkgconfig/highs.pc +3 -3
- casadi/pkgconfig/lapack.pc +11 -0
- casadi/pkgconfig/openblas.pc +1 -1
- casadi/pkgconfig/osi-cbc.pc +1 -1
- casadi/pkgconfig/osi-clp.pc +1 -1
- casadi/pkgconfig/osi-unittests.pc +1 -1
- casadi/pkgconfig/osi.pc +1 -1
- casadi/pkgconfig/sleqp.pc +10 -0
- {casadi-3.6.3.dist-info → casadi-3.6.4.dist-info}/METADATA +1 -1
- {casadi-3.6.3.dist-info → casadi-3.6.4.dist-info}/RECORD +314 -274
- casadi/libCbc.so.3.10.6 +0 -0
- casadi/libCbcSolver.so.3.10.6 +0 -0
- casadi/libCgl.so.1.10.4 +0 -0
- casadi/libCoinUtils.so.3.11.6 +0 -0
- casadi/libOsiClp.so.1.14.7 +0 -0
- casadi/libbonmin.so.4.8.8 +0 -0
- casadi/libhighs.so.1.4 +0 -0
- casadi/libhighs.so.1.4.0 +0 -0
- /casadi/{libOsi.so.1.13.7 → libOsi.so.1.13.9} +0 -0
- {casadi-3.6.3.dist-info → casadi-3.6.4.dist-info}/WHEEL +0 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
/* MIT License
|
2
|
+
*
|
3
|
+
* Copyright (c) 2016--2017 Felix Lenders
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
13
|
+
* copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
* SOFTWARE.
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
|
25
|
+
#ifndef TRLIB_LEFTMOST_H
|
26
|
+
#define TRLIB_LEFTMOST_H
|
27
|
+
|
28
|
+
#define TRLIB_LMR_CONV (0)
|
29
|
+
#define TRLIB_LMR_ITMAX (-1)
|
30
|
+
#define TRLIB_LMR_NEWTON_BREAK (3)
|
31
|
+
|
32
|
+
/** Computes smallest eigenvalue of symmetric tridiagonal matrix
|
33
|
+
* :math:`T \in \mathbb R^{n\times n}`,
|
34
|
+
* using a iteration based on last-pivot function of Parlett and Reid.
|
35
|
+
*
|
36
|
+
* Let :math:`T = \begin{pmatrix} T_1 & & \\ & \ddots & \\ & & T_\ell \end{pmatrix}`
|
37
|
+
* be composed into irreducible blocks :math:`T_i`.
|
38
|
+
*
|
39
|
+
* Calls :c:func:`trlib_leftmost_irreducible` on every irreducible block in case of coldstart,
|
40
|
+
* in case of warmstart just updates information on :math:`T_\ell`.
|
41
|
+
*
|
42
|
+
* :param nirblk: number of irreducible blocks :math:`\ell`, ensure :math:`\ell > 0`
|
43
|
+
* :type nirblk: trlib_int_t, input
|
44
|
+
* :param irblk: pointer to indices of irreducible blocks, length :c:data:`nirblk+1`:
|
45
|
+
*
|
46
|
+
* - :c:data:`irblk[i]` is the start index of block :math:`i` in :c:data:`diag` and :c:data:`offdiag`
|
47
|
+
* - :c:data:`irblk[i+1] - 1` is the stop index of block :math:`i`
|
48
|
+
* - :c:data:`irblk[i+1] - irred[i]` the dimension :math:`n_\ell` of block :math:`i`
|
49
|
+
* - :c:data:`irblk[nirred]` the dimension of :math:`T`
|
50
|
+
*
|
51
|
+
* :type irblk: trlib_int_t, input
|
52
|
+
* :param diag: pointer to array holding diagonal of :math:`T`, length :c:data:`irblk[nirblk]`
|
53
|
+
* :type diag: trlib_flt_t, input
|
54
|
+
* :param offdiag: pointer to array holding offdiagonal of :math:`T`, length :c:data:`irblk[nirblk]`
|
55
|
+
* :type offdiag: trlib_flt_t, input
|
56
|
+
* :param warm: set :math:`\ge 1` if you want to update information about block :math:`\ell`, provide values in :c:data:`leftmost_minor`, :c:data:`ileftmost`, :c:data:`leftmost`; else ``0``
|
57
|
+
* :type warm: trlib_int_t, input
|
58
|
+
* :param leftmost_minor: smallest eigenvalue of principal :math:`(n_\ell-1)\times (n_\ell-1)` submatrix of :math:`T_\ell`
|
59
|
+
* :type leftmost_minor: trlib_flt_t, input
|
60
|
+
* :param itmax: maximum number of iterations
|
61
|
+
* :type itmax: trlib_int_t, input
|
62
|
+
* :param tol_abs: absolute stopping tolerance in Reid-Parlett zero finding, good default may be :math:`\sqrt{\texttt{macheps}}^{3/4}` (:c:macro:`TRLIB_EPS_POW_75`)
|
63
|
+
* :type tol_abs: trlib_flt_t, input
|
64
|
+
* :param verbose: determines the verbosity level of output that is written to :c:data:`fout`
|
65
|
+
* :type verbose: trlib_int_t, input
|
66
|
+
* :param unicode: set to ``1`` if :c:data:`fout` can handle unicode, otherwise to ``0``
|
67
|
+
* :type unicode: trlib_int_t, input
|
68
|
+
* :param prefix: string that is printed before iteration output
|
69
|
+
* :type prefix: char, input
|
70
|
+
* :param fout: output stream
|
71
|
+
* :type fout: FILE, input
|
72
|
+
* :param timing: gives timing details, provide allocated zero initialized memory of length :c:func:`trlib_leftmost_timing_size`
|
73
|
+
*
|
74
|
+
* ====== ================================
|
75
|
+
* block description
|
76
|
+
* ====== ================================
|
77
|
+
* 0 total duration
|
78
|
+
* ====== ================================
|
79
|
+
*
|
80
|
+
* :type timing: trlib_int_t, input/output
|
81
|
+
* :param ileftmost: index of block that corresponds to absolute smallest eigenvalue
|
82
|
+
* :type ileftmost: trlib_int_t, input/output
|
83
|
+
* :param leftmost: smallest eigenvalue of :math:`T`, length :math:`\ell`
|
84
|
+
*
|
85
|
+
* - on entry: allocated memory
|
86
|
+
* - on exit: :c:data:`leftmost[i]` smallest eigenvalue of :math:`T_i`
|
87
|
+
*
|
88
|
+
* :type leftmost: trlib_flt_t, input/output
|
89
|
+
* :returns: status
|
90
|
+
*
|
91
|
+
* - :c:macro:`TRLIB_LMR_CONV` success
|
92
|
+
* - :c:macro:`TRLIB_LMR_ITMAX` iteration limit exceeded
|
93
|
+
*
|
94
|
+
* :rtype: trlib_int_t
|
95
|
+
*/
|
96
|
+
|
97
|
+
trlib_int_t trlib_leftmost(
|
98
|
+
trlib_int_t nirblk, trlib_int_t *irblk, trlib_flt_t *diag, trlib_flt_t *offdiag,
|
99
|
+
trlib_int_t warm, trlib_flt_t leftmost_minor, trlib_int_t itmax, trlib_flt_t tol_abs,
|
100
|
+
trlib_int_t verbose, trlib_int_t unicode, char *prefix, FILE *fout,
|
101
|
+
trlib_int_t *timing, trlib_int_t *ileftmost, trlib_flt_t *leftmost);
|
102
|
+
|
103
|
+
/** Computes smallest eigenvalue of irreducible symmetric tridiagonal matrix
|
104
|
+
* :math:`T \in \mathbb R^{n\times n}`,
|
105
|
+
* using a iteration based on last-pivot function of Parlett and Reid.
|
106
|
+
*
|
107
|
+
* Method is sketched on p. 516 in [Gould1999]_.
|
108
|
+
*
|
109
|
+
* Note that this function most likely will fail in the case of a reducible matrix
|
110
|
+
* (:c:data:`offdiag` contains 0).
|
111
|
+
*
|
112
|
+
* **Convergence**
|
113
|
+
*
|
114
|
+
* Convergence is reported if :math:`\texttt{up}-\texttt{low} \le \texttt{tol}\_\texttt{abs} * \max\{1, \vert \texttt{low} \vert, \vert \texttt{up} \vert \}` or :math:`\texttt{prlp} \le \texttt{tol}\_\texttt{abs}`, :math:`\texttt{low}` and :math:`\texttt{up}` denote bracket values enclosing the leftmost eigenvalue and :math:`\texttt{prlp}` denotes the last-pivot function value used in root finding.
|
115
|
+
*
|
116
|
+
* :param n: dimension, ensure :math:`n > 0`
|
117
|
+
* :type n: trlib_int_t, input
|
118
|
+
* :param diag: pointer to array holding diagonal of :math:`T`, length :c:data:`n`
|
119
|
+
* :type diag: trlib_flt_t, input
|
120
|
+
* :param offdiag: pointer to array holding offdiagonal of :math:`T`, length :c:data:`n-1`
|
121
|
+
* :type offdiag: trlib_flt_t, input
|
122
|
+
* :param warm: set :math:`\ge 1` if you provide a valid value in :c:data:`leftmost_minor`, else ``0``. Exact value determines which model will be used for zero-finding
|
123
|
+
*
|
124
|
+
* ===== ======
|
125
|
+
* warm model
|
126
|
+
* ===== ======
|
127
|
+
* 0 linear model for rational function
|
128
|
+
* 1 sensible heuristic model choice for lifted rational function
|
129
|
+
* 2 asymptotic quadratic model :math:`\theta^2 + b \theta + c` for lifted rational function
|
130
|
+
* 3 taylor quadratic model :math:`a \theta^2 + b \theta + c` for lifted rational function
|
131
|
+
* 4 linear model :math:`b \theta + c` for lifted rational function
|
132
|
+
* ===== ======
|
133
|
+
*
|
134
|
+
* :type warm: trlib_int_t, input
|
135
|
+
* :param leftmost_minor: smallest eigenvalue of principal :math:`(n-1)\times (n-1)` submatrix of :math:`T`
|
136
|
+
* :type leftmost_minor: trlib_flt_t, input
|
137
|
+
* :param itmax: maximum number of iterations
|
138
|
+
* :type itmax: trlib_int_t, input
|
139
|
+
* :param tol_abs: absolute stopping tolerance in Reid-Parlett zero finding, good default may be :math:`\sqrt{\texttt{macheps}}^{3/4}` (:c:macro:`TRLIB_EPS_POW_75`)
|
140
|
+
* :type tol_abs: trlib_flt_t, input
|
141
|
+
* :param verbose: determines the verbosity level of output that is written to :c:data:`fout`
|
142
|
+
* :type verbose: trlib_int_t, input
|
143
|
+
* :param unicode: set to ``1`` if :c:data:`fout` can handle unicode, otherwise to ``0``
|
144
|
+
* :type unicode: trlib_int_t, input
|
145
|
+
* :param prefix: string that is printed before iteration output
|
146
|
+
* :type prefix: char, input
|
147
|
+
* :param fout: output stream
|
148
|
+
* :type fout: FILE, input
|
149
|
+
* :param timing: gives timing details, provide allocated zero initialized memory of length :c:func:`trlib_leftmost_timing_size`
|
150
|
+
*
|
151
|
+
* ====== ================================
|
152
|
+
* block description
|
153
|
+
* ====== ================================
|
154
|
+
* 0 total duration
|
155
|
+
* ====== ================================
|
156
|
+
*
|
157
|
+
* :type timing: trlib_int_t, input/output
|
158
|
+
* :param leftmost: smallest eigenvalue of :math:`T`
|
159
|
+
* :type leftmost: trlib_flt_t, output
|
160
|
+
* :param iter_pr: number of Parlett-Reid iterations
|
161
|
+
* :type iter_pr: trlib_int_t, output
|
162
|
+
*
|
163
|
+
* :returns: status
|
164
|
+
*
|
165
|
+
* - :c:macro:`TRLIB_LMR_CONV` success
|
166
|
+
* - :c:macro:`TRLIB_LMR_ITMAX` iteration limit exceeded
|
167
|
+
*
|
168
|
+
* :rtype: trlib_int_t
|
169
|
+
*/
|
170
|
+
|
171
|
+
trlib_int_t trlib_leftmost_irreducible(
|
172
|
+
trlib_int_t n, trlib_flt_t *diag, trlib_flt_t *offdiag,
|
173
|
+
trlib_int_t warm, trlib_flt_t leftmost_minor, trlib_int_t itmax, trlib_flt_t tol_abs,
|
174
|
+
trlib_int_t verbose, trlib_int_t unicode, char *prefix, FILE *fout,
|
175
|
+
trlib_int_t *timing, trlib_flt_t *leftmost, trlib_int_t *iter_pr);
|
176
|
+
|
177
|
+
/** size that has to be allocated for :c:data:`timing` in :c:func:`trlib_leftmost_irreducible` and :c:func:`trlib_leftmost`
|
178
|
+
*/
|
179
|
+
trlib_int_t trlib_leftmost_timing_size(void);
|
180
|
+
|
181
|
+
#endif
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/* MIT License
|
2
|
+
*
|
3
|
+
* Copyright (c) 2016--2017 Felix Lenders
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
13
|
+
* copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
* SOFTWARE.
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
|
25
|
+
#ifndef TRLIB_PRIVATE_H
|
26
|
+
#define TRLIB_PRIVATE_H
|
27
|
+
|
28
|
+
/* #undef TRLIB_MEASURE_TIME */
|
29
|
+
/* #undef TRLIB_MEASURE_SUBTIME */
|
30
|
+
|
31
|
+
#include "trlib.h"
|
32
|
+
#include <math.h>
|
33
|
+
#include <stdlib.h>
|
34
|
+
#include <stdio.h>
|
35
|
+
#include <string.h>
|
36
|
+
#include <time.h>
|
37
|
+
|
38
|
+
#if defined(_WIN32) && !defined(TRLIB_BLAS_LAPACK_UNDERSCORE_SUFFIX)
|
39
|
+
// blas
|
40
|
+
void daxpy(trlib_int_t *n, trlib_flt_t *alpha, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
41
|
+
void dscal(trlib_int_t *n, trlib_flt_t *alpha, trlib_flt_t *x, trlib_int_t *incx);
|
42
|
+
void dcopy(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
43
|
+
trlib_flt_t dnrm2(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx);
|
44
|
+
trlib_flt_t ddot(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
45
|
+
|
46
|
+
// lapack
|
47
|
+
void dpttrf(trlib_int_t *n, trlib_flt_t *d, trlib_flt_t *e, trlib_int_t *info);
|
48
|
+
void dpttrs(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *d, trlib_flt_t *e, trlib_flt_t *b, trlib_int_t *ldb, trlib_int_t *info);
|
49
|
+
void dptrfs(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *d, trlib_flt_t *e, trlib_flt_t *df, trlib_flt_t *ef, trlib_flt_t *b, trlib_int_t *ldb, trlib_flt_t *x, trlib_int_t *ldx, trlib_flt_t *ferr, trlib_flt_t *berr, trlib_flt_t *work, trlib_int_t *info);
|
50
|
+
void dlagtm(char *trans, trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *alpha, trlib_flt_t *dl, trlib_flt_t *d, trlib_flt_t *du, trlib_flt_t *x, trlib_int_t *ldx, trlib_flt_t *beta, trlib_flt_t *b, trlib_int_t *ldb);
|
51
|
+
void dgtsv(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *dl, trlib_flt_t *d, trlib_flt_t *du, trlib_flt_t *b, trlib_int_t *ldb, trlib_int_t *info);
|
52
|
+
#else
|
53
|
+
// blas
|
54
|
+
void daxpy_(trlib_int_t *n, trlib_flt_t *alpha, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
55
|
+
void dscal_(trlib_int_t *n, trlib_flt_t *alpha, trlib_flt_t *x, trlib_int_t *incx);
|
56
|
+
void dcopy_(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
57
|
+
trlib_flt_t dnrm2_(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx);
|
58
|
+
trlib_flt_t ddot_(trlib_int_t *n, trlib_flt_t *x, trlib_int_t *incx, trlib_flt_t *y, trlib_int_t *incy);
|
59
|
+
|
60
|
+
// lapack
|
61
|
+
void dpttrf_(trlib_int_t *n, trlib_flt_t *d, trlib_flt_t *e, trlib_int_t *info);
|
62
|
+
void dpttrs_(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *d, trlib_flt_t *e, trlib_flt_t *b, trlib_int_t *ldb, trlib_int_t *info);
|
63
|
+
void dptrfs_(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *d, trlib_flt_t *e, trlib_flt_t *df, trlib_flt_t *ef, trlib_flt_t *b, trlib_int_t *ldb, trlib_flt_t *x, trlib_int_t *ldx, trlib_flt_t *ferr, trlib_flt_t *berr, trlib_flt_t *work, trlib_int_t *info);
|
64
|
+
void dlagtm_(char *trans, trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *alpha, trlib_flt_t *dl, trlib_flt_t *d, trlib_flt_t *du, trlib_flt_t *x, trlib_int_t *ldx, trlib_flt_t *beta, trlib_flt_t *b, trlib_int_t *ldb);
|
65
|
+
void dgtsv_(trlib_int_t *n, trlib_int_t *nrhs, trlib_flt_t *dl, trlib_flt_t *d, trlib_flt_t *du, trlib_flt_t *b, trlib_int_t *ldb, trlib_int_t *info);
|
66
|
+
#endif
|
67
|
+
|
68
|
+
#if TRLIB_MEASURE_TIME
|
69
|
+
#define TRLIB_TIC(X) { clock_gettime(CLOCK_MONOTONIC, &X); }
|
70
|
+
#define TRLIB_DURATION(X, Y, Z) { clock_gettime(CLOCK_MONOTONIC, &Y); Z += 1000000000L*(Y.tv_sec-X.tv_sec)+Y.tv_nsec-X.tv_nsec; }
|
71
|
+
#define TRLIB_SIZE_TIMING_LINALG (9)
|
72
|
+
#if TRLIB_MEASURE_SUBTIME
|
73
|
+
#define TRLIB_DURATION_SUB(X, Y, Z) { clock_gettime(CLOCK_MONOTONIC, &Y); Z += 1000000000L*(Y.tv_sec-X.tv_sec)+Y.tv_nsec-X.tv_nsec; }
|
74
|
+
#else
|
75
|
+
#define TRLIB_DURATION_SUB(X, Y, Z)
|
76
|
+
#endif
|
77
|
+
#else
|
78
|
+
#define TRLIB_TIC(X)
|
79
|
+
#define TRLIB_DURATION(X, Y, Z)
|
80
|
+
#define TRLIB_DURATION_SUB(X, Y, Z)
|
81
|
+
#endif
|
82
|
+
#define TRLIB_RETURN(X) { TRLIB_DURATION(verystart, end, timing[0]) return X; }
|
83
|
+
#if defined(_WIN32) && !defined(TRLIB_BLAS_LAPACK_UNDERSCORE_SUFFIX)
|
84
|
+
#define TRLIB_DCOPY(...) { TRLIB_TIC(start) dcopy(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[1]) }
|
85
|
+
#define TRLIB_DAXPY(...) { TRLIB_TIC(start) daxpy(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[2]) }
|
86
|
+
#define TRLIB_DSCAL(...) { TRLIB_TIC(start) dscal(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[3]) }
|
87
|
+
#define TRLIB_DNRM2(A, X, Y, Z) { TRLIB_TIC(start) A = dnrm2(X, Y, Z); TRLIB_DURATION_SUB(start, end, timing[4]) }
|
88
|
+
#define TRLIB_DDOT(A, N, X, IX, Y, IY) { TRLIB_TIC(start) A = ddot(N, X, IX, Y, IY); TRLIB_DURATION_SUB(start, end, timing[5]) }
|
89
|
+
#define TRLIB_DPTTRF(...) { TRLIB_TIC(start) dpttrf(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[6]) }
|
90
|
+
#define TRLIB_DPTTRS(...) { TRLIB_TIC(start) dpttrs(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[7]) }
|
91
|
+
#define TRLIB_DPTRFS(...) { TRLIB_TIC(start) dptrfs(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[8]) }
|
92
|
+
#define TRLIB_DLAGTM(...) { TRLIB_TIC(start) dlagtm(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[9]) }
|
93
|
+
#else
|
94
|
+
#define TRLIB_DCOPY(...) { TRLIB_TIC(start) dcopy_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[1]) }
|
95
|
+
#define TRLIB_DAXPY(...) { TRLIB_TIC(start) daxpy_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[2]) }
|
96
|
+
#define TRLIB_DSCAL(...) { TRLIB_TIC(start) dscal_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[3]) }
|
97
|
+
#define TRLIB_DNRM2(A, X, Y, Z) { TRLIB_TIC(start) A = dnrm2_(X, Y, Z); TRLIB_DURATION_SUB(start, end, timing[4]) }
|
98
|
+
#define TRLIB_DDOT(A, N, X, IX, Y, IY) { TRLIB_TIC(start) A = ddot_(N, X, IX, Y, IY); TRLIB_DURATION_SUB(start, end, timing[5]) }
|
99
|
+
#define TRLIB_DPTTRF(...) { TRLIB_TIC(start) dpttrf_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[6]) }
|
100
|
+
#define TRLIB_DPTTRS(...) { TRLIB_TIC(start) dpttrs_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[7]) }
|
101
|
+
#define TRLIB_DPTRFS(...) { TRLIB_TIC(start) dptrfs_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[8]) }
|
102
|
+
#define TRLIB_DLAGTM(...) { TRLIB_TIC(start) dlagtm_(__VA_ARGS__); TRLIB_DURATION_SUB(start, end, timing[9]) }
|
103
|
+
#endif
|
104
|
+
#define TRLIB_PRINTLN_1(...) if (verbose > 0) { if (fout) { fprintf(fout, "%s", prefix); fprintf(fout, __VA_ARGS__); fprintf(fout, "\n"); } else { printf("%s", prefix); printf(__VA_ARGS__); printf("\n"); } }
|
105
|
+
#define TRLIB_PRINTLN_2(...) if (verbose > 1) { if (fout) { fprintf(fout, "%s", prefix); fprintf(fout, __VA_ARGS__); fprintf(fout, "\n"); } else { printf("%s", prefix); printf(__VA_ARGS__); printf("\n"); } }
|
106
|
+
|
107
|
+
#define TRLIB_PRINT_VEC(P, N, X) { for(int vc = 0; vc < N; ++vc) { printf("%s %ld: %e\n", P, vc, *(X+vc)); } }
|
108
|
+
|
109
|
+
#endif
|
@@ -0,0 +1,57 @@
|
|
1
|
+
/* MIT License
|
2
|
+
*
|
3
|
+
* Copyright (c) 2016--2017 Felix Lenders
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
13
|
+
* copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
* SOFTWARE.
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
|
25
|
+
#ifndef TRLIB_QUADRATIC_ZERO_H
|
26
|
+
#define TRLIB_QUADRATIC_ZERO_H
|
27
|
+
|
28
|
+
/** Computes real zeros of normalized quadratic polynomial.
|
29
|
+
*
|
30
|
+
* :param c_abs: absolute coefficient
|
31
|
+
* :type c_abs: trlib_flt_t, input
|
32
|
+
* :param c_lin: coefficinet of linear term
|
33
|
+
* :type c_lin: trlib_flt_t, input
|
34
|
+
* :param tol: tolerance that indicates if ill-conditioning present, good default may be :math:`\texttt{macheps}^{3/4}` (:c:macro:`TRLIB_EPS_POW_75`)
|
35
|
+
* :type tol: trlib_flt_t, input
|
36
|
+
* :param verbose: determines the verbosity level of output that is written to :c:data:`fout`
|
37
|
+
* :type verbose: trlib_int_t, input
|
38
|
+
* :param unicode: set to ``1`` if :c:data:`fout` can handle unicode, otherwise to ``0``
|
39
|
+
* :type unicode: trlib_int_t, input
|
40
|
+
* :param prefix: string that is printed before iteration output
|
41
|
+
* :type prefix: trlib_int_t, input
|
42
|
+
* :param fout: output stream
|
43
|
+
* :type fout: FILE, input
|
44
|
+
* :param t1: first zero, :math:`\texttt{t1} \le \texttt{t2}`
|
45
|
+
* :type t2: trlib_flt_t, output
|
46
|
+
* :param t2: second zero, :math:`\texttt{t1} \le \texttt{t2}`
|
47
|
+
* :type t2: trlib_flt_t, output
|
48
|
+
*
|
49
|
+
* :returns: number of zeros
|
50
|
+
* :rtype: trlib_int_t
|
51
|
+
*/
|
52
|
+
|
53
|
+
trlib_int_t trlib_quadratic_zero(trlib_flt_t c_abs, trlib_flt_t c_lin, trlib_flt_t tol,
|
54
|
+
trlib_int_t verbose, trlib_int_t unicode, char *prefix, FILE *fout,
|
55
|
+
trlib_flt_t *t1, trlib_flt_t *t2);
|
56
|
+
|
57
|
+
#endif
|