@lakutata/math 0.0.0-stage → 3.1.5
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.
- package/LICENSE +23 -0
- package/README.md +954 -2
- package/README.zh-CN.md +578 -0
- package/THIRD_PARTY_NOTICES.md +553 -0
- package/binding.gyp +89 -0
- package/dist/cjs/exceptions/MathArgumentException.d.ts +11 -0
- package/dist/cjs/exceptions/MathArgumentException.js +18 -0
- package/dist/cjs/exceptions/MathCancelledException.d.ts +10 -0
- package/dist/cjs/exceptions/MathCancelledException.js +17 -0
- package/dist/cjs/exceptions/MathDefinitionException.d.ts +11 -0
- package/dist/cjs/exceptions/MathDefinitionException.js +18 -0
- package/dist/cjs/exceptions/MathDivisionByZeroException.d.ts +10 -0
- package/dist/cjs/exceptions/MathDivisionByZeroException.js +17 -0
- package/dist/cjs/exceptions/MathDomainException.d.ts +11 -0
- package/dist/cjs/exceptions/MathDomainException.js +18 -0
- package/dist/cjs/exceptions/MathException.d.ts +19 -0
- package/dist/cjs/exceptions/MathException.js +22 -0
- package/dist/cjs/exceptions/MathNotSupportedException.d.ts +11 -0
- package/dist/cjs/exceptions/MathNotSupportedException.js +18 -0
- package/dist/cjs/exceptions/MathSyntaxException.d.ts +11 -0
- package/dist/cjs/exceptions/MathSyntaxException.js +18 -0
- package/dist/cjs/exceptions/MathTimeoutException.d.ts +10 -0
- package/dist/cjs/exceptions/MathTimeoutException.js +17 -0
- package/dist/cjs/exceptions/MathUnitException.d.ts +11 -0
- package/dist/cjs/exceptions/MathUnitException.js +18 -0
- package/dist/cjs/exceptions/MathUnknownFunctionException.d.ts +12 -0
- package/dist/cjs/exceptions/MathUnknownFunctionException.js +19 -0
- package/dist/cjs/exports/Math.d.ts +28 -0
- package/dist/cjs/exports/Math.js +84 -0
- package/dist/cjs/lib/Addon.d.ts +5 -0
- package/dist/cjs/lib/Addon.js +9 -0
- package/dist/cjs/lib/Context.d.ts +90 -0
- package/dist/cjs/lib/Context.js +134 -0
- package/dist/cjs/lib/Decimal.d.ts +276 -0
- package/dist/cjs/lib/Decimal.js +402 -0
- package/dist/cjs/lib/Defaults.d.ts +273 -0
- package/dist/cjs/lib/Defaults.js +308 -0
- package/dist/cjs/lib/Distribution.d.ts +177 -0
- package/dist/cjs/lib/Distribution.js +196 -0
- package/dist/cjs/lib/Expression.d.ts +791 -0
- package/dist/cjs/lib/Expression.js +991 -0
- package/dist/cjs/lib/ExpressionMatrix.d.ts +284 -0
- package/dist/cjs/lib/ExpressionMatrix.js +412 -0
- package/dist/cjs/lib/LinearAlgebra.d.ts +613 -0
- package/dist/cjs/lib/LinearAlgebra.js +712 -0
- package/dist/cjs/lib/MathScope.d.ts +268 -0
- package/dist/cjs/lib/MathScope.js +316 -0
- package/dist/cjs/lib/MathSet.d.ts +139 -0
- package/dist/cjs/lib/MathSet.js +376 -0
- package/dist/cjs/lib/Matrix.d.ts +212 -0
- package/dist/cjs/lib/Matrix.js +393 -0
- package/dist/cjs/lib/Native.d.ts +80 -0
- package/dist/cjs/lib/Native.js +61 -0
- package/dist/cjs/lib/NumberTheory.d.ts +356 -0
- package/dist/cjs/lib/NumberTheory.js +524 -0
- package/dist/cjs/lib/Numeric.d.ts +363 -0
- package/dist/cjs/lib/Numeric.js +243 -0
- package/dist/cjs/lib/Polynomials.d.ts +140 -0
- package/dist/cjs/lib/Polynomials.js +167 -0
- package/dist/cjs/lib/SparseMatrix.d.ts +125 -0
- package/dist/cjs/lib/SparseMatrix.js +341 -0
- package/dist/cjs/lib/Statistics.d.ts +366 -0
- package/dist/cjs/lib/Statistics.js +380 -0
- package/dist/cjs/lib/Unit.d.ts +342 -0
- package/dist/cjs/lib/Unit.js +1027 -0
- package/dist/cjs/lib/UnitTable.d.ts +39 -0
- package/dist/cjs/lib/UnitTable.js +634 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/exceptions/MathArgumentException.js +14 -0
- package/dist/esm/exceptions/MathCancelledException.js +13 -0
- package/dist/esm/exceptions/MathDefinitionException.js +14 -0
- package/dist/esm/exceptions/MathDivisionByZeroException.js +13 -0
- package/dist/esm/exceptions/MathDomainException.js +14 -0
- package/dist/esm/exceptions/MathException.js +18 -0
- package/dist/esm/exceptions/MathNotSupportedException.js +14 -0
- package/dist/esm/exceptions/MathSyntaxException.js +14 -0
- package/dist/esm/exceptions/MathTimeoutException.js +13 -0
- package/dist/esm/exceptions/MathUnitException.js +14 -0
- package/dist/esm/exceptions/MathUnknownFunctionException.js +15 -0
- package/dist/esm/exports/Math.js +26 -0
- package/dist/esm/lib/Addon.js +10 -0
- package/dist/esm/lib/Context.js +128 -0
- package/dist/esm/lib/Decimal.js +397 -0
- package/dist/esm/lib/Defaults.js +290 -0
- package/dist/esm/lib/Distribution.js +191 -0
- package/dist/esm/lib/Expression.js +979 -0
- package/dist/esm/lib/ExpressionMatrix.js +407 -0
- package/dist/esm/lib/LinearAlgebra.js +708 -0
- package/dist/esm/lib/MathScope.js +311 -0
- package/dist/esm/lib/MathSet.js +370 -0
- package/dist/esm/lib/Matrix.js +382 -0
- package/dist/esm/lib/Native.js +56 -0
- package/dist/esm/lib/NumberTheory.js +520 -0
- package/dist/esm/lib/Numeric.js +239 -0
- package/dist/esm/lib/Polynomials.js +163 -0
- package/dist/esm/lib/SparseMatrix.js +332 -0
- package/dist/esm/lib/Statistics.js +376 -0
- package/dist/esm/lib/Unit.js +1018 -0
- package/dist/esm/lib/UnitTable.js +631 -0
- package/dist/types/exceptions/MathArgumentException.d.ts +11 -0
- package/dist/types/exceptions/MathCancelledException.d.ts +10 -0
- package/dist/types/exceptions/MathDefinitionException.d.ts +11 -0
- package/dist/types/exceptions/MathDivisionByZeroException.d.ts +10 -0
- package/dist/types/exceptions/MathDomainException.d.ts +11 -0
- package/dist/types/exceptions/MathException.d.ts +19 -0
- package/dist/types/exceptions/MathNotSupportedException.d.ts +11 -0
- package/dist/types/exceptions/MathSyntaxException.d.ts +11 -0
- package/dist/types/exceptions/MathTimeoutException.d.ts +10 -0
- package/dist/types/exceptions/MathUnitException.d.ts +11 -0
- package/dist/types/exceptions/MathUnknownFunctionException.d.ts +12 -0
- package/dist/types/exports/Math.d.ts +28 -0
- package/dist/types/lib/Addon.d.ts +5 -0
- package/dist/types/lib/Context.d.ts +90 -0
- package/dist/types/lib/Decimal.d.ts +276 -0
- package/dist/types/lib/Defaults.d.ts +273 -0
- package/dist/types/lib/Distribution.d.ts +177 -0
- package/dist/types/lib/Expression.d.ts +791 -0
- package/dist/types/lib/ExpressionMatrix.d.ts +284 -0
- package/dist/types/lib/LinearAlgebra.d.ts +613 -0
- package/dist/types/lib/MathScope.d.ts +268 -0
- package/dist/types/lib/MathSet.d.ts +139 -0
- package/dist/types/lib/Matrix.d.ts +212 -0
- package/dist/types/lib/Native.d.ts +80 -0
- package/dist/types/lib/NumberTheory.d.ts +356 -0
- package/dist/types/lib/Numeric.d.ts +363 -0
- package/dist/types/lib/Polynomials.d.ts +140 -0
- package/dist/types/lib/SparseMatrix.d.ts +125 -0
- package/dist/types/lib/Statistics.d.ts +366 -0
- package/dist/types/lib/Unit.d.ts +342 -0
- package/dist/types/lib/UnitTable.d.ts +39 -0
- package/native/addon.cpp +1374 -0
- package/native/async/Pool.cpp +133 -0
- package/native/async/Pool.h +59 -0
- package/native/config/boost_math_policy.h +26 -0
- package/native/config/mpdecimal/mpdecimal.h +809 -0
- package/native/config/symengine/symengine_config.h +44 -0
- package/native/config/symengine/symengine_export.h +19 -0
- package/native/core/Errors.cpp +77 -0
- package/native/core/Errors.h +72 -0
- package/native/core/Handle.cpp +109 -0
- package/native/core/Handle.h +72 -0
- package/native/core/Scope.cpp +122 -0
- package/native/core/Scope.h +36 -0
- package/native/functions/Functions.cpp +468 -0
- package/native/functions/Functions.h +115 -0
- package/native/functions/Gosper.cpp +429 -0
- package/native/functions/Gosper.h +20 -0
- package/native/functions/SpecialIntegrals.cpp +329 -0
- package/native/functions/SpecialIntegrals.h +53 -0
- package/native/functions/Summation.cpp +645 -0
- package/native/functions/Summation.h +42 -0
- package/native/integrals/Integrals.cpp +1428 -0
- package/native/integrals/Integrals.h +32 -0
- package/native/limits/Gruntz.cpp +1332 -0
- package/native/limits/Gruntz.h +24 -0
- package/native/linalg/Decompositions.cpp +159 -0
- package/native/linalg/Functions.cpp +199 -0
- package/native/linalg/Linalg.cpp +123 -0
- package/native/linalg/Linalg.h +67 -0
- package/native/linalg/LinalgSupport.h +69 -0
- package/native/linalg/Sparse.cpp +172 -0
- package/native/matrix/Matrices.cpp +766 -0
- package/native/matrix/Matrices.h +74 -0
- package/native/ntheory/NumberTheory.cpp +754 -0
- package/native/ntheory/NumberTheory.h +56 -0
- package/native/numeric/Compiled.cpp +93 -0
- package/native/numeric/Compiled.h +49 -0
- package/native/numeric/Integrate.cpp +718 -0
- package/native/numeric/Numeric.h +95 -0
- package/native/numeric/ODE.cpp +542 -0
- package/native/numeric/Roots.cpp +402 -0
- package/native/ops/Decimal.cpp +776 -0
- package/native/ops/Decimal.h +182 -0
- package/native/ops/DecimalComplex.cpp +738 -0
- package/native/ops/DecimalEvaluator.h +79 -0
- package/native/ops/DecimalFunctions.cpp +439 -0
- package/native/ops/DecimalOperations.cpp +236 -0
- package/native/ops/DecimalSpecial.cpp +1028 -0
- package/native/ops/DecimalSupport.h +109 -0
- package/native/ops/Operations.cpp +969 -0
- package/native/ops/Operations.h +120 -0
- package/native/ops/Piecewise.cpp +195 -0
- package/native/ops/Piecewise.h +40 -0
- package/native/parser/Parser.cpp +853 -0
- package/native/parser/Parser.h +56 -0
- package/native/poly/Convert.cpp +210 -0
- package/native/poly/Convert.h +40 -0
- package/native/poly/Dense.cpp +1008 -0
- package/native/poly/Dense.h +136 -0
- package/native/poly/Euclid.cpp +446 -0
- package/native/poly/Euclid.h +44 -0
- package/native/poly/Factor.cpp +919 -0
- package/native/poly/Factor.h +36 -0
- package/native/poly/Galois.cpp +439 -0
- package/native/poly/Galois.h +86 -0
- package/native/poly/Inequalities.cpp +227 -0
- package/native/poly/Inequalities.h +21 -0
- package/native/poly/Poly.cpp +338 -0
- package/native/poly/Poly.h +46 -0
- package/native/poly/Rational.cpp +403 -0
- package/native/poly/Rational.h +33 -0
- package/native/poly/RealRoots.cpp +136 -0
- package/native/poly/RealRoots.h +35 -0
- package/native/printer/Printer.cpp +973 -0
- package/native/printer/Printer.h +23 -0
- package/native/simplify/Simplify.cpp +921 -0
- package/native/simplify/Simplify.h +21 -0
- package/native/stats/Distributions.cpp +392 -0
- package/native/stats/Distributions.h +33 -0
- package/native/stats/Statistics.cpp +255 -0
- package/native/stats/Statistics.h +25 -0
- package/package.json +85 -4
- package/scripts/sources.mjs +35 -0
- package/vendor/PATCHES.md +169 -0
- package/vendor/boost/config/README.md +43 -0
- package/vendor/boost/config/include/boost/config/abi/borland_prefix.hpp +27 -0
- package/vendor/boost/config/include/boost/config/abi/borland_suffix.hpp +12 -0
- package/vendor/boost/config/include/boost/config/abi/msvc_prefix.hpp +22 -0
- package/vendor/boost/config/include/boost/config/abi/msvc_suffix.hpp +8 -0
- package/vendor/boost/config/include/boost/config/abi_prefix.hpp +25 -0
- package/vendor/boost/config/include/boost/config/abi_suffix.hpp +25 -0
- package/vendor/boost/config/include/boost/config/assert_cxx03.hpp +211 -0
- package/vendor/boost/config/include/boost/config/assert_cxx11.hpp +212 -0
- package/vendor/boost/config/include/boost/config/assert_cxx14.hpp +47 -0
- package/vendor/boost/config/include/boost/config/assert_cxx17.hpp +65 -0
- package/vendor/boost/config/include/boost/config/assert_cxx20.hpp +59 -0
- package/vendor/boost/config/include/boost/config/assert_cxx23.hpp +41 -0
- package/vendor/boost/config/include/boost/config/assert_cxx98.hpp +23 -0
- package/vendor/boost/config/include/boost/config/auto_link.hpp +530 -0
- package/vendor/boost/config/include/boost/config/compiler/borland.hpp +342 -0
- package/vendor/boost/config/include/boost/config/compiler/clang.hpp +370 -0
- package/vendor/boost/config/include/boost/config/compiler/clang_version.hpp +98 -0
- package/vendor/boost/config/include/boost/config/compiler/codegear.hpp +389 -0
- package/vendor/boost/config/include/boost/config/compiler/comeau.hpp +59 -0
- package/vendor/boost/config/include/boost/config/compiler/common_edg.hpp +185 -0
- package/vendor/boost/config/include/boost/config/compiler/compaq_cxx.hpp +19 -0
- package/vendor/boost/config/include/boost/config/compiler/cray.hpp +446 -0
- package/vendor/boost/config/include/boost/config/compiler/diab.hpp +26 -0
- package/vendor/boost/config/include/boost/config/compiler/digitalmars.hpp +146 -0
- package/vendor/boost/config/include/boost/config/compiler/gcc.hpp +386 -0
- package/vendor/boost/config/include/boost/config/compiler/gcc_xml.hpp +115 -0
- package/vendor/boost/config/include/boost/config/compiler/greenhills.hpp +28 -0
- package/vendor/boost/config/include/boost/config/compiler/hp_acc.hpp +153 -0
- package/vendor/boost/config/include/boost/config/compiler/intel.hpp +577 -0
- package/vendor/boost/config/include/boost/config/compiler/kai.hpp +33 -0
- package/vendor/boost/config/include/boost/config/compiler/metrowerks.hpp +201 -0
- package/vendor/boost/config/include/boost/config/compiler/mpw.hpp +143 -0
- package/vendor/boost/config/include/boost/config/compiler/nvcc.hpp +64 -0
- package/vendor/boost/config/include/boost/config/compiler/pathscale.hpp +141 -0
- package/vendor/boost/config/include/boost/config/compiler/pgi.hpp +23 -0
- package/vendor/boost/config/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
- package/vendor/boost/config/include/boost/config/compiler/sunpro_cc.hpp +225 -0
- package/vendor/boost/config/include/boost/config/compiler/vacpp.hpp +189 -0
- package/vendor/boost/config/include/boost/config/compiler/visualc.hpp +400 -0
- package/vendor/boost/config/include/boost/config/compiler/xlcpp.hpp +303 -0
- package/vendor/boost/config/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
- package/vendor/boost/config/include/boost/config/detail/cxx_composite.hpp +218 -0
- package/vendor/boost/config/include/boost/config/detail/posix_features.hpp +95 -0
- package/vendor/boost/config/include/boost/config/detail/select_compiler_config.hpp +157 -0
- package/vendor/boost/config/include/boost/config/detail/select_platform_config.hpp +147 -0
- package/vendor/boost/config/include/boost/config/detail/select_stdlib_config.hpp +121 -0
- package/vendor/boost/config/include/boost/config/detail/suffix.hpp +1334 -0
- package/vendor/boost/config/include/boost/config/header_deprecated.hpp +26 -0
- package/vendor/boost/config/include/boost/config/helper_macros.hpp +37 -0
- package/vendor/boost/config/include/boost/config/no_tr1/cmath.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/complex.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/functional.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/memory.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/utility.hpp +28 -0
- package/vendor/boost/config/include/boost/config/platform/aix.hpp +33 -0
- package/vendor/boost/config/include/boost/config/platform/amigaos.hpp +15 -0
- package/vendor/boost/config/include/boost/config/platform/beos.hpp +26 -0
- package/vendor/boost/config/include/boost/config/platform/bsd.hpp +83 -0
- package/vendor/boost/config/include/boost/config/platform/cloudabi.hpp +18 -0
- package/vendor/boost/config/include/boost/config/platform/cray.hpp +18 -0
- package/vendor/boost/config/include/boost/config/platform/cygwin.hpp +71 -0
- package/vendor/boost/config/include/boost/config/platform/haiku.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/hpux.hpp +87 -0
- package/vendor/boost/config/include/boost/config/platform/irix.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/linux.hpp +106 -0
- package/vendor/boost/config/include/boost/config/platform/macos.hpp +87 -0
- package/vendor/boost/config/include/boost/config/platform/qnxnto.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/solaris.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/symbian.hpp +97 -0
- package/vendor/boost/config/include/boost/config/platform/vms.hpp +25 -0
- package/vendor/boost/config/include/boost/config/platform/vxworks.hpp +422 -0
- package/vendor/boost/config/include/boost/config/platform/wasm.hpp +23 -0
- package/vendor/boost/config/include/boost/config/platform/win32.hpp +90 -0
- package/vendor/boost/config/include/boost/config/platform/zos.hpp +32 -0
- package/vendor/boost/config/include/boost/config/pragma_message.hpp +31 -0
- package/vendor/boost/config/include/boost/config/requires_threads.hpp +92 -0
- package/vendor/boost/config/include/boost/config/stdlib/dinkumware.hpp +324 -0
- package/vendor/boost/config/include/boost/config/stdlib/libcomo.hpp +93 -0
- package/vendor/boost/config/include/boost/config/stdlib/libcpp.hpp +185 -0
- package/vendor/boost/config/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
- package/vendor/boost/config/include/boost/config/stdlib/modena.hpp +79 -0
- package/vendor/boost/config/include/boost/config/stdlib/msl.hpp +98 -0
- package/vendor/boost/config/include/boost/config/stdlib/roguewave.hpp +208 -0
- package/vendor/boost/config/include/boost/config/stdlib/sgi.hpp +168 -0
- package/vendor/boost/config/include/boost/config/stdlib/stlport.hpp +258 -0
- package/vendor/boost/config/include/boost/config/stdlib/vacpp.hpp +74 -0
- package/vendor/boost/config/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- package/vendor/boost/config/include/boost/config/user.hpp +133 -0
- package/vendor/boost/config/include/boost/config/warning_disable.hpp +47 -0
- package/vendor/boost/config/include/boost/config/workaround.hpp +310 -0
- package/vendor/boost/config/include/boost/config.hpp +67 -0
- package/vendor/boost/config/include/boost/cstdint.hpp +556 -0
- package/vendor/boost/config/include/boost/cxx11_char_types.hpp +70 -0
- package/vendor/boost/config/include/boost/detail/workaround.hpp +10 -0
- package/vendor/boost/config/include/boost/limits.hpp +146 -0
- package/vendor/boost/config/include/boost/static_assert.hpp +179 -0
- package/vendor/boost/config/include/boost/version.hpp +32 -0
- package/vendor/boost/math/LICENSE +23 -0
- package/vendor/boost/math/README.md +184 -0
- package/vendor/boost/math/include/boost/cstdfloat.hpp +58 -0
- package/vendor/boost/math/include/boost/math/bindings/detail/big_digamma.hpp +297 -0
- package/vendor/boost/math/include/boost/math/bindings/detail/big_lanczos.hpp +777 -0
- package/vendor/boost/math/include/boost/math/bindings/mpfr.hpp +974 -0
- package/vendor/boost/math/include/boost/math/bindings/mpreal.hpp +921 -0
- package/vendor/boost/math/include/boost/math/bindings/rr.hpp +876 -0
- package/vendor/boost/math/include/boost/math/ccmath/abs.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/ccmath.hpp +45 -0
- package/vendor/boost/math/include/boost/math/ccmath/ceil.hpp +78 -0
- package/vendor/boost/math/include/boost/math/ccmath/copysign.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/detail/config.hpp +52 -0
- package/vendor/boost/math/include/boost/math/ccmath/detail/swap.hpp +21 -0
- package/vendor/boost/math/include/boost/math/ccmath/div.hpp +86 -0
- package/vendor/boost/math/include/boost/math/ccmath/fabs.hpp +41 -0
- package/vendor/boost/math/include/boost/math/ccmath/fdim.hpp +93 -0
- package/vendor/boost/math/include/boost/math/ccmath/floor.hpp +131 -0
- package/vendor/boost/math/include/boost/math/ccmath/fma.hpp +130 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmax.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmin.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmod.hpp +114 -0
- package/vendor/boost/math/include/boost/math/ccmath/fpclassify.hpp +48 -0
- package/vendor/boost/math/include/boost/math/ccmath/frexp.hpp +101 -0
- package/vendor/boost/math/include/boost/math/ccmath/hypot.hpp +116 -0
- package/vendor/boost/math/include/boost/math/ccmath/ilogb.hpp +60 -0
- package/vendor/boost/math/include/boost/math/ccmath/isfinite.hpp +53 -0
- package/vendor/boost/math/include/boost/math/ccmath/isgreater.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isgreaterequal.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isinf.hpp +61 -0
- package/vendor/boost/math/include/boost/math/ccmath/isless.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/islessequal.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isnan.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isnormal.hpp +47 -0
- package/vendor/boost/math/include/boost/math/ccmath/isunordered.hpp +35 -0
- package/vendor/boost/math/include/boost/math/ccmath/ldexp.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/logb.hpp +86 -0
- package/vendor/boost/math/include/boost/math/ccmath/modf.hpp +79 -0
- package/vendor/boost/math/include/boost/math/ccmath/next.hpp +458 -0
- package/vendor/boost/math/include/boost/math/ccmath/remainder.hpp +106 -0
- package/vendor/boost/math/include/boost/math/ccmath/round.hpp +179 -0
- package/vendor/boost/math/include/boost/math/ccmath/scalbln.hpp +60 -0
- package/vendor/boost/math/include/boost/math/ccmath/scalbn.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/signbit.hpp +218 -0
- package/vendor/boost/math/include/boost/math/ccmath/sqrt.hpp +80 -0
- package/vendor/boost/math/include/boost/math/ccmath/trunc.hpp +70 -0
- package/vendor/boost/math/include/boost/math/common_factor.hpp +23 -0
- package/vendor/boost/math/include/boost/math/common_factor_ct.hpp +34 -0
- package/vendor/boost/math/include/boost/math/common_factor_rt.hpp +30 -0
- package/vendor/boost/math/include/boost/math/complex/acos.hpp +245 -0
- package/vendor/boost/math/include/boost/math/complex/acosh.hpp +34 -0
- package/vendor/boost/math/include/boost/math/complex/asin.hpp +252 -0
- package/vendor/boost/math/include/boost/math/complex/asinh.hpp +32 -0
- package/vendor/boost/math/include/boost/math/complex/atan.hpp +36 -0
- package/vendor/boost/math/include/boost/math/complex/atanh.hpp +214 -0
- package/vendor/boost/math/include/boost/math/complex/details.hpp +68 -0
- package/vendor/boost/math/include/boost/math/complex/fabs.hpp +23 -0
- package/vendor/boost/math/include/boost/math/complex.hpp +32 -0
- package/vendor/boost/math/include/boost/math/concepts/distributions.hpp +497 -0
- package/vendor/boost/math/include/boost/math/concepts/real_concept.hpp +400 -0
- package/vendor/boost/math/include/boost/math/concepts/real_type_concept.hpp +119 -0
- package/vendor/boost/math/include/boost/math/concepts/std_real_concept.hpp +427 -0
- package/vendor/boost/math/include/boost/math/constants/calculate_constants.hpp +1117 -0
- package/vendor/boost/math/include/boost/math/constants/constants.hpp +360 -0
- package/vendor/boost/math/include/boost/math/constants/info.hpp +169 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_cmath.hpp +1012 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex.hpp +38 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp +813 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_iostream.hpp +822 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_limits.hpp +87 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_types.hpp +441 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff.hpp +2061 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff_cpp11.hpp +387 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff_reverse.hpp +811 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_operator_expressions.hpp +276 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_et.hpp +160 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_no_et.hpp +154 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_comparison_operator_overloads.hpp +167 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_erf_overloads.hpp +234 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_expression_template_base.hpp +258 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_helper_functions.hpp +18 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_memory_management.hpp +462 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_et.hpp +275 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_expressions.hpp +852 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_no_et.hpp +266 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_utilities.hpp +51 -0
- package/vendor/boost/math/include/boost/math/differentiation/finite_difference.hpp +266 -0
- package/vendor/boost/math/include/boost/math/differentiation/lanczos_smoothing.hpp +591 -0
- package/vendor/boost/math/include/boost/math/distributions/arcsine.hpp +593 -0
- package/vendor/boost/math/include/boost/math/distributions/bernoulli.hpp +349 -0
- package/vendor/boost/math/include/boost/math/distributions/beta.hpp +584 -0
- package/vendor/boost/math/include/boost/math/distributions/binomial.hpp +729 -0
- package/vendor/boost/math/include/boost/math/distributions/cauchy.hpp +379 -0
- package/vendor/boost/math/include/boost/math/distributions/chi_squared.hpp +345 -0
- package/vendor/boost/math/include/boost/math/distributions/complement.hpp +198 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/common_error_handling.hpp +228 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/derived_accessors.hpp +190 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/generic_mode.hpp +145 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/generic_quantile.hpp +100 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_cdf.hpp +101 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_pdf.hpp +490 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_quantile.hpp +245 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +583 -0
- package/vendor/boost/math/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp +73 -0
- package/vendor/boost/math/include/boost/math/distributions/exponential.hpp +352 -0
- package/vendor/boost/math/include/boost/math/distributions/extreme_value.hpp +388 -0
- package/vendor/boost/math/include/boost/math/distributions/find_location.hpp +141 -0
- package/vendor/boost/math/include/boost/math/distributions/find_scale.hpp +200 -0
- package/vendor/boost/math/include/boost/math/distributions/fisher_f.hpp +393 -0
- package/vendor/boost/math/include/boost/math/distributions/fwd.hpp +171 -0
- package/vendor/boost/math/include/boost/math/distributions/gamma.hpp +396 -0
- package/vendor/boost/math/include/boost/math/distributions/geometric.hpp +571 -0
- package/vendor/boost/math/include/boost/math/distributions/holtsmark.hpp +2518 -0
- package/vendor/boost/math/include/boost/math/distributions/hyperexponential.hpp +641 -0
- package/vendor/boost/math/include/boost/math/distributions/hypergeometric.hpp +313 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_chi_squared.hpp +398 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_gamma.hpp +504 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_gaussian.hpp +566 -0
- package/vendor/boost/math/include/boost/math/distributions/kolmogorov_smirnov.hpp +511 -0
- package/vendor/boost/math/include/boost/math/distributions/landau.hpp +4642 -0
- package/vendor/boost/math/include/boost/math/distributions/laplace.hpp +494 -0
- package/vendor/boost/math/include/boost/math/distributions/logistic.hpp +377 -0
- package/vendor/boost/math/include/boost/math/distributions/lognormal.hpp +361 -0
- package/vendor/boost/math/include/boost/math/distributions/mapairy.hpp +4220 -0
- package/vendor/boost/math/include/boost/math/distributions/negative_binomial.hpp +609 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_beta.hpp +981 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_chi_squared.hpp +998 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_f.hpp +712 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_t.hpp +1324 -0
- package/vendor/boost/math/include/boost/math/distributions/normal.hpp +368 -0
- package/vendor/boost/math/include/boost/math/distributions/pareto.hpp +508 -0
- package/vendor/boost/math/include/boost/math/distributions/poisson.hpp +563 -0
- package/vendor/boost/math/include/boost/math/distributions/rayleigh.hpp +381 -0
- package/vendor/boost/math/include/boost/math/distributions/saspoint5.hpp +2796 -0
- package/vendor/boost/math/include/boost/math/distributions/skew_normal.hpp +760 -0
- package/vendor/boost/math/include/boost/math/distributions/students_t.hpp +721 -0
- package/vendor/boost/math/include/boost/math/distributions/triangular.hpp +548 -0
- package/vendor/boost/math/include/boost/math/distributions/uniform.hpp +398 -0
- package/vendor/boost/math/include/boost/math/distributions/weibull.hpp +487 -0
- package/vendor/boost/math/include/boost/math/distributions.hpp +58 -0
- package/vendor/boost/math/include/boost/math/filters/daubechies.hpp +99 -0
- package/vendor/boost/math/include/boost/math/interpolators/barycentric_rational.hpp +99 -0
- package/vendor/boost/math/include/boost/math/interpolators/bezier_polynomial.hpp +60 -0
- package/vendor/boost/math/include/boost/math/interpolators/bilinear_uniform.hpp +54 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_cubic_b_spline.hpp +87 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_quadratic_b_spline.hpp +57 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_quintic_b_spline.hpp +62 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_trigonometric.hpp +58 -0
- package/vendor/boost/math/include/boost/math/interpolators/catmull_rom.hpp +310 -0
- package/vendor/boost/math/include/boost/math/interpolators/cubic_b_spline.hpp +90 -0
- package/vendor/boost/math/include/boost/math/interpolators/cubic_hermite.hpp +142 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp +215 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/bezier_polynomial_detail.hpp +167 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/bilinear_uniform_detail.hpp +137 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_cubic_b_spline_detail.hpp +331 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quadratic_b_spline_detail.hpp +208 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quintic_b_spline_detail.hpp +241 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp +684 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_b_spline_detail.hpp +330 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp +439 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp +586 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/septic_hermite_detail.hpp +653 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp +196 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp +128 -0
- package/vendor/boost/math/include/boost/math/interpolators/makima.hpp +178 -0
- package/vendor/boost/math/include/boost/math/interpolators/pchip.hpp +136 -0
- package/vendor/boost/math/include/boost/math/interpolators/quintic_hermite.hpp +143 -0
- package/vendor/boost/math/include/boost/math/interpolators/septic_hermite.hpp +147 -0
- package/vendor/boost/math/include/boost/math/interpolators/vector_barycentric_rational.hpp +82 -0
- package/vendor/boost/math/include/boost/math/interpolators/whittaker_shannon.hpp +47 -0
- package/vendor/boost/math/include/boost/math/octonion.hpp +4254 -0
- package/vendor/boost/math/include/boost/math/optimization/cma_es.hpp +392 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/common.hpp +200 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/differentiable_opt_utilties.hpp +157 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/gradient_opt_base.hpp +92 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/line_search_policies.hpp +206 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/rdiff_optimization_policies.hpp +134 -0
- package/vendor/boost/math/include/boost/math/optimization/differential_evolution.hpp +236 -0
- package/vendor/boost/math/include/boost/math/optimization/gradient_descent.hpp +202 -0
- package/vendor/boost/math/include/boost/math/optimization/gradient_optimizers.hpp +18 -0
- package/vendor/boost/math/include/boost/math/optimization/jso.hpp +465 -0
- package/vendor/boost/math/include/boost/math/optimization/lbfgs.hpp +382 -0
- package/vendor/boost/math/include/boost/math/optimization/minimizer.hpp +336 -0
- package/vendor/boost/math/include/boost/math/optimization/nesterov.hpp +208 -0
- package/vendor/boost/math/include/boost/math/optimization/random_search.hpp +145 -0
- package/vendor/boost/math/include/boost/math/policies/error_handling.hpp +1062 -0
- package/vendor/boost/math/include/boost/math/policies/policy.hpp +1034 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/exp_sinh_detail.hpp +2002 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/ooura_fourier_integrals_detail.hpp +692 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/sinh_sinh_detail.hpp +1353 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/tanh_sinh_detail.hpp +879 -0
- package/vendor/boost/math/include/boost/math/quadrature/exp_sinh.hpp +180 -0
- package/vendor/boost/math/include/boost/math/quadrature/gauss.hpp +904 -0
- package/vendor/boost/math/include/boost/math/quadrature/gauss_kronrod.hpp +1317 -0
- package/vendor/boost/math/include/boost/math/quadrature/naive_monte_carlo.hpp +469 -0
- package/vendor/boost/math/include/boost/math/quadrature/ooura_fourier_integrals.hpp +68 -0
- package/vendor/boost/math/include/boost/math/quadrature/sinh_sinh.hpp +72 -0
- package/vendor/boost/math/include/boost/math/quadrature/tanh_sinh.hpp +289 -0
- package/vendor/boost/math/include/boost/math/quadrature/trapezoidal.hpp +125 -0
- package/vendor/boost/math/include/boost/math/quadrature/wavelet_transforms.hpp +47 -0
- package/vendor/boost/math/include/boost/math/quaternion.hpp +1190 -0
- package/vendor/boost/math/include/boost/math/special_functions/acosh.hpp +102 -0
- package/vendor/boost/math/include/boost/math/special_functions/airy.hpp +475 -0
- package/vendor/boost/math/include/boost/math/special_functions/asinh.hpp +110 -0
- package/vendor/boost/math/include/boost/math/special_functions/atanh.hpp +116 -0
- package/vendor/boost/math/include/boost/math/special_functions/bernoulli.hpp +149 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel.hpp +795 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel_iterators.hpp +187 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel_prime.hpp +343 -0
- package/vendor/boost/math/include/boost/math/special_functions/beta.hpp +1870 -0
- package/vendor/boost/math/include/boost/math/special_functions/binomial.hpp +87 -0
- package/vendor/boost/math/include/boost/math/special_functions/cardinal_b_spline.hpp +218 -0
- package/vendor/boost/math/include/boost/math/special_functions/cbrt.hpp +215 -0
- package/vendor/boost/math/include/boost/math/special_functions/chebyshev.hpp +314 -0
- package/vendor/boost/math/include/boost/math/special_functions/chebyshev_transform.hpp +237 -0
- package/vendor/boost/math/include/boost/math/special_functions/cos_pi.hpp +128 -0
- package/vendor/boost/math/include/boost/math/special_functions/daubechies_scaling.hpp +491 -0
- package/vendor/boost/math/include/boost/math/special_functions/daubechies_wavelet.hpp +266 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/airy_ai_bi_zero.hpp +222 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bernoulli_details.hpp +629 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_derivatives_linear.hpp +107 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i0.hpp +550 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i1.hpp +556 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_ik.hpp +447 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j0.hpp +192 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j1.hpp +179 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jn.hpp +127 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy.hpp +603 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_asym.hpp +230 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_asym.hpp +141 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp +219 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_series.hpp +267 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_zero.hpp +643 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k0.hpp +485 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k1.hpp +526 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_kn.hpp +91 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y0.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y1.hpp +183 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_yn.hpp +113 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/daubechies_scaling_integer_grid.hpp +244 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/erf_inv.hpp +559 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/fp_traits.hpp +562 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/gamma_inva.hpp +241 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_0F1_bessel.hpp +46 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp +293 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp +768 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp +678 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp +50 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_a.hpp +35 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp +492 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_negative_b_regions.hpp +521 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp +522 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_scaled_series.hpp +60 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp +70 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_asym.hpp +179 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_cf.hpp +228 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp +687 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pade.hpp +131 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_rational.hpp +167 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp +50 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_series.hpp +434 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp +331 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inverse.hpp +1122 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/iconv.hpp +43 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_inverse.hpp +587 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_large.hpp +823 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lambert_w_lookup_table.ipp +162 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lanczos_sse2.hpp +238 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lgamma_small.hpp +569 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/polygamma.hpp +538 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/round_fwd.hpp +87 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/t_distribution_inv.hpp +567 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp +1305 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_factorial.hpp +1727 -0
- package/vendor/boost/math/include/boost/math/special_functions/digamma.hpp +631 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_1.hpp +815 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_2.hpp +756 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_3.hpp +374 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_d.hpp +183 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rc.hpp +112 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rd.hpp +207 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rf.hpp +169 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rg.hpp +130 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rj.hpp +299 -0
- package/vendor/boost/math/include/boost/math/special_functions/erf.hpp +1334 -0
- package/vendor/boost/math/include/boost/math/special_functions/expint.hpp +1614 -0
- package/vendor/boost/math/include/boost/math/special_functions/expm1.hpp +416 -0
- package/vendor/boost/math/include/boost/math/special_functions/factorials.hpp +276 -0
- package/vendor/boost/math/include/boost/math/special_functions/fibonacci.hpp +92 -0
- package/vendor/boost/math/include/boost/math/special_functions/fourier_transform_daubechies.hpp +248 -0
- package/vendor/boost/math/include/boost/math/special_functions/fpclassify.hpp +797 -0
- package/vendor/boost/math/include/boost/math/special_functions/gamma.hpp +2628 -0
- package/vendor/boost/math/include/boost/math/special_functions/gegenbauer.hpp +84 -0
- package/vendor/boost/math/include/boost/math/special_functions/hankel.hpp +186 -0
- package/vendor/boost/math/include/boost/math/special_functions/hermite.hpp +79 -0
- package/vendor/boost/math/include/boost/math/special_functions/heuman_lambda.hpp +97 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_0F1.hpp +116 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F0.hpp +69 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F1.hpp +822 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_2F0.hpp +163 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_pFq.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypot.hpp +148 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi.hpp +69 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_elliptic.hpp +319 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_theta.hpp +802 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_zeta.hpp +83 -0
- package/vendor/boost/math/include/boost/math/special_functions/laguerre.hpp +139 -0
- package/vendor/boost/math/include/boost/math/special_functions/lambert_w.hpp +2171 -0
- package/vendor/boost/math/include/boost/math/special_functions/lanczos.hpp +2760 -0
- package/vendor/boost/math/include/boost/math/special_functions/legendre.hpp +380 -0
- package/vendor/boost/math/include/boost/math/special_functions/legendre_stieltjes.hpp +234 -0
- package/vendor/boost/math/include/boost/math/special_functions/log1p.hpp +417 -0
- package/vendor/boost/math/include/boost/math/special_functions/logaddexp.hpp +41 -0
- package/vendor/boost/math/include/boost/math/special_functions/logistic_sigmoid.hpp +46 -0
- package/vendor/boost/math/include/boost/math/special_functions/logit.hpp +56 -0
- package/vendor/boost/math/include/boost/math/special_functions/logsumexp.hpp +60 -0
- package/vendor/boost/math/include/boost/math/special_functions/math_fwd.hpp +1927 -0
- package/vendor/boost/math/include/boost/math/special_functions/modf.hpp +74 -0
- package/vendor/boost/math/include/boost/math/special_functions/next.hpp +886 -0
- package/vendor/boost/math/include/boost/math/special_functions/nonfinite_num_facets.hpp +588 -0
- package/vendor/boost/math/include/boost/math/special_functions/owens_t.hpp +1067 -0
- package/vendor/boost/math/include/boost/math/special_functions/polygamma.hpp +83 -0
- package/vendor/boost/math/include/boost/math/special_functions/pow.hpp +144 -0
- package/vendor/boost/math/include/boost/math/special_functions/powm1.hpp +101 -0
- package/vendor/boost/math/include/boost/math/special_functions/prime.hpp +2433 -0
- package/vendor/boost/math/include/boost/math/special_functions/relative_difference.hpp +134 -0
- package/vendor/boost/math/include/boost/math/special_functions/round.hpp +353 -0
- package/vendor/boost/math/include/boost/math/special_functions/rsqrt.hpp +52 -0
- package/vendor/boost/math/include/boost/math/special_functions/sign.hpp +241 -0
- package/vendor/boost/math/include/boost/math/special_functions/sin_pi.hpp +135 -0
- package/vendor/boost/math/include/boost/math/special_functions/sinc.hpp +123 -0
- package/vendor/boost/math/include/boost/math/special_functions/sinhc.hpp +142 -0
- package/vendor/boost/math/include/boost/math/special_functions/spherical_harmonic.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/sqrt1pm1.hpp +49 -0
- package/vendor/boost/math/include/boost/math/special_functions/trigamma.hpp +448 -0
- package/vendor/boost/math/include/boost/math/special_functions/trunc.hpp +385 -0
- package/vendor/boost/math/include/boost/math/special_functions/ulp.hpp +102 -0
- package/vendor/boost/math/include/boost/math/special_functions/zeta.hpp +1081 -0
- package/vendor/boost/math/include/boost/math/special_functions.hpp +86 -0
- package/vendor/boost/math/include/boost/math/statistics/anderson_darling.hpp +112 -0
- package/vendor/boost/math/include/boost/math/statistics/bivariate_statistics.hpp +470 -0
- package/vendor/boost/math/include/boost/math/statistics/chatterjee_correlation.hpp +159 -0
- package/vendor/boost/math/include/boost/math/statistics/detail/rank.hpp +140 -0
- package/vendor/boost/math/include/boost/math/statistics/detail/single_pass.hpp +401 -0
- package/vendor/boost/math/include/boost/math/statistics/linear_regression.hpp +133 -0
- package/vendor/boost/math/include/boost/math/statistics/ljung_box.hpp +70 -0
- package/vendor/boost/math/include/boost/math/statistics/runs_test.hpp +121 -0
- package/vendor/boost/math/include/boost/math/statistics/signal_statistics.hpp +350 -0
- package/vendor/boost/math/include/boost/math/statistics/t_test.hpp +275 -0
- package/vendor/boost/math/include/boost/math/statistics/univariate_statistics.hpp +1184 -0
- package/vendor/boost/math/include/boost/math/statistics/z_test.hpp +161 -0
- package/vendor/boost/math/include/boost/math/tools/agm.hpp +47 -0
- package/vendor/boost/math/include/boost/math/tools/array.hpp +41 -0
- package/vendor/boost/math/include/boost/math/tools/assert.hpp +49 -0
- package/vendor/boost/math/include/boost/math/tools/atomic.hpp +50 -0
- package/vendor/boost/math/include/boost/math/tools/big_constant.hpp +110 -0
- package/vendor/boost/math/include/boost/math/tools/bivariate_statistics.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/centered_continued_fraction.hpp +173 -0
- package/vendor/boost/math/include/boost/math/tools/cohen_acceleration.hpp +51 -0
- package/vendor/boost/math/include/boost/math/tools/color_maps.hpp +1943 -0
- package/vendor/boost/math/include/boost/math/tools/complex.hpp +115 -0
- package/vendor/boost/math/include/boost/math/tools/concepts.hpp +24 -0
- package/vendor/boost/math/include/boost/math/tools/condition_numbers.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/config.hpp +856 -0
- package/vendor/boost/math/include/boost/math/tools/convert_from_string.hpp +85 -0
- package/vendor/boost/math/include/boost/math/tools/cstdint.hpp +107 -0
- package/vendor/boost/math/include/boost/math/tools/cubic_roots.hpp +198 -0
- package/vendor/boost/math/include/boost/math/tools/cxx03_warn.hpp +95 -0
- package/vendor/boost/math/include/boost/math/tools/detail/is_const_iterable.hpp +38 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_10.hpp +84 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_11.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_12.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_13.hpp +102 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_14.hpp +108 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_15.hpp +114 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_16.hpp +120 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_17.hpp +126 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_18.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_19.hpp +138 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_2.hpp +36 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_20.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_3.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_5.hpp +54 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_6.hpp +60 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_7.hpp +66 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_8.hpp +72 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_9.hpp +78 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_10.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_11.hpp +97 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_12.hpp +104 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_13.hpp +111 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_14.hpp +118 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_15.hpp +125 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_16.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_17.hpp +139 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_18.hpp +146 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_19.hpp +153 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_20.hpp +160 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_5.hpp +55 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_6.hpp +62 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_7.hpp +69 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_8.hpp +76 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_9.hpp +83 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_10.hpp +156 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_11.hpp +181 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_12.hpp +208 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_13.hpp +237 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_14.hpp +268 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_15.hpp +301 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_16.hpp +336 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_17.hpp +373 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_18.hpp +412 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_19.hpp +453 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_20.hpp +496 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_5.hpp +61 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_6.hpp +76 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_7.hpp +93 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_8.hpp +112 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_9.hpp +133 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_10.hpp +138 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_11.hpp +150 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_12.hpp +162 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_13.hpp +174 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_14.hpp +186 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_15.hpp +198 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_16.hpp +210 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_17.hpp +222 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_18.hpp +234 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_19.hpp +246 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_2.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_20.hpp +258 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_3.hpp +54 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_4.hpp +66 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_5.hpp +78 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_6.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_7.hpp +102 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_8.hpp +114 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_9.hpp +126 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_10.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_11.hpp +160 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_12.hpp +176 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_13.hpp +192 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_14.hpp +208 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_15.hpp +224 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_16.hpp +240 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_17.hpp +256 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_18.hpp +272 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_19.hpp +288 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_20.hpp +304 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_5.hpp +64 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_6.hpp +80 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_7.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_8.hpp +112 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_9.hpp +128 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_10.hpp +396 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_11.hpp +482 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_12.hpp +576 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_13.hpp +678 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_14.hpp +788 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_15.hpp +906 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_16.hpp +1032 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_17.hpp +1166 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_18.hpp +1308 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_19.hpp +1458 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_20.hpp +1616 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_5.hpp +86 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_6.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_7.hpp +186 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_8.hpp +248 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_9.hpp +318 -0
- package/vendor/boost/math/include/boost/math/tools/engel_expansion.hpp +124 -0
- package/vendor/boost/math/include/boost/math/tools/estrin.hpp +72 -0
- package/vendor/boost/math/include/boost/math/tools/fraction.hpp +354 -0
- package/vendor/boost/math/include/boost/math/tools/header_deprecated.hpp +27 -0
- package/vendor/boost/math/include/boost/math/tools/is_constant_evaluated.hpp +51 -0
- package/vendor/boost/math/include/boost/math/tools/is_detected.hpp +56 -0
- package/vendor/boost/math/include/boost/math/tools/is_standalone.hpp +18 -0
- package/vendor/boost/math/include/boost/math/tools/luroth_expansion.hpp +147 -0
- package/vendor/boost/math/include/boost/math/tools/minima.hpp +164 -0
- package/vendor/boost/math/include/boost/math/tools/mp.hpp +423 -0
- package/vendor/boost/math/include/boost/math/tools/norms.hpp +638 -0
- package/vendor/boost/math/include/boost/math/tools/nothrow.hpp +27 -0
- package/vendor/boost/math/include/boost/math/tools/numeric_limits.hpp +888 -0
- package/vendor/boost/math/include/boost/math/tools/numerical_differentiation.hpp +12 -0
- package/vendor/boost/math/include/boost/math/tools/polynomial.hpp +862 -0
- package/vendor/boost/math/include/boost/math/tools/polynomial_gcd.hpp +268 -0
- package/vendor/boost/math/include/boost/math/tools/precision.hpp +418 -0
- package/vendor/boost/math/include/boost/math/tools/promotion.hpp +135 -0
- package/vendor/boost/math/include/boost/math/tools/quartic_roots.hpp +157 -0
- package/vendor/boost/math/include/boost/math/tools/random_vector.hpp +101 -0
- package/vendor/boost/math/include/boost/math/tools/rational.hpp +346 -0
- package/vendor/boost/math/include/boost/math/tools/real_cast.hpp +31 -0
- package/vendor/boost/math/include/boost/math/tools/recurrence.hpp +330 -0
- package/vendor/boost/math/include/boost/math/tools/roots.hpp +1072 -0
- package/vendor/boost/math/include/boost/math/tools/series.hpp +221 -0
- package/vendor/boost/math/include/boost/math/tools/signal_statistics.hpp +353 -0
- package/vendor/boost/math/include/boost/math/tools/simple_continued_fraction.hpp +177 -0
- package/vendor/boost/math/include/boost/math/tools/stats.hpp +87 -0
- package/vendor/boost/math/include/boost/math/tools/test_value.hpp +143 -0
- package/vendor/boost/math/include/boost/math/tools/throw_exception.hpp +43 -0
- package/vendor/boost/math/include/boost/math/tools/toms748_solve.hpp +636 -0
- package/vendor/boost/math/include/boost/math/tools/traits.hpp +140 -0
- package/vendor/boost/math/include/boost/math/tools/tuple.hpp +88 -0
- package/vendor/boost/math/include/boost/math/tools/type_traits.hpp +489 -0
- package/vendor/boost/math/include/boost/math/tools/ulps_plot.hpp +598 -0
- package/vendor/boost/math/include/boost/math/tools/univariate_statistics.hpp +437 -0
- package/vendor/boost/math/include/boost/math/tools/user.hpp +105 -0
- package/vendor/boost/math/include/boost/math/tools/utility.hpp +69 -0
- package/vendor/boost/math/include/boost/math/tools/workaround.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tr1.hpp +1121 -0
- package/vendor/boost/math/include/boost/math/tr1_c_macros.ipp +810 -0
- package/vendor/boost/math/include/boost/math_fwd.hpp +42 -0
- package/vendor/boost/multiprecision/LICENSE +23 -0
- package/vendor/boost/multiprecision/README.md +168 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/borland_prefix.hpp +27 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/borland_suffix.hpp +12 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/msvc_prefix.hpp +22 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/msvc_suffix.hpp +8 -0
- package/vendor/boost/multiprecision/include/boost/config/abi_prefix.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/abi_suffix.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx03.hpp +211 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx11.hpp +212 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx14.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx17.hpp +65 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx20.hpp +59 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx23.hpp +41 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx98.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/auto_link.hpp +530 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/borland.hpp +342 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/clang.hpp +370 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/clang_version.hpp +98 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/codegear.hpp +389 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/comeau.hpp +59 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/common_edg.hpp +185 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/compaq_cxx.hpp +19 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/cray.hpp +446 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/diab.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/digitalmars.hpp +146 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/gcc.hpp +386 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/gcc_xml.hpp +115 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/greenhills.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/hp_acc.hpp +153 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/intel.hpp +577 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/kai.hpp +33 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/metrowerks.hpp +201 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/mpw.hpp +143 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/nvcc.hpp +64 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/pathscale.hpp +141 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/pgi.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/sunpro_cc.hpp +225 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/vacpp.hpp +189 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/visualc.hpp +400 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp.hpp +303 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/cxx_composite.hpp +218 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/posix_features.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_compiler_config.hpp +157 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_platform_config.hpp +147 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_stdlib_config.hpp +121 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/suffix.hpp +1334 -0
- package/vendor/boost/multiprecision/include/boost/config/header_deprecated.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/helper_macros.hpp +37 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/cmath.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/complex.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/functional.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/memory.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/utility.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/aix.hpp +33 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/amigaos.hpp +15 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/beos.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/bsd.hpp +83 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cloudabi.hpp +18 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cray.hpp +18 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cygwin.hpp +71 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/haiku.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/hpux.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/irix.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/linux.hpp +106 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/macos.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/qnxnto.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/solaris.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/symbian.hpp +97 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/vms.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/vxworks.hpp +422 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/wasm.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/win32.hpp +90 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/zos.hpp +32 -0
- package/vendor/boost/multiprecision/include/boost/config/pragma_message.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/requires_threads.hpp +92 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/dinkumware.hpp +324 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libcomo.hpp +93 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libcpp.hpp +185 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/modena.hpp +79 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/msl.hpp +98 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/roguewave.hpp +208 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/sgi.hpp +168 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/stlport.hpp +258 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/vacpp.hpp +74 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- package/vendor/boost/multiprecision/include/boost/config/user.hpp +133 -0
- package/vendor/boost/multiprecision/include/boost/config/warning_disable.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/config/workaround.hpp +310 -0
- package/vendor/boost/multiprecision/include/boost/config.hpp +67 -0
- package/vendor/boost/multiprecision/include/boost/cstdint.hpp +556 -0
- package/vendor/boost/multiprecision/include/boost/cxx11_char_types.hpp +70 -0
- package/vendor/boost/multiprecision/include/boost/detail/workaround.hpp +10 -0
- package/vendor/boost/multiprecision/include/boost/limits.hpp +146 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/complex128.hpp +24 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/complex_adaptor.hpp +1049 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/io.hpp +700 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float.hpp +2374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_complex.hpp +12 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_dec_float.hpp +3807 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp +177 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fabs.hpp +27 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_floor.hpp +116 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fma.hpp +65 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fpclassify.hpp +52 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_frexp.hpp +93 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isinf.hpp +24 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isnan.hpp +21 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_ldexp.hpp +71 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp +218 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_log.hpp +172 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_sqrt.hpp +57 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_constants.hpp +80 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_double_fp.hpp +2690 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add.hpp +368 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/bitwise.hpp +896 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/checked.hpp +178 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/comparison.hpp +374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/divide.hpp +703 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/import_export.hpp +248 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/limits.hpp +292 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/literals.hpp +296 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/misc.hpp +1462 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/multiply.hpp +848 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/serialize.hpp +209 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int.hpp +2360 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/debug_adaptor.hpp +760 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/assert.hpp +29 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/atomic.hpp +62 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/bitscan.hpp +317 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/constexpr.hpp +88 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/default_ops.hpp +4077 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/digits.hpp +49 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/dynamic_array.hpp +44 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/empty_value.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/endian.hpp +35 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/et_ops.hpp +1831 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float128_functions.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/fpclassify.hpp +101 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/constants.hpp +289 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/pow.hpp +941 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trig.hpp +1064 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trunc.hpp +82 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/hash.hpp +56 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/integer_ops.hpp +474 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/itos.hpp +39 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/min_max.hpp +106 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_et_ops.hpp +661 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_base.hpp +1656 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_compare.hpp +848 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/precision.hpp +313 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/rebind.hpp +19 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/standalone_config.hpp +165 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/static_array.hpp +42 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/string_helpers.hpp +48 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/tables.hpp +80 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/ublas_interop.hpp +75 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/utype_helper.hpp +374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/eigen.hpp +248 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/float128.hpp +960 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/fwd.hpp +268 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/gmp.hpp +4100 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/integer.hpp +363 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/logged_adaptor.hpp +834 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/miller_rabin.hpp +221 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpc.hpp +1721 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpfi.hpp +2579 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpfr.hpp +3668 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/number.hpp +2491 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/random.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/rational_adaptor.hpp +1289 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/tommath.hpp +1044 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_backend.hpp +91 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_byte_container.hpp +51 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_complex.hpp +22 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/max_digits10.hpp +79 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/std_integer_traits.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
- package/vendor/boost/multiprecision/include/boost/static_assert.hpp +179 -0
- package/vendor/boost/multiprecision/include/boost/version.hpp +32 -0
- package/vendor/eigen/COPYING.APACHE +203 -0
- package/vendor/eigen/COPYING.BSD +26 -0
- package/vendor/eigen/COPYING.MPL2 +373 -0
- package/vendor/eigen/COPYING.README +6 -0
- package/vendor/eigen/Eigen/AccelerateSupport +52 -0
- package/vendor/eigen/Eigen/Cholesky +43 -0
- package/vendor/eigen/Eigen/CholmodSupport +48 -0
- package/vendor/eigen/Eigen/Core +451 -0
- package/vendor/eigen/Eigen/Dense +7 -0
- package/vendor/eigen/Eigen/Eigen +2 -0
- package/vendor/eigen/Eigen/Eigenvalues +63 -0
- package/vendor/eigen/Eigen/Geometry +59 -0
- package/vendor/eigen/Eigen/Householder +31 -0
- package/vendor/eigen/Eigen/IterativeLinearSolvers +52 -0
- package/vendor/eigen/Eigen/Jacobi +33 -0
- package/vendor/eigen/Eigen/KLUSupport +43 -0
- package/vendor/eigen/Eigen/LU +46 -0
- package/vendor/eigen/Eigen/MetisSupport +35 -0
- package/vendor/eigen/Eigen/OrderingMethods +73 -0
- package/vendor/eigen/Eigen/PaStiXSupport +51 -0
- package/vendor/eigen/Eigen/PardisoSupport +38 -0
- package/vendor/eigen/Eigen/QR +48 -0
- package/vendor/eigen/Eigen/QtAlignedMalloc +32 -0
- package/vendor/eigen/Eigen/SPQRSupport +41 -0
- package/vendor/eigen/Eigen/SVD +56 -0
- package/vendor/eigen/Eigen/Sparse +33 -0
- package/vendor/eigen/Eigen/SparseCholesky +40 -0
- package/vendor/eigen/Eigen/SparseCore +70 -0
- package/vendor/eigen/Eigen/SparseLU +50 -0
- package/vendor/eigen/Eigen/SparseQR +38 -0
- package/vendor/eigen/Eigen/StdDeque +30 -0
- package/vendor/eigen/Eigen/StdList +29 -0
- package/vendor/eigen/Eigen/StdVector +30 -0
- package/vendor/eigen/Eigen/SuperLUSupport +70 -0
- package/vendor/eigen/Eigen/ThreadPool +80 -0
- package/vendor/eigen/Eigen/UmfPackSupport +42 -0
- package/vendor/eigen/Eigen/Version +14 -0
- package/vendor/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
- package/vendor/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Cholesky/LDLT.h +649 -0
- package/vendor/eigen/Eigen/src/Cholesky/LLT.h +514 -0
- package/vendor/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +124 -0
- package/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +738 -0
- package/vendor/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +239 -0
- package/vendor/eigen/Eigen/src/Core/Array.h +376 -0
- package/vendor/eigen/Eigen/src/Core/ArrayBase.h +213 -0
- package/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +165 -0
- package/vendor/eigen/Eigen/src/Core/Assign.h +80 -0
- package/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +1057 -0
- package/vendor/eigen/Eigen/src/Core/Assign_MKL.h +183 -0
- package/vendor/eigen/Eigen/src/Core/BandMatrix.h +338 -0
- package/vendor/eigen/Eigen/src/Core/Block.h +429 -0
- package/vendor/eigen/Eigen/src/Core/CommaInitializer.h +149 -0
- package/vendor/eigen/Eigen/src/Core/ConditionEstimator.h +173 -0
- package/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +2018 -0
- package/vendor/eigen/Eigen/src/Core/CoreIterators.h +141 -0
- package/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +166 -0
- package/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +975 -0
- package/vendor/eigen/Eigen/src/Core/CwiseTernaryOp.h +171 -0
- package/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +91 -0
- package/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +167 -0
- package/vendor/eigen/Eigen/src/Core/DenseBase.h +673 -0
- package/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +568 -0
- package/vendor/eigen/Eigen/src/Core/DenseStorage.h +573 -0
- package/vendor/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
- package/vendor/eigen/Eigen/src/Core/Diagonal.h +219 -0
- package/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +420 -0
- package/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +30 -0
- package/vendor/eigen/Eigen/src/Core/Dot.h +268 -0
- package/vendor/eigen/Eigen/src/Core/EigenBase.h +149 -0
- package/vendor/eigen/Eigen/src/Core/Fill.h +138 -0
- package/vendor/eigen/Eigen/src/Core/FindCoeff.h +464 -0
- package/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +127 -0
- package/vendor/eigen/Eigen/src/Core/Fuzzy.h +132 -0
- package/vendor/eigen/Eigen/src/Core/GeneralProduct.h +519 -0
- package/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +1702 -0
- package/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +230 -0
- package/vendor/eigen/Eigen/src/Core/IO.h +233 -0
- package/vendor/eigen/Eigen/src/Core/IndexedView.h +321 -0
- package/vendor/eigen/Eigen/src/Core/InnerProduct.h +260 -0
- package/vendor/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Core/Inverse.h +108 -0
- package/vendor/eigen/Eigen/src/Core/Map.h +153 -0
- package/vendor/eigen/Eigen/src/Core/MapBase.h +283 -0
- package/vendor/eigen/Eigen/src/Core/MathFunctions.h +2103 -0
- package/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +263 -0
- package/vendor/eigen/Eigen/src/Core/Matrix.h +534 -0
- package/vendor/eigen/Eigen/src/Core/MatrixBase.h +545 -0
- package/vendor/eigen/Eigen/src/Core/NestByValue.h +91 -0
- package/vendor/eigen/Eigen/src/Core/NoAlias.h +102 -0
- package/vendor/eigen/Eigen/src/Core/NumTraits.h +335 -0
- package/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +253 -0
- package/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +555 -0
- package/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +1014 -0
- package/vendor/eigen/Eigen/src/Core/Product.h +307 -0
- package/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +1287 -0
- package/vendor/eigen/Eigen/src/Core/Random.h +207 -0
- package/vendor/eigen/Eigen/src/Core/RandomImpl.h +262 -0
- package/vendor/eigen/Eigen/src/Core/RealView.h +250 -0
- package/vendor/eigen/Eigen/src/Core/Redux.h +535 -0
- package/vendor/eigen/Eigen/src/Core/Ref.h +383 -0
- package/vendor/eigen/Eigen/src/Core/Replicate.h +130 -0
- package/vendor/eigen/Eigen/src/Core/Reshaped.h +398 -0
- package/vendor/eigen/Eigen/src/Core/ReturnByValue.h +111 -0
- package/vendor/eigen/Eigen/src/Core/Reverse.h +202 -0
- package/vendor/eigen/Eigen/src/Core/Select.h +92 -0
- package/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +329 -0
- package/vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +50 -0
- package/vendor/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
- package/vendor/eigen/Eigen/src/Core/Solve.h +174 -0
- package/vendor/eigen/Eigen/src/Core/SolveTriangular.h +237 -0
- package/vendor/eigen/Eigen/src/Core/SolverBase.h +167 -0
- package/vendor/eigen/Eigen/src/Core/StableNorm.h +217 -0
- package/vendor/eigen/Eigen/src/Core/StlIterators.h +619 -0
- package/vendor/eigen/Eigen/src/Core/Stride.h +114 -0
- package/vendor/eigen/Eigen/src/Core/Swap.h +99 -0
- package/vendor/eigen/Eigen/src/Core/Transpose.h +427 -0
- package/vendor/eigen/Eigen/src/Core/Transpositions.h +323 -0
- package/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +900 -0
- package/vendor/eigen/Eigen/src/Core/VectorBlock.h +83 -0
- package/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +733 -0
- package/vendor/eigen/Eigen/src/Core/Visitor.h +537 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +565 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +130 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +3081 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +308 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +472 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +141 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +3146 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +277 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +653 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +81 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +3686 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +205 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +901 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +3729 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +866 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +128 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +2634 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +227 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +1091 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +47 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +104 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1712 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +77 -0
- package/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- package/vendor/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +620 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +379 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1237 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +732 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +243 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +68 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +6096 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1642 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +503 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +88 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +2384 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +230 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +48 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +674 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +52 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +227 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +303 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +576 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +83 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +570 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +244 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +1413 -0
- package/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +174 -0
- package/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +747 -0
- package/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +274 -0
- package/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +149 -0
- package/vendor/eigen/Eigen/src/Core/functors/TernaryFunctors.h +52 -0
- package/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1420 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +3153 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +459 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +330 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +148 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +205 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +473 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +139 -0
- package/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +282 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +483 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +277 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +253 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +115 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +95 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +397 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +325 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +347 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +275 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +388 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +166 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +122 -0
- package/vendor/eigen/Eigen/src/Core/util/Assert.h +158 -0
- package/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +622 -0
- package/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +543 -0
- package/vendor/eigen/Eigen/src/Core/util/Constants.h +598 -0
- package/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +146 -0
- package/vendor/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
- package/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +524 -0
- package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
- package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
- package/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +487 -0
- package/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +279 -0
- package/vendor/eigen/Eigen/src/Core/util/MKL_support.h +139 -0
- package/vendor/eigen/Eigen/src/Core/util/Macros.h +1346 -0
- package/vendor/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
- package/vendor/eigen/Eigen/src/Core/util/Memory.h +1385 -0
- package/vendor/eigen/Eigen/src/Core/util/Meta.h +760 -0
- package/vendor/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
- package/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +44 -0
- package/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- package/vendor/eigen/Eigen/src/Core/util/Serializer.h +209 -0
- package/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +105 -0
- package/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +445 -0
- package/vendor/eigen/Eigen/src/Core/util/XprHelper.h +1093 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +315 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +442 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +95 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +579 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +402 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +212 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +356 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +142 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +587 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +519 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +83 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +850 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +90 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +529 -0
- package/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +485 -0
- package/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +245 -0
- package/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +203 -0
- package/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +453 -0
- package/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +273 -0
- package/vendor/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +257 -0
- package/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- package/vendor/eigen/Eigen/src/Geometry/Quaternion.h +930 -0
- package/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +201 -0
- package/vendor/eigen/Eigen/src/Geometry/RotationBase.h +209 -0
- package/vendor/eigen/Eigen/src/Geometry/Scaling.h +195 -0
- package/vendor/eigen/Eigen/src/Geometry/Transform.h +1485 -0
- package/vendor/eigen/Eigen/src/Geometry/Translation.h +204 -0
- package/vendor/eigen/Eigen/src/Geometry/Umeyama.h +161 -0
- package/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +154 -0
- package/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +115 -0
- package/vendor/eigen/Eigen/src/Householder/Householder.h +154 -0
- package/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +504 -0
- package/vendor/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +213 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +220 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +217 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +402 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +449 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +395 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +193 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +111 -0
- package/vendor/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +427 -0
- package/vendor/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +339 -0
- package/vendor/eigen/Eigen/src/LU/Determinant.h +98 -0
- package/vendor/eigen/Eigen/src/LU/FullPivLU.h +826 -0
- package/vendor/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/LU/InverseImpl.h +353 -0
- package/vendor/eigen/Eigen/src/LU/PartialPivLU.h +586 -0
- package/vendor/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +97 -0
- package/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +353 -0
- package/vendor/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/MetisSupport/MetisSupport.h +125 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +413 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +1690 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +146 -0
- package/vendor/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +632 -0
- package/vendor/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +500 -0
- package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +161 -0
- package/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +648 -0
- package/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +733 -0
- package/vendor/eigen/Eigen/src/QR/HouseholderQR.h +543 -0
- package/vendor/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +77 -0
- package/vendor/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +315 -0
- package/vendor/eigen/Eigen/src/SVD/BDCSVD.h +1470 -0
- package/vendor/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
- package/vendor/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +846 -0
- package/vendor/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +127 -0
- package/vendor/eigen/Eigen/src/SVD/SVDBase.h +436 -0
- package/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +379 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +868 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +388 -0
- package/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +329 -0
- package/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +206 -0
- package/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +308 -0
- package/vendor/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +279 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +534 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseColEtree.h +194 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +592 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +938 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +142 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +314 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDot.h +100 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseFuzzy.h +31 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMap.h +295 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +1876 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +451 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparsePermutation.h +249 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +178 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseRedux.h +47 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +370 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +613 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSolverBase.h +115 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +184 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseTranspose.h +83 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseTriangularView.h +177 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +209 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +532 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseView.h +225 -0
- package/vendor/eigen/Eigen/src/SparseCore/TriangularSolver.h +274 -0
- package/vendor/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +969 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLUImpl.h +79 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +210 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +113 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +319 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +75 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +177 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +168 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +114 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +133 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +215 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +235 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +136 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +130 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +81 -0
- package/vendor/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +706 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +51 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdList.h +50 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdVector.h +51 -0
- package/vendor/eigen/Eigen/src/StlSupport/details.h +82 -0
- package/vendor/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +929 -0
- package/vendor/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
- package/vendor/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
- package/vendor/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
- package/vendor/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
- package/vendor/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
- package/vendor/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
- package/vendor/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +606 -0
- package/vendor/eigen/Eigen/src/misc/Image.h +80 -0
- package/vendor/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/misc/Kernel.h +77 -0
- package/vendor/eigen/Eigen/src/misc/RealSvd2x2.h +53 -0
- package/vendor/eigen/Eigen/src/misc/blas.h +97 -0
- package/vendor/eigen/Eigen/src/misc/lapacke.h +10085 -0
- package/vendor/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
- package/vendor/eigen/Eigen/src/misc/lapacke_mangling.h +16 -0
- package/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
- package/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
- package/vendor/eigen/Eigen/src/plugins/BlockMethods.inc +1370 -0
- package/vendor/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
- package/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.inc +167 -0
- package/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
- package/vendor/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
- package/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
- package/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
- package/vendor/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
- package/vendor/eigen/README.md +5 -0
- package/vendor/mpdecimal/COPYRIGHT.txt +23 -0
- package/vendor/mpdecimal/README.txt +53 -0
- package/vendor/mpdecimal/libmpdec/.objs/README.txt +8 -0
- package/vendor/mpdecimal/libmpdec/.objs/symbols32.exp +343 -0
- package/vendor/mpdecimal/libmpdec/.objs/symbols64.exp +347 -0
- package/vendor/mpdecimal/libmpdec/.pc/libmpdec.pc.in +11 -0
- package/vendor/mpdecimal/libmpdec/.profile/train.sh +35 -0
- package/vendor/mpdecimal/libmpdec/README.txt +84 -0
- package/vendor/mpdecimal/libmpdec/basearith.c +649 -0
- package/vendor/mpdecimal/libmpdec/basearith.h +217 -0
- package/vendor/mpdecimal/libmpdec/bits.h +188 -0
- package/vendor/mpdecimal/libmpdec/constants.c +129 -0
- package/vendor/mpdecimal/libmpdec/constants.h +88 -0
- package/vendor/mpdecimal/libmpdec/context.c +285 -0
- package/vendor/mpdecimal/libmpdec/convolute.c +172 -0
- package/vendor/mpdecimal/libmpdec/convolute.h +48 -0
- package/vendor/mpdecimal/libmpdec/crt.c +178 -0
- package/vendor/mpdecimal/libmpdec/crt.h +45 -0
- package/vendor/mpdecimal/libmpdec/difradix2.c +171 -0
- package/vendor/mpdecimal/libmpdec/difradix2.h +46 -0
- package/vendor/mpdecimal/libmpdec/fnt.c +77 -0
- package/vendor/mpdecimal/libmpdec/fnt.h +46 -0
- package/vendor/mpdecimal/libmpdec/fourstep.c +242 -0
- package/vendor/mpdecimal/libmpdec/fourstep.h +46 -0
- package/vendor/mpdecimal/libmpdec/io.c +1610 -0
- package/vendor/mpdecimal/libmpdec/io.h +61 -0
- package/vendor/mpdecimal/libmpdec/mpalloc.c +347 -0
- package/vendor/mpdecimal/libmpdec/mpalloc.h +53 -0
- package/vendor/mpdecimal/libmpdec/mpdecimal.c +9155 -0
- package/vendor/mpdecimal/libmpdec/mpdecimal.h.in +804 -0
- package/vendor/mpdecimal/libmpdec/mpsignal.c +966 -0
- package/vendor/mpdecimal/libmpdec/numbertheory.c +129 -0
- package/vendor/mpdecimal/libmpdec/numbertheory.h +75 -0
- package/vendor/mpdecimal/libmpdec/sixstep.c +212 -0
- package/vendor/mpdecimal/libmpdec/sixstep.h +46 -0
- package/vendor/mpdecimal/libmpdec/transpose.c +275 -0
- package/vendor/mpdecimal/libmpdec/transpose.h +60 -0
- package/vendor/mpdecimal/libmpdec/typearith.h +661 -0
- package/vendor/mpdecimal/libmpdec/umodarith.h +645 -0
- package/vendor/symengine/AUTHORS +101 -0
- package/vendor/symengine/LICENSE +254 -0
- package/vendor/symengine/README.md +199 -0
- package/vendor/symengine/symengine/add.cpp +508 -0
- package/vendor/symengine/symengine/add.h +187 -0
- package/vendor/symengine/symengine/as_real_imag.cpp +289 -0
- package/vendor/symengine/symengine/assumptions.cpp +202 -0
- package/vendor/symengine/symengine/assumptions.h +47 -0
- package/vendor/symengine/symengine/basic-inl.h +152 -0
- package/vendor/symengine/symengine/basic-methods.inc +9 -0
- package/vendor/symengine/symengine/basic.cpp +110 -0
- package/vendor/symengine/symengine/basic.h +356 -0
- package/vendor/symengine/symengine/complex.cpp +198 -0
- package/vendor/symengine/symengine/complex.h +396 -0
- package/vendor/symengine/symengine/complex_double.cpp +72 -0
- package/vendor/symengine/symengine/complex_double.h +570 -0
- package/vendor/symengine/symengine/complex_mpc.h +406 -0
- package/vendor/symengine/symengine/constants.cpp +130 -0
- package/vendor/symengine/symengine/constants.h +81 -0
- package/vendor/symengine/symengine/cse.cpp +556 -0
- package/vendor/symengine/symengine/cwrapper.h +949 -0
- package/vendor/symengine/symengine/dense_matrix.cpp +2100 -0
- package/vendor/symengine/symengine/derivative.cpp +841 -0
- package/vendor/symengine/symengine/derivative.h +137 -0
- package/vendor/symengine/symengine/dict.cpp +125 -0
- package/vendor/symengine/symengine/dict.h +333 -0
- package/vendor/symengine/symengine/diophantine.cpp +139 -0
- package/vendor/symengine/symengine/diophantine.h +20 -0
- package/vendor/symengine/symengine/eval.cpp +109 -0
- package/vendor/symengine/symengine/eval.h +40 -0
- package/vendor/symengine/symengine/eval_arb.h +31 -0
- package/vendor/symengine/symengine/eval_double.cpp +959 -0
- package/vendor/symengine/symengine/eval_double.h +28 -0
- package/vendor/symengine/symengine/eval_mpc.h +29 -0
- package/vendor/symengine/symengine/eval_mpfr.h +26 -0
- package/vendor/symengine/symengine/expand.cpp +379 -0
- package/vendor/symengine/symengine/expression.cpp +24 -0
- package/vendor/symengine/symengine/expression.h +375 -0
- package/vendor/symengine/symengine/fields.cpp +861 -0
- package/vendor/symengine/symengine/fields.h +647 -0
- package/vendor/symengine/symengine/finitediff.cpp +70 -0
- package/vendor/symengine/symengine/finitediff.h +21 -0
- package/vendor/symengine/symengine/flint_wrapper.h +1010 -0
- package/vendor/symengine/symengine/functions.cpp +3913 -0
- package/vendor/symengine/symengine/functions.h +1321 -0
- package/vendor/symengine/symengine/infinity.cpp +537 -0
- package/vendor/symengine/symengine/infinity.h +118 -0
- package/vendor/symengine/symengine/integer.cpp +153 -0
- package/vendor/symengine/symengine/integer.h +227 -0
- package/vendor/symengine/symengine/interruption.cpp +9 -0
- package/vendor/symengine/symengine/interruption.h +19 -0
- package/vendor/symengine/symengine/lambda_double.h +918 -0
- package/vendor/symengine/symengine/limits.h +35 -0
- package/vendor/symengine/symengine/llvm_double.h +201 -0
- package/vendor/symengine/symengine/logic.cpp +812 -0
- package/vendor/symengine/symengine/logic.h +281 -0
- package/vendor/symengine/symengine/matrices/conjugate_matrix.cpp +139 -0
- package/vendor/symengine/symengine/matrices/conjugate_matrix.h +39 -0
- package/vendor/symengine/symengine/matrices/diagonal_matrix.cpp +79 -0
- package/vendor/symengine/symengine/matrices/diagonal_matrix.h +52 -0
- package/vendor/symengine/symengine/matrices/hadamard_product.cpp +151 -0
- package/vendor/symengine/symengine/matrices/hadamard_product.h +42 -0
- package/vendor/symengine/symengine/matrices/identity_matrix.cpp +63 -0
- package/vendor/symengine/symengine/matrices/identity_matrix.h +40 -0
- package/vendor/symengine/symengine/matrices/immutable_dense_matrix.cpp +143 -0
- package/vendor/symengine/symengine/matrices/immutable_dense_matrix.h +65 -0
- package/vendor/symengine/symengine/matrices/is_diagonal.cpp +115 -0
- package/vendor/symengine/symengine/matrices/is_lower.cpp +110 -0
- package/vendor/symengine/symengine/matrices/is_real.cpp +78 -0
- package/vendor/symengine/symengine/matrices/is_square.cpp +85 -0
- package/vendor/symengine/symengine/matrices/is_symmetric.cpp +112 -0
- package/vendor/symengine/symengine/matrices/is_toeplitz.cpp +104 -0
- package/vendor/symengine/symengine/matrices/is_upper.cpp +108 -0
- package/vendor/symengine/symengine/matrices/is_zero.cpp +81 -0
- package/vendor/symengine/symengine/matrices/matrix_add.cpp +176 -0
- package/vendor/symengine/symengine/matrices/matrix_add.h +42 -0
- package/vendor/symengine/symengine/matrices/matrix_expr.h +19 -0
- package/vendor/symengine/symengine/matrices/matrix_mul.cpp +258 -0
- package/vendor/symengine/symengine/matrices/matrix_mul.h +55 -0
- package/vendor/symengine/symengine/matrices/matrix_symbol.cpp +34 -0
- package/vendor/symengine/symengine/matrices/matrix_symbol.h +41 -0
- package/vendor/symengine/symengine/matrices/size.cpp +121 -0
- package/vendor/symengine/symengine/matrices/size.h +15 -0
- package/vendor/symengine/symengine/matrices/trace.cpp +112 -0
- package/vendor/symengine/symengine/matrices/trace.h +31 -0
- package/vendor/symengine/symengine/matrices/transpose.cpp +126 -0
- package/vendor/symengine/symengine/matrices/transpose.h +39 -0
- package/vendor/symengine/symengine/matrices/zero_matrix.cpp +94 -0
- package/vendor/symengine/symengine/matrices/zero_matrix.h +47 -0
- package/vendor/symengine/symengine/matrix.cpp +33 -0
- package/vendor/symengine/symengine/matrix.h +675 -0
- package/vendor/symengine/symengine/matrix_expressions.h +51 -0
- package/vendor/symengine/symengine/monomials.cpp +33 -0
- package/vendor/symengine/symengine/monomials.h +20 -0
- package/vendor/symengine/symengine/mp_boost.cpp +635 -0
- package/vendor/symengine/symengine/mp_class.h +1286 -0
- package/vendor/symengine/symengine/mp_wrapper.h +510 -0
- package/vendor/symengine/symengine/mul.cpp +629 -0
- package/vendor/symengine/symengine/mul.h +146 -0
- package/vendor/symengine/symengine/nan.cpp +234 -0
- package/vendor/symengine/symengine/nan.h +82 -0
- package/vendor/symengine/symengine/ntheory.cpp +1700 -0
- package/vendor/symengine/symengine/ntheory.h +213 -0
- package/vendor/symengine/symengine/ntheory_funcs.cpp +189 -0
- package/vendor/symengine/symengine/ntheory_funcs.h +78 -0
- package/vendor/symengine/symengine/number.cpp +36 -0
- package/vendor/symengine/symengine/number.h +256 -0
- package/vendor/symengine/symengine/numer_denom.cpp +149 -0
- package/vendor/symengine/symengine/parser/parser.cpp +367 -0
- package/vendor/symengine/symengine/parser/parser.h +56 -0
- package/vendor/symengine/symengine/parser/parser.tab.cc +1495 -0
- package/vendor/symengine/symengine/parser/parser.tab.hh +1410 -0
- package/vendor/symengine/symengine/parser/parser_old.cpp +688 -0
- package/vendor/symengine/symengine/parser/tokenizer.cpp +435 -0
- package/vendor/symengine/symengine/parser/tokenizer.h +35 -0
- package/vendor/symengine/symengine/parser.h +25 -0
- package/vendor/symengine/symengine/polys/basic_conversions.cpp +178 -0
- package/vendor/symengine/symengine/polys/basic_conversions.h +575 -0
- package/vendor/symengine/symengine/polys/cancel.h +39 -0
- package/vendor/symengine/symengine/polys/msymenginepoly.cpp +130 -0
- package/vendor/symengine/symengine/polys/msymenginepoly.h +536 -0
- package/vendor/symengine/symengine/polys/uexprpoly.cpp +90 -0
- package/vendor/symengine/symengine/polys/uexprpoly.h +205 -0
- package/vendor/symengine/symengine/polys/uintpoly.cpp +62 -0
- package/vendor/symengine/symengine/polys/uintpoly.h +134 -0
- package/vendor/symengine/symengine/polys/uintpoly_flint.h +228 -0
- package/vendor/symengine/symengine/polys/uintpoly_piranha.h +373 -0
- package/vendor/symengine/symengine/polys/upolybase.h +769 -0
- package/vendor/symengine/symengine/polys/uratpoly.cpp +59 -0
- package/vendor/symengine/symengine/polys/uratpoly.h +58 -0
- package/vendor/symengine/symengine/polys/usymenginepoly.h +139 -0
- package/vendor/symengine/symengine/pow.cpp +303 -0
- package/vendor/symengine/symengine/pow.h +76 -0
- package/vendor/symengine/symengine/prime_sieve.cpp +143 -0
- package/vendor/symengine/symengine/prime_sieve.h +64 -0
- package/vendor/symengine/symengine/printers/codegen.cpp +716 -0
- package/vendor/symengine/symengine/printers/codegen.h +168 -0
- package/vendor/symengine/symengine/printers/latex.cpp +630 -0
- package/vendor/symengine/symengine/printers/latex.h +76 -0
- package/vendor/symengine/symengine/printers/mathml.cpp +358 -0
- package/vendor/symengine/symengine/printers/mathml.h +62 -0
- package/vendor/symengine/symengine/printers/stringbox.cpp +276 -0
- package/vendor/symengine/symengine/printers/stringbox.h +60 -0
- package/vendor/symengine/symengine/printers/strprinter.cpp +1212 -0
- package/vendor/symengine/symengine/printers/strprinter.h +217 -0
- package/vendor/symengine/symengine/printers/unicode.cpp +730 -0
- package/vendor/symengine/symengine/printers/unicode.h +84 -0
- package/vendor/symengine/symengine/printers.h +46 -0
- package/vendor/symengine/symengine/rational.cpp +365 -0
- package/vendor/symengine/symengine/rational.h +341 -0
- package/vendor/symengine/symengine/real_double.cpp +388 -0
- package/vendor/symengine/symengine/real_double.h +492 -0
- package/vendor/symengine/symengine/real_mpfr.h +379 -0
- package/vendor/symengine/symengine/refine.cpp +213 -0
- package/vendor/symengine/symengine/refine.h +43 -0
- package/vendor/symengine/symengine/rewrite.cpp +235 -0
- package/vendor/symengine/symengine/rings.cpp +107 -0
- package/vendor/symengine/symengine/rings.h +24 -0
- package/vendor/symengine/symengine/serialize-cereal.h +964 -0
- package/vendor/symengine/symengine/series.cpp +85 -0
- package/vendor/symengine/symengine/series.h +727 -0
- package/vendor/symengine/symengine/series_flint.h +214 -0
- package/vendor/symengine/symengine/series_generic.cpp +247 -0
- package/vendor/symengine/symengine/series_generic.h +86 -0
- package/vendor/symengine/symengine/series_piranha.h +95 -0
- package/vendor/symengine/symengine/series_visitor.h +357 -0
- package/vendor/symengine/symengine/set_funcs.cpp +296 -0
- package/vendor/symengine/symengine/sets.cpp +1854 -0
- package/vendor/symengine/symengine/sets.h +696 -0
- package/vendor/symengine/symengine/simplify.cpp +62 -0
- package/vendor/symengine/symengine/simplify.h +34 -0
- package/vendor/symengine/symengine/solve.cpp +665 -0
- package/vendor/symengine/symengine/solve.h +117 -0
- package/vendor/symengine/symengine/sparse_matrix.cpp +776 -0
- package/vendor/symengine/symengine/special_boost.cpp +85 -0
- package/vendor/symengine/symengine/special_double.h +570 -0
- package/vendor/symengine/symengine/subs.h +579 -0
- package/vendor/symengine/symengine/symbol.cpp +88 -0
- package/vendor/symengine/symengine/symbol.h +116 -0
- package/vendor/symengine/symengine/symengine_assert.h +50 -0
- package/vendor/symengine/symengine/symengine_casts.h +139 -0
- package/vendor/symengine/symengine/symengine_exception.h +101 -0
- package/vendor/symengine/symengine/symengine_rcp.cpp +21 -0
- package/vendor/symengine/symengine/symengine_rcp.h +384 -0
- package/vendor/symengine/symengine/test_visitors.cpp +1083 -0
- package/vendor/symengine/symengine/test_visitors.h +466 -0
- package/vendor/symengine/symengine/tribool.h +85 -0
- package/vendor/symengine/symengine/tuple.cpp +47 -0
- package/vendor/symengine/symengine/tuple.h +32 -0
- package/vendor/symengine/symengine/type_codes.inc +139 -0
- package/vendor/symengine/symengine/utilities/cereal/LICENSE +24 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/access.hpp +351 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/adapters.hpp +163 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/binary.hpp +169 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/json.hpp +1024 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/portable_binary.hpp +334 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/xml.hpp +956 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/cereal.hpp +1120 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/helpers.hpp +422 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl.hpp +825 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl_fwd.hpp +65 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/static_object.hpp +128 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/traits.hpp +1411 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/util.hpp +84 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/macros.hpp +156 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/specialize.hpp +139 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/array.hpp +79 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/atomic.hpp +55 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/base_class.hpp +203 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/bitset.hpp +176 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/boost_variant.hpp +164 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/chrono.hpp +72 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/common.hpp +129 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/complex.hpp +56 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/concepts/pair_associative_container.hpp +73 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/deque.hpp +62 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/forward_list.hpp +68 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/functional.hpp +43 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/list.hpp +62 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/map.hpp +36 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/memory.hpp +425 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/optional.hpp +65 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/polymorphic.hpp +483 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/queue.hpp +132 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/set.hpp +103 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/stack.hpp +76 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/string.hpp +61 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/tuple.hpp +123 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_map.hpp +36 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_set.hpp +99 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/utility.hpp +47 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/valarray.hpp +89 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/variant.hpp +108 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/vector.hpp +112 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/version.hpp +52 -0
- package/vendor/symengine/symengine/utilities/fast_float/include/fast_float/fast_float.h +3720 -0
- package/vendor/symengine/symengine/utilities/stream_fmt.h +25 -0
- package/vendor/symengine/symengine/visitor.cpp +348 -0
- package/vendor/symengine/symengine/visitor.h +425 -0
|
@@ -0,0 +1,1876 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>
|
|
5
|
+
//
|
|
6
|
+
// This Source Code Form is subject to the terms of the Mozilla
|
|
7
|
+
// Public License v. 2.0. If a copy of the MPL was not distributed
|
|
8
|
+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
9
|
+
|
|
10
|
+
#ifndef EIGEN_SPARSEMATRIX_H
|
|
11
|
+
#define EIGEN_SPARSEMATRIX_H
|
|
12
|
+
|
|
13
|
+
// IWYU pragma: private
|
|
14
|
+
#include "./InternalHeaderCheck.h"
|
|
15
|
+
|
|
16
|
+
namespace Eigen {
|
|
17
|
+
|
|
18
|
+
/** \ingroup SparseCore_Module
|
|
19
|
+
*
|
|
20
|
+
* \class SparseMatrix
|
|
21
|
+
*
|
|
22
|
+
* \brief A versatible sparse matrix representation
|
|
23
|
+
*
|
|
24
|
+
* This class implements a more versatile variants of the common \em compressed row/column storage format.
|
|
25
|
+
* Each colmun's (resp. row) non zeros are stored as a pair of value with associated row (resp. colmiun) index.
|
|
26
|
+
* All the non zeros are stored in a single large buffer. Unlike the \em compressed format, there might be extra
|
|
27
|
+
* space in between the nonzeros of two successive colmuns (resp. rows) such that insertion of new non-zero
|
|
28
|
+
* can be done with limited memory reallocation and copies.
|
|
29
|
+
*
|
|
30
|
+
* A call to the function makeCompressed() turns the matrix into the standard \em compressed format
|
|
31
|
+
* compatible with many library.
|
|
32
|
+
*
|
|
33
|
+
* More details on this storage sceheme are given in the \ref TutorialSparse "manual pages".
|
|
34
|
+
*
|
|
35
|
+
* \tparam Scalar_ the scalar type, i.e. the type of the coefficients
|
|
36
|
+
* \tparam Options_ Union of bit flags controlling the storage scheme. Currently the only possibility
|
|
37
|
+
* is ColMajor or RowMajor. The default is 0 which means column-major.
|
|
38
|
+
* \tparam StorageIndex_ the type of the indices. It has to be a \b signed type (e.g., short, int, std::ptrdiff_t).
|
|
39
|
+
* Default is \c int.
|
|
40
|
+
*
|
|
41
|
+
* \warning In %Eigen 3.2, the undocumented type \c SparseMatrix::Index was improperly defined as the storage index type
|
|
42
|
+
* (e.g., int), whereas it is now (starting from %Eigen 3.3) deprecated and always defined as Eigen::Index. Codes making
|
|
43
|
+
* use of \c SparseMatrix::Index, might thus likely have to be changed to use \c SparseMatrix::StorageIndex instead.
|
|
44
|
+
*
|
|
45
|
+
* This class can be extended with the help of the plugin mechanism described on the page
|
|
46
|
+
* \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_SPARSEMATRIX_PLUGIN.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
namespace internal {
|
|
50
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
51
|
+
struct traits<SparseMatrix<Scalar_, Options_, StorageIndex_>> {
|
|
52
|
+
typedef Scalar_ Scalar;
|
|
53
|
+
typedef StorageIndex_ StorageIndex;
|
|
54
|
+
typedef Sparse StorageKind;
|
|
55
|
+
typedef MatrixXpr XprKind;
|
|
56
|
+
enum {
|
|
57
|
+
RowsAtCompileTime = Dynamic,
|
|
58
|
+
ColsAtCompileTime = Dynamic,
|
|
59
|
+
MaxRowsAtCompileTime = Dynamic,
|
|
60
|
+
MaxColsAtCompileTime = Dynamic,
|
|
61
|
+
Options = Options_,
|
|
62
|
+
Flags = Options_ | NestByRefBit | LvalueBit | CompressedAccessBit,
|
|
63
|
+
SupportedAccessPatterns = InnerRandomAccessPattern
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
template <typename Scalar_, int Options_, typename StorageIndex_, int DiagIndex>
|
|
68
|
+
struct traits<Diagonal<SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex>> {
|
|
69
|
+
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> MatrixType;
|
|
70
|
+
typedef typename ref_selector<MatrixType>::type MatrixTypeNested;
|
|
71
|
+
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNested_;
|
|
72
|
+
|
|
73
|
+
typedef Scalar_ Scalar;
|
|
74
|
+
typedef Dense StorageKind;
|
|
75
|
+
typedef StorageIndex_ StorageIndex;
|
|
76
|
+
typedef MatrixXpr XprKind;
|
|
77
|
+
|
|
78
|
+
enum {
|
|
79
|
+
RowsAtCompileTime = Dynamic,
|
|
80
|
+
ColsAtCompileTime = 1,
|
|
81
|
+
MaxRowsAtCompileTime = Dynamic,
|
|
82
|
+
MaxColsAtCompileTime = 1,
|
|
83
|
+
Flags = LvalueBit
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
template <typename Scalar_, int Options_, typename StorageIndex_, int DiagIndex>
|
|
88
|
+
struct traits<Diagonal<const SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex>>
|
|
89
|
+
: public traits<Diagonal<SparseMatrix<Scalar_, Options_, StorageIndex_>, DiagIndex>> {
|
|
90
|
+
enum { Flags = 0 };
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
template <typename StorageIndex>
|
|
94
|
+
struct sparse_reserve_op {
|
|
95
|
+
EIGEN_DEVICE_FUNC sparse_reserve_op(Index begin, Index end, Index size) {
|
|
96
|
+
Index range = numext::mini(end - begin, size);
|
|
97
|
+
m_begin = begin;
|
|
98
|
+
m_end = begin + range;
|
|
99
|
+
m_val = StorageIndex(size / range);
|
|
100
|
+
m_remainder = StorageIndex(size % range);
|
|
101
|
+
}
|
|
102
|
+
template <typename IndexType>
|
|
103
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageIndex operator()(IndexType i) const {
|
|
104
|
+
if ((i >= m_begin) && (i < m_end))
|
|
105
|
+
return m_val + ((i - m_begin) < m_remainder ? 1 : 0);
|
|
106
|
+
else
|
|
107
|
+
return 0;
|
|
108
|
+
}
|
|
109
|
+
StorageIndex m_val, m_remainder;
|
|
110
|
+
Index m_begin, m_end;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
template <typename Scalar>
|
|
114
|
+
struct functor_traits<sparse_reserve_op<Scalar>> {
|
|
115
|
+
enum { Cost = 1, PacketAccess = false, IsRepeatable = true };
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
} // end namespace internal
|
|
119
|
+
|
|
120
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
121
|
+
class SparseMatrix : public SparseCompressedBase<SparseMatrix<Scalar_, Options_, StorageIndex_>> {
|
|
122
|
+
typedef SparseCompressedBase<SparseMatrix> Base;
|
|
123
|
+
using Base::convert_index;
|
|
124
|
+
friend class SparseVector<Scalar_, 0, StorageIndex_>;
|
|
125
|
+
template <typename, typename, typename, typename, typename>
|
|
126
|
+
friend struct internal::Assignment;
|
|
127
|
+
|
|
128
|
+
public:
|
|
129
|
+
using Base::isCompressed;
|
|
130
|
+
using Base::nonZeros;
|
|
131
|
+
EIGEN_SPARSE_PUBLIC_INTERFACE(SparseMatrix)
|
|
132
|
+
using Base::operator+=;
|
|
133
|
+
using Base::operator-=;
|
|
134
|
+
|
|
135
|
+
typedef Eigen::Map<SparseMatrix<Scalar, Options_, StorageIndex>> Map;
|
|
136
|
+
typedef Diagonal<SparseMatrix> DiagonalReturnType;
|
|
137
|
+
typedef Diagonal<const SparseMatrix> ConstDiagonalReturnType;
|
|
138
|
+
typedef typename Base::InnerIterator InnerIterator;
|
|
139
|
+
typedef typename Base::ReverseInnerIterator ReverseInnerIterator;
|
|
140
|
+
|
|
141
|
+
using Base::IsRowMajor;
|
|
142
|
+
typedef internal::CompressedStorage<Scalar, StorageIndex> Storage;
|
|
143
|
+
enum { Options = Options_ };
|
|
144
|
+
|
|
145
|
+
typedef typename Base::IndexVector IndexVector;
|
|
146
|
+
typedef typename Base::ScalarVector ScalarVector;
|
|
147
|
+
|
|
148
|
+
protected:
|
|
149
|
+
typedef SparseMatrix<Scalar, IsRowMajor ? ColMajor : RowMajor, StorageIndex> TransposedSparseMatrix;
|
|
150
|
+
|
|
151
|
+
Index m_outerSize;
|
|
152
|
+
Index m_innerSize;
|
|
153
|
+
StorageIndex* m_outerIndex;
|
|
154
|
+
StorageIndex* m_innerNonZeros; // optional, if null then the data is compressed
|
|
155
|
+
Storage m_data;
|
|
156
|
+
|
|
157
|
+
public:
|
|
158
|
+
/** \returns the number of rows of the matrix */
|
|
159
|
+
inline Index rows() const { return IsRowMajor ? m_outerSize : m_innerSize; }
|
|
160
|
+
/** \returns the number of columns of the matrix */
|
|
161
|
+
inline Index cols() const { return IsRowMajor ? m_innerSize : m_outerSize; }
|
|
162
|
+
|
|
163
|
+
/** \returns the number of rows (resp. columns) of the matrix if the storage order column major (resp. row major) */
|
|
164
|
+
inline Index innerSize() const { return m_innerSize; }
|
|
165
|
+
/** \returns the number of columns (resp. rows) of the matrix if the storage order column major (resp. row major) */
|
|
166
|
+
inline Index outerSize() const { return m_outerSize; }
|
|
167
|
+
|
|
168
|
+
/** \returns a const pointer to the array of values.
|
|
169
|
+
* This function is aimed at interoperability with other libraries.
|
|
170
|
+
* \sa innerIndexPtr(), outerIndexPtr() */
|
|
171
|
+
inline const Scalar* valuePtr() const { return m_data.valuePtr(); }
|
|
172
|
+
/** \returns a non-const pointer to the array of values.
|
|
173
|
+
* This function is aimed at interoperability with other libraries.
|
|
174
|
+
* \sa innerIndexPtr(), outerIndexPtr() */
|
|
175
|
+
inline Scalar* valuePtr() { return m_data.valuePtr(); }
|
|
176
|
+
|
|
177
|
+
/** \returns a const pointer to the array of inner indices.
|
|
178
|
+
* This function is aimed at interoperability with other libraries.
|
|
179
|
+
* \sa valuePtr(), outerIndexPtr() */
|
|
180
|
+
inline const StorageIndex* innerIndexPtr() const { return m_data.indexPtr(); }
|
|
181
|
+
/** \returns a non-const pointer to the array of inner indices.
|
|
182
|
+
* This function is aimed at interoperability with other libraries.
|
|
183
|
+
* \sa valuePtr(), outerIndexPtr() */
|
|
184
|
+
inline StorageIndex* innerIndexPtr() { return m_data.indexPtr(); }
|
|
185
|
+
|
|
186
|
+
/** \returns a const pointer to the array of the starting positions of the inner vectors.
|
|
187
|
+
* This function is aimed at interoperability with other libraries.
|
|
188
|
+
* \sa valuePtr(), innerIndexPtr() */
|
|
189
|
+
inline const StorageIndex* outerIndexPtr() const { return m_outerIndex; }
|
|
190
|
+
/** \returns a non-const pointer to the array of the starting positions of the inner vectors.
|
|
191
|
+
* This function is aimed at interoperability with other libraries.
|
|
192
|
+
* \sa valuePtr(), innerIndexPtr() */
|
|
193
|
+
inline StorageIndex* outerIndexPtr() { return m_outerIndex; }
|
|
194
|
+
|
|
195
|
+
/** \returns a const pointer to the array of the number of non zeros of the inner vectors.
|
|
196
|
+
* This function is aimed at interoperability with other libraries.
|
|
197
|
+
* \warning it returns the null pointer 0 in compressed mode */
|
|
198
|
+
inline const StorageIndex* innerNonZeroPtr() const { return m_innerNonZeros; }
|
|
199
|
+
/** \returns a non-const pointer to the array of the number of non zeros of the inner vectors.
|
|
200
|
+
* This function is aimed at interoperability with other libraries.
|
|
201
|
+
* \warning it returns the null pointer 0 in compressed mode */
|
|
202
|
+
inline StorageIndex* innerNonZeroPtr() { return m_innerNonZeros; }
|
|
203
|
+
|
|
204
|
+
/** \internal */
|
|
205
|
+
constexpr Storage& data() { return m_data; }
|
|
206
|
+
/** \internal */
|
|
207
|
+
constexpr const Storage& data() const { return m_data; }
|
|
208
|
+
|
|
209
|
+
/** \returns the value of the matrix at position \a i, \a j
|
|
210
|
+
* This function returns Scalar(0) if the element is an explicit \em zero */
|
|
211
|
+
inline Scalar coeff(Index row, Index col) const {
|
|
212
|
+
eigen_assert(row >= 0 && row < rows() && col >= 0 && col < cols());
|
|
213
|
+
|
|
214
|
+
const Index outer = IsRowMajor ? row : col;
|
|
215
|
+
const Index inner = IsRowMajor ? col : row;
|
|
216
|
+
Index end = m_innerNonZeros ? m_outerIndex[outer] + m_innerNonZeros[outer] : m_outerIndex[outer + 1];
|
|
217
|
+
return m_data.atInRange(m_outerIndex[outer], end, inner);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** \returns a non-const reference to the value of the matrix at position \a i, \a j.
|
|
221
|
+
*
|
|
222
|
+
* If the element does not exist then it is inserted via the insert(Index,Index) function
|
|
223
|
+
* which itself turns the matrix into a non compressed form if that was not the case.
|
|
224
|
+
* The output parameter `inserted` is set to true.
|
|
225
|
+
*
|
|
226
|
+
* Otherwise, if the element does exist, `inserted` will be set to false.
|
|
227
|
+
*
|
|
228
|
+
* This is a O(log(nnz_j)) operation (binary search) plus the cost of insert(Index,Index)
|
|
229
|
+
* function if the element does not already exist.
|
|
230
|
+
*/
|
|
231
|
+
inline Scalar& findOrInsertCoeff(Index row, Index col, bool* inserted) {
|
|
232
|
+
eigen_assert(row >= 0 && row < rows() && col >= 0 && col < cols());
|
|
233
|
+
const Index outer = IsRowMajor ? row : col;
|
|
234
|
+
const Index inner = IsRowMajor ? col : row;
|
|
235
|
+
Index start = m_outerIndex[outer];
|
|
236
|
+
Index end = isCompressed() ? m_outerIndex[outer + 1] : m_outerIndex[outer] + m_innerNonZeros[outer];
|
|
237
|
+
eigen_assert(end >= start && "you probably called coeffRef on a non finalized matrix");
|
|
238
|
+
Index dst = start == end ? end : m_data.searchLowerIndex(start, end, inner);
|
|
239
|
+
if (dst == end) {
|
|
240
|
+
Index capacity = m_outerIndex[outer + 1] - end;
|
|
241
|
+
if (capacity > 0) {
|
|
242
|
+
// implies uncompressed: push to back of vector
|
|
243
|
+
m_innerNonZeros[outer]++;
|
|
244
|
+
m_data.index(end) = StorageIndex(inner);
|
|
245
|
+
m_data.value(end) = Scalar(0);
|
|
246
|
+
if (inserted != nullptr) {
|
|
247
|
+
*inserted = true;
|
|
248
|
+
}
|
|
249
|
+
return m_data.value(end);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if ((dst < end) && (m_data.index(dst) == inner)) {
|
|
253
|
+
// this coefficient exists, return a reference to it
|
|
254
|
+
if (inserted != nullptr) {
|
|
255
|
+
*inserted = false;
|
|
256
|
+
}
|
|
257
|
+
return m_data.value(dst);
|
|
258
|
+
} else {
|
|
259
|
+
if (inserted != nullptr) {
|
|
260
|
+
*inserted = true;
|
|
261
|
+
}
|
|
262
|
+
// insertion will require reconfiguring the buffer
|
|
263
|
+
return insertAtByOuterInner(outer, inner, dst);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** \returns a non-const reference to the value of the matrix at position \a i, \a j
|
|
268
|
+
*
|
|
269
|
+
* If the element does not exist then it is inserted via the insert(Index,Index) function
|
|
270
|
+
* which itself turns the matrix into a non compressed form if that was not the case.
|
|
271
|
+
*
|
|
272
|
+
* This is a O(log(nnz_j)) operation (binary search) plus the cost of insert(Index,Index)
|
|
273
|
+
* function if the element does not already exist.
|
|
274
|
+
*/
|
|
275
|
+
inline Scalar& coeffRef(Index row, Index col) { return findOrInsertCoeff(row, col, nullptr); }
|
|
276
|
+
|
|
277
|
+
/** \returns a reference to a novel non zero coefficient with coordinates \a row x \a col.
|
|
278
|
+
* The non zero coefficient must \b not already exist.
|
|
279
|
+
*
|
|
280
|
+
* If the matrix \c *this is in compressed mode, then \c *this is turned into uncompressed
|
|
281
|
+
* mode while reserving room for 2 x this->innerSize() non zeros if reserve(Index) has not been called earlier.
|
|
282
|
+
* In this case, the insertion procedure is optimized for a \e sequential insertion mode where elements are assumed to
|
|
283
|
+
* be inserted by increasing outer-indices.
|
|
284
|
+
*
|
|
285
|
+
* If that's not the case, then it is strongly recommended to either use a triplet-list to assemble the matrix, or to
|
|
286
|
+
* first call reserve(const SizesType &) to reserve the appropriate number of non-zero elements per inner vector.
|
|
287
|
+
*
|
|
288
|
+
* Assuming memory has been appropriately reserved, this function performs a sorted insertion in O(1)
|
|
289
|
+
* if the elements of each inner vector are inserted in increasing inner index order, and in O(nnz_j) for a random
|
|
290
|
+
* insertion.
|
|
291
|
+
*
|
|
292
|
+
*/
|
|
293
|
+
inline Scalar& insert(Index row, Index col);
|
|
294
|
+
|
|
295
|
+
public:
|
|
296
|
+
/** Removes all non zeros but keep allocated memory
|
|
297
|
+
*
|
|
298
|
+
* This function does not free the currently allocated memory. To release as much as memory as possible,
|
|
299
|
+
* call \code mat.data().squeeze(); \endcode after resizing it.
|
|
300
|
+
*
|
|
301
|
+
* \sa resize(Index,Index), data()
|
|
302
|
+
*/
|
|
303
|
+
inline void setZero() {
|
|
304
|
+
m_data.clear();
|
|
305
|
+
using std::fill_n;
|
|
306
|
+
fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0));
|
|
307
|
+
if (m_innerNonZeros) {
|
|
308
|
+
fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/** Preallocates \a reserveSize non zeros.
|
|
313
|
+
*
|
|
314
|
+
* Precondition: the matrix must be in compressed mode. */
|
|
315
|
+
inline void reserve(Index reserveSize) {
|
|
316
|
+
eigen_assert(isCompressed() && "This function does not make sense in non compressed mode.");
|
|
317
|
+
m_data.reserve(reserveSize);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
|
321
|
+
/** Preallocates \a reserveSize[\c j] non zeros for each column (resp. row) \c j.
|
|
322
|
+
*
|
|
323
|
+
* This function turns the matrix in non-compressed mode.
|
|
324
|
+
*
|
|
325
|
+
* The type \c SizesType must expose the following interface:
|
|
326
|
+
\code
|
|
327
|
+
typedef value_type;
|
|
328
|
+
const value_type& operator[](i) const;
|
|
329
|
+
\endcode
|
|
330
|
+
* for \c i in the [0,this->outerSize()[ range.
|
|
331
|
+
* Typical choices include std::vector<int>, Eigen::VectorXi, Eigen::VectorXi::Constant, etc.
|
|
332
|
+
*/
|
|
333
|
+
template <class SizesType>
|
|
334
|
+
inline void reserve(const SizesType& reserveSizes);
|
|
335
|
+
#else
|
|
336
|
+
template <class SizesType>
|
|
337
|
+
inline void reserve(const SizesType& reserveSizes,
|
|
338
|
+
const typename SizesType::value_type& enableif = typename SizesType::value_type()) {
|
|
339
|
+
EIGEN_UNUSED_VARIABLE(enableif);
|
|
340
|
+
reserveInnerVectors(reserveSizes);
|
|
341
|
+
}
|
|
342
|
+
#endif // EIGEN_PARSED_BY_DOXYGEN
|
|
343
|
+
protected:
|
|
344
|
+
template <class SizesType>
|
|
345
|
+
inline void reserveInnerVectors(const SizesType& reserveSizes) {
|
|
346
|
+
if (isCompressed()) {
|
|
347
|
+
Index totalReserveSize = 0;
|
|
348
|
+
for (Index j = 0; j < m_outerSize; ++j) totalReserveSize += internal::convert_index<Index>(reserveSizes[j]);
|
|
349
|
+
|
|
350
|
+
// if reserveSizes is empty, don't do anything!
|
|
351
|
+
if (totalReserveSize == 0) return;
|
|
352
|
+
|
|
353
|
+
// turn the matrix into non-compressed mode
|
|
354
|
+
m_innerNonZeros = internal::conditional_aligned_new_auto<StorageIndex, true>(m_outerSize);
|
|
355
|
+
|
|
356
|
+
// temporarily use m_innerSizes to hold the new starting points.
|
|
357
|
+
StorageIndex* newOuterIndex = m_innerNonZeros;
|
|
358
|
+
|
|
359
|
+
Index count = 0;
|
|
360
|
+
for (Index j = 0; j < m_outerSize; ++j) {
|
|
361
|
+
newOuterIndex[j] = internal::convert_index<StorageIndex>(count);
|
|
362
|
+
Index reserveSize = internal::convert_index<Index>(reserveSizes[j]);
|
|
363
|
+
count += reserveSize + internal::convert_index<Index>(m_outerIndex[j + 1] - m_outerIndex[j]);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
m_data.reserve(totalReserveSize);
|
|
367
|
+
StorageIndex previousOuterIndex = m_outerIndex[m_outerSize];
|
|
368
|
+
for (Index j = m_outerSize - 1; j >= 0; --j) {
|
|
369
|
+
StorageIndex innerNNZ = previousOuterIndex - m_outerIndex[j];
|
|
370
|
+
StorageIndex begin = m_outerIndex[j];
|
|
371
|
+
StorageIndex end = begin + innerNNZ;
|
|
372
|
+
StorageIndex target = newOuterIndex[j];
|
|
373
|
+
internal::smart_memmove(innerIndexPtr() + begin, innerIndexPtr() + end, innerIndexPtr() + target);
|
|
374
|
+
internal::smart_memmove(valuePtr() + begin, valuePtr() + end, valuePtr() + target);
|
|
375
|
+
previousOuterIndex = m_outerIndex[j];
|
|
376
|
+
m_outerIndex[j] = newOuterIndex[j];
|
|
377
|
+
m_innerNonZeros[j] = innerNNZ;
|
|
378
|
+
}
|
|
379
|
+
if (m_outerSize > 0)
|
|
380
|
+
m_outerIndex[m_outerSize] = m_outerIndex[m_outerSize - 1] + m_innerNonZeros[m_outerSize - 1] +
|
|
381
|
+
internal::convert_index<StorageIndex>(reserveSizes[m_outerSize - 1]);
|
|
382
|
+
|
|
383
|
+
m_data.resize(m_outerIndex[m_outerSize]);
|
|
384
|
+
} else {
|
|
385
|
+
StorageIndex* newOuterIndex = internal::conditional_aligned_new_auto<StorageIndex, true>(m_outerSize + 1);
|
|
386
|
+
|
|
387
|
+
Index count = 0;
|
|
388
|
+
for (Index j = 0; j < m_outerSize; ++j) {
|
|
389
|
+
newOuterIndex[j] = internal::convert_index<StorageIndex>(count);
|
|
390
|
+
Index alreadyReserved =
|
|
391
|
+
internal::convert_index<Index>(m_outerIndex[j + 1] - m_outerIndex[j] - m_innerNonZeros[j]);
|
|
392
|
+
Index reserveSize = internal::convert_index<Index>(reserveSizes[j]);
|
|
393
|
+
Index toReserve = numext::maxi(reserveSize, alreadyReserved);
|
|
394
|
+
count += toReserve + internal::convert_index<Index>(m_innerNonZeros[j]);
|
|
395
|
+
}
|
|
396
|
+
newOuterIndex[m_outerSize] = internal::convert_index<StorageIndex>(count);
|
|
397
|
+
|
|
398
|
+
m_data.resize(count);
|
|
399
|
+
for (Index j = m_outerSize - 1; j >= 0; --j) {
|
|
400
|
+
StorageIndex innerNNZ = m_innerNonZeros[j];
|
|
401
|
+
StorageIndex begin = m_outerIndex[j];
|
|
402
|
+
StorageIndex target = newOuterIndex[j];
|
|
403
|
+
m_data.moveChunk(begin, target, innerNNZ);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
std::swap(m_outerIndex, newOuterIndex);
|
|
407
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(newOuterIndex, m_outerSize + 1);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
public:
|
|
412
|
+
//--- low level purely coherent filling ---
|
|
413
|
+
|
|
414
|
+
/** \internal
|
|
415
|
+
* \returns a reference to the non zero coefficient at position \a row, \a col assuming that:
|
|
416
|
+
* - the nonzero does not already exist
|
|
417
|
+
* - the new coefficient is the last one according to the storage order
|
|
418
|
+
*
|
|
419
|
+
* Before filling a given inner vector you must call the statVec(Index) function.
|
|
420
|
+
*
|
|
421
|
+
* After an insertion session, you should call the finalize() function.
|
|
422
|
+
*
|
|
423
|
+
* \sa insert, insertBackByOuterInner, startVec */
|
|
424
|
+
inline Scalar& insertBack(Index row, Index col) {
|
|
425
|
+
return insertBackByOuterInner(IsRowMajor ? row : col, IsRowMajor ? col : row);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** \internal
|
|
429
|
+
* \sa insertBack, startVec */
|
|
430
|
+
inline Scalar& insertBackByOuterInner(Index outer, Index inner) {
|
|
431
|
+
eigen_assert(Index(m_outerIndex[outer + 1]) == m_data.size() && "Invalid ordered insertion (invalid outer index)");
|
|
432
|
+
eigen_assert((m_outerIndex[outer + 1] - m_outerIndex[outer] == 0 || m_data.index(m_data.size() - 1) < inner) &&
|
|
433
|
+
"Invalid ordered insertion (invalid inner index)");
|
|
434
|
+
StorageIndex p = m_outerIndex[outer + 1];
|
|
435
|
+
++m_outerIndex[outer + 1];
|
|
436
|
+
m_data.append(Scalar(0), inner);
|
|
437
|
+
return m_data.value(p);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** \internal
|
|
441
|
+
* \warning use it only if you know what you are doing */
|
|
442
|
+
inline Scalar& insertBackByOuterInnerUnordered(Index outer, Index inner) {
|
|
443
|
+
StorageIndex p = m_outerIndex[outer + 1];
|
|
444
|
+
++m_outerIndex[outer + 1];
|
|
445
|
+
m_data.append(Scalar(0), inner);
|
|
446
|
+
return m_data.value(p);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** \internal
|
|
450
|
+
* \sa insertBack, insertBackByOuterInner */
|
|
451
|
+
inline void startVec(Index outer) {
|
|
452
|
+
eigen_assert(m_outerIndex[outer] == Index(m_data.size()) &&
|
|
453
|
+
"You must call startVec for each inner vector sequentially");
|
|
454
|
+
eigen_assert(m_outerIndex[outer + 1] == 0 && "You must call startVec for each inner vector sequentially");
|
|
455
|
+
m_outerIndex[outer + 1] = m_outerIndex[outer];
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/** \internal
|
|
459
|
+
* Must be called after inserting a set of non zero entries using the low level compressed API.
|
|
460
|
+
*/
|
|
461
|
+
inline void finalize() {
|
|
462
|
+
if (isCompressed()) {
|
|
463
|
+
StorageIndex size = internal::convert_index<StorageIndex>(m_data.size());
|
|
464
|
+
Index i = m_outerSize;
|
|
465
|
+
// find the last filled column
|
|
466
|
+
while (i >= 0 && m_outerIndex[i] == 0) --i;
|
|
467
|
+
++i;
|
|
468
|
+
while (i <= m_outerSize) {
|
|
469
|
+
m_outerIndex[i] = size;
|
|
470
|
+
++i;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// remove outer vectors j, j+1 ... j+num-1 and resize the matrix
|
|
476
|
+
void removeOuterVectors(Index j, Index num = 1) {
|
|
477
|
+
eigen_assert(num >= 0 && j >= 0 && j + num <= m_outerSize && "Invalid parameters");
|
|
478
|
+
|
|
479
|
+
const Index newRows = IsRowMajor ? m_outerSize - num : rows();
|
|
480
|
+
const Index newCols = IsRowMajor ? cols() : m_outerSize - num;
|
|
481
|
+
|
|
482
|
+
const Index begin = j + num;
|
|
483
|
+
const Index end = m_outerSize;
|
|
484
|
+
const Index target = j;
|
|
485
|
+
|
|
486
|
+
// if the removed vectors are not empty, uncompress the matrix
|
|
487
|
+
if (m_outerIndex[j + num] > m_outerIndex[j]) uncompress();
|
|
488
|
+
|
|
489
|
+
// shift m_outerIndex and m_innerNonZeros [num] to the left
|
|
490
|
+
internal::smart_memmove(m_outerIndex + begin, m_outerIndex + end + 1, m_outerIndex + target);
|
|
491
|
+
if (!isCompressed())
|
|
492
|
+
internal::smart_memmove(m_innerNonZeros + begin, m_innerNonZeros + end, m_innerNonZeros + target);
|
|
493
|
+
|
|
494
|
+
// if m_outerIndex[0] > 0, shift the data within the first vector while it is easy to do so
|
|
495
|
+
if (m_outerIndex[0] > StorageIndex(0)) {
|
|
496
|
+
uncompress();
|
|
497
|
+
const Index from = internal::convert_index<Index>(m_outerIndex[0]);
|
|
498
|
+
const Index to = Index(0);
|
|
499
|
+
const Index chunkSize = internal::convert_index<Index>(m_innerNonZeros[0]);
|
|
500
|
+
m_data.moveChunk(from, to, chunkSize);
|
|
501
|
+
m_outerIndex[0] = StorageIndex(0);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
// truncate the matrix to the smaller size
|
|
505
|
+
conservativeResize(newRows, newCols);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// insert empty outer vectors at indices j, j+1 ... j+num-1 and resize the matrix
|
|
509
|
+
void insertEmptyOuterVectors(Index j, Index num = 1) {
|
|
510
|
+
using std::fill_n;
|
|
511
|
+
eigen_assert(num >= 0 && j >= 0 && j < m_outerSize && "Invalid parameters");
|
|
512
|
+
|
|
513
|
+
const Index newRows = IsRowMajor ? m_outerSize + num : rows();
|
|
514
|
+
const Index newCols = IsRowMajor ? cols() : m_outerSize + num;
|
|
515
|
+
|
|
516
|
+
const Index begin = j;
|
|
517
|
+
const Index end = m_outerSize;
|
|
518
|
+
const Index target = j + num;
|
|
519
|
+
|
|
520
|
+
// expand the matrix to the larger size
|
|
521
|
+
conservativeResize(newRows, newCols);
|
|
522
|
+
|
|
523
|
+
// shift m_outerIndex and m_innerNonZeros [num] to the right
|
|
524
|
+
internal::smart_memmove(m_outerIndex + begin, m_outerIndex + end + 1, m_outerIndex + target);
|
|
525
|
+
// m_outerIndex[begin] == m_outerIndex[target], set all indices in this range to same value
|
|
526
|
+
fill_n(m_outerIndex + begin, num, m_outerIndex[begin]);
|
|
527
|
+
|
|
528
|
+
if (!isCompressed()) {
|
|
529
|
+
internal::smart_memmove(m_innerNonZeros + begin, m_innerNonZeros + end, m_innerNonZeros + target);
|
|
530
|
+
// set the nonzeros of the newly inserted vectors to 0
|
|
531
|
+
fill_n(m_innerNonZeros + begin, num, StorageIndex(0));
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
template <typename InputIterators>
|
|
536
|
+
void setFromTriplets(const InputIterators& begin, const InputIterators& end);
|
|
537
|
+
|
|
538
|
+
template <typename InputIterators, typename DupFunctor>
|
|
539
|
+
void setFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func);
|
|
540
|
+
|
|
541
|
+
template <typename Derived, typename DupFunctor>
|
|
542
|
+
void collapseDuplicates(DenseBase<Derived>& wi, DupFunctor dup_func = DupFunctor());
|
|
543
|
+
|
|
544
|
+
template <typename InputIterators>
|
|
545
|
+
void setFromSortedTriplets(const InputIterators& begin, const InputIterators& end);
|
|
546
|
+
|
|
547
|
+
template <typename InputIterators, typename DupFunctor>
|
|
548
|
+
void setFromSortedTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func);
|
|
549
|
+
|
|
550
|
+
template <typename InputIterators>
|
|
551
|
+
void insertFromTriplets(const InputIterators& begin, const InputIterators& end);
|
|
552
|
+
|
|
553
|
+
template <typename InputIterators, typename DupFunctor>
|
|
554
|
+
void insertFromTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func);
|
|
555
|
+
|
|
556
|
+
template <typename InputIterators>
|
|
557
|
+
void insertFromSortedTriplets(const InputIterators& begin, const InputIterators& end);
|
|
558
|
+
|
|
559
|
+
template <typename InputIterators, typename DupFunctor>
|
|
560
|
+
void insertFromSortedTriplets(const InputIterators& begin, const InputIterators& end, DupFunctor dup_func);
|
|
561
|
+
|
|
562
|
+
//---
|
|
563
|
+
|
|
564
|
+
/** \internal
|
|
565
|
+
* same as insert(Index,Index) except that the indices are given relative to the storage order */
|
|
566
|
+
Scalar& insertByOuterInner(Index j, Index i) {
|
|
567
|
+
eigen_assert(j >= 0 && j < m_outerSize && "invalid outer index");
|
|
568
|
+
eigen_assert(i >= 0 && i < m_innerSize && "invalid inner index");
|
|
569
|
+
Index start = m_outerIndex[j];
|
|
570
|
+
Index end = isCompressed() ? m_outerIndex[j + 1] : start + m_innerNonZeros[j];
|
|
571
|
+
Index dst = start == end ? end : m_data.searchLowerIndex(start, end, i);
|
|
572
|
+
if (dst == end) {
|
|
573
|
+
Index capacity = m_outerIndex[j + 1] - end;
|
|
574
|
+
if (capacity > 0) {
|
|
575
|
+
// implies uncompressed: push to back of vector
|
|
576
|
+
m_innerNonZeros[j]++;
|
|
577
|
+
m_data.index(end) = StorageIndex(i);
|
|
578
|
+
m_data.value(end) = Scalar(0);
|
|
579
|
+
return m_data.value(end);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
eigen_assert((dst == end || m_data.index(dst) != i) &&
|
|
583
|
+
"you cannot insert an element that already exists, you must call coeffRef to this end");
|
|
584
|
+
return insertAtByOuterInner(j, i, dst);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/** Turns the matrix into the \em compressed format.
|
|
588
|
+
*/
|
|
589
|
+
void makeCompressed() {
|
|
590
|
+
if (isCompressed()) return;
|
|
591
|
+
|
|
592
|
+
eigen_internal_assert(m_outerIndex != 0 && m_outerSize > 0);
|
|
593
|
+
|
|
594
|
+
StorageIndex start = m_outerIndex[1];
|
|
595
|
+
m_outerIndex[1] = m_innerNonZeros[0];
|
|
596
|
+
// try to move fewer, larger contiguous chunks
|
|
597
|
+
Index copyStart = start;
|
|
598
|
+
Index copyTarget = m_innerNonZeros[0];
|
|
599
|
+
for (Index j = 1; j < m_outerSize; j++) {
|
|
600
|
+
StorageIndex end = start + m_innerNonZeros[j];
|
|
601
|
+
StorageIndex nextStart = m_outerIndex[j + 1];
|
|
602
|
+
// dont forget to move the last chunk!
|
|
603
|
+
bool breakUpCopy = (end != nextStart) || (j == m_outerSize - 1);
|
|
604
|
+
if (breakUpCopy) {
|
|
605
|
+
Index chunkSize = end - copyStart;
|
|
606
|
+
if (chunkSize > 0) m_data.moveChunk(copyStart, copyTarget, chunkSize);
|
|
607
|
+
copyStart = nextStart;
|
|
608
|
+
copyTarget += chunkSize;
|
|
609
|
+
}
|
|
610
|
+
start = nextStart;
|
|
611
|
+
m_outerIndex[j + 1] = m_outerIndex[j] + m_innerNonZeros[j];
|
|
612
|
+
}
|
|
613
|
+
m_data.resize(m_outerIndex[m_outerSize]);
|
|
614
|
+
|
|
615
|
+
// release as much memory as possible
|
|
616
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
617
|
+
m_innerNonZeros = 0;
|
|
618
|
+
m_data.squeeze();
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** Turns the matrix into the uncompressed mode */
|
|
622
|
+
void uncompress() {
|
|
623
|
+
if (!isCompressed()) return;
|
|
624
|
+
m_innerNonZeros = internal::conditional_aligned_new_auto<StorageIndex, true>(m_outerSize);
|
|
625
|
+
if (m_outerIndex[m_outerSize] == 0) {
|
|
626
|
+
using std::fill_n;
|
|
627
|
+
fill_n(m_innerNonZeros, m_outerSize, StorageIndex(0));
|
|
628
|
+
} else {
|
|
629
|
+
for (Index j = 0; j < m_outerSize; j++) m_innerNonZeros[j] = m_outerIndex[j + 1] - m_outerIndex[j];
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** Suppresses all nonzeros which are \b much \b smaller \b than \a reference under the tolerance \a epsilon */
|
|
634
|
+
void prune(const Scalar& reference, const RealScalar& epsilon = NumTraits<RealScalar>::dummy_precision()) {
|
|
635
|
+
prune(default_prunning_func(reference, epsilon));
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** Turns the matrix into compressed format, and suppresses all nonzeros which do not satisfy the predicate \a keep.
|
|
639
|
+
* The functor type \a KeepFunc must implement the following function:
|
|
640
|
+
* \code
|
|
641
|
+
* bool operator() (const Index& row, const Index& col, const Scalar& value) const;
|
|
642
|
+
* \endcode
|
|
643
|
+
* \sa prune(Scalar,RealScalar)
|
|
644
|
+
*/
|
|
645
|
+
template <typename KeepFunc>
|
|
646
|
+
void prune(const KeepFunc& keep = KeepFunc()) {
|
|
647
|
+
StorageIndex k = 0;
|
|
648
|
+
for (Index j = 0; j < m_outerSize; ++j) {
|
|
649
|
+
StorageIndex previousStart = m_outerIndex[j];
|
|
650
|
+
if (isCompressed())
|
|
651
|
+
m_outerIndex[j] = k;
|
|
652
|
+
else
|
|
653
|
+
k = m_outerIndex[j];
|
|
654
|
+
StorageIndex end = isCompressed() ? m_outerIndex[j + 1] : previousStart + m_innerNonZeros[j];
|
|
655
|
+
for (StorageIndex i = previousStart; i < end; ++i) {
|
|
656
|
+
StorageIndex row = IsRowMajor ? StorageIndex(j) : m_data.index(i);
|
|
657
|
+
StorageIndex col = IsRowMajor ? m_data.index(i) : StorageIndex(j);
|
|
658
|
+
bool keepEntry = keep(row, col, m_data.value(i));
|
|
659
|
+
if (keepEntry) {
|
|
660
|
+
m_data.value(k) = m_data.value(i);
|
|
661
|
+
m_data.index(k) = m_data.index(i);
|
|
662
|
+
++k;
|
|
663
|
+
} else if (!isCompressed())
|
|
664
|
+
m_innerNonZeros[j]--;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
if (isCompressed()) {
|
|
668
|
+
m_outerIndex[m_outerSize] = k;
|
|
669
|
+
m_data.resize(k, 0);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** Resizes the matrix to a \a rows x \a cols matrix leaving old values untouched.
|
|
674
|
+
*
|
|
675
|
+
* If the sizes of the matrix are decreased, then the matrix is turned to \b uncompressed-mode
|
|
676
|
+
* and the storage of the out of bounds coefficients is kept and reserved.
|
|
677
|
+
* Call makeCompressed() to pack the entries and squeeze extra memory.
|
|
678
|
+
*
|
|
679
|
+
* \sa reserve(), setZero(), makeCompressed()
|
|
680
|
+
*/
|
|
681
|
+
void conservativeResize(Index rows, Index cols) {
|
|
682
|
+
// If one dimension is null, then there is nothing to be preserved
|
|
683
|
+
if (rows == 0 || cols == 0) return resize(rows, cols);
|
|
684
|
+
|
|
685
|
+
Index newOuterSize = IsRowMajor ? rows : cols;
|
|
686
|
+
Index newInnerSize = IsRowMajor ? cols : rows;
|
|
687
|
+
|
|
688
|
+
Index innerChange = newInnerSize - m_innerSize;
|
|
689
|
+
Index outerChange = newOuterSize - m_outerSize;
|
|
690
|
+
|
|
691
|
+
if (outerChange != 0) {
|
|
692
|
+
m_outerIndex = internal::conditional_aligned_realloc_new_auto<StorageIndex, true>(m_outerIndex, newOuterSize + 1,
|
|
693
|
+
m_outerSize + 1);
|
|
694
|
+
|
|
695
|
+
if (!isCompressed())
|
|
696
|
+
m_innerNonZeros = internal::conditional_aligned_realloc_new_auto<StorageIndex, true>(m_innerNonZeros,
|
|
697
|
+
newOuterSize, m_outerSize);
|
|
698
|
+
|
|
699
|
+
if (outerChange > 0) {
|
|
700
|
+
StorageIndex lastIdx = m_outerSize == 0 ? StorageIndex(0) : m_outerIndex[m_outerSize];
|
|
701
|
+
using std::fill_n;
|
|
702
|
+
fill_n(m_outerIndex + m_outerSize, outerChange + 1, lastIdx);
|
|
703
|
+
|
|
704
|
+
if (!isCompressed()) fill_n(m_innerNonZeros + m_outerSize, outerChange, StorageIndex(0));
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
m_outerSize = newOuterSize;
|
|
708
|
+
|
|
709
|
+
if (innerChange < 0) {
|
|
710
|
+
for (Index j = 0; j < m_outerSize; j++) {
|
|
711
|
+
Index start = m_outerIndex[j];
|
|
712
|
+
Index end = isCompressed() ? m_outerIndex[j + 1] : start + m_innerNonZeros[j];
|
|
713
|
+
Index lb = m_data.searchLowerIndex(start, end, newInnerSize);
|
|
714
|
+
if (lb != end) {
|
|
715
|
+
uncompress();
|
|
716
|
+
m_innerNonZeros[j] = StorageIndex(lb - start);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
m_innerSize = newInnerSize;
|
|
721
|
+
|
|
722
|
+
Index newSize = m_outerIndex[m_outerSize];
|
|
723
|
+
eigen_assert(newSize <= m_data.size());
|
|
724
|
+
m_data.resize(newSize);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/** Resizes the matrix to a \a rows x \a cols matrix and initializes it to zero.
|
|
728
|
+
*
|
|
729
|
+
* This function does not free the currently allocated memory. To release as much as memory as possible,
|
|
730
|
+
* call \code mat.data().squeeze(); \endcode after resizing it.
|
|
731
|
+
*
|
|
732
|
+
* \sa reserve(), setZero()
|
|
733
|
+
*/
|
|
734
|
+
void resize(Index rows, Index cols) {
|
|
735
|
+
const Index outerSize = IsRowMajor ? rows : cols;
|
|
736
|
+
m_innerSize = IsRowMajor ? cols : rows;
|
|
737
|
+
m_data.clear();
|
|
738
|
+
|
|
739
|
+
if ((m_outerIndex == 0) || (m_outerSize != outerSize)) {
|
|
740
|
+
m_outerIndex = internal::conditional_aligned_realloc_new_auto<StorageIndex, true>(m_outerIndex, outerSize + 1,
|
|
741
|
+
m_outerSize + 1);
|
|
742
|
+
m_outerSize = outerSize;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
746
|
+
m_innerNonZeros = 0;
|
|
747
|
+
|
|
748
|
+
using std::fill_n;
|
|
749
|
+
fill_n(m_outerIndex, m_outerSize + 1, StorageIndex(0));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/** \internal
|
|
753
|
+
* Resize the nonzero vector to \a size */
|
|
754
|
+
void resizeNonZeros(Index size) { m_data.resize(size); }
|
|
755
|
+
|
|
756
|
+
/** \returns a const expression of the diagonal coefficients. */
|
|
757
|
+
const ConstDiagonalReturnType diagonal() const { return ConstDiagonalReturnType(*this); }
|
|
758
|
+
|
|
759
|
+
/** \returns a read-write expression of the diagonal coefficients.
|
|
760
|
+
* \warning If the diagonal entries are written, then all diagonal
|
|
761
|
+
* entries \b must already exist, otherwise an assertion will be raised.
|
|
762
|
+
*/
|
|
763
|
+
DiagonalReturnType diagonal() { return DiagonalReturnType(*this); }
|
|
764
|
+
|
|
765
|
+
/** Default constructor yielding an empty \c 0 \c x \c 0 matrix */
|
|
766
|
+
inline SparseMatrix() : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) { resize(0, 0); }
|
|
767
|
+
|
|
768
|
+
/** Constructs a \a rows \c x \a cols empty matrix */
|
|
769
|
+
inline SparseMatrix(Index rows, Index cols) : m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
770
|
+
resize(rows, cols);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/** Constructs a sparse matrix from the sparse expression \a other */
|
|
774
|
+
template <typename OtherDerived>
|
|
775
|
+
inline SparseMatrix(const SparseMatrixBase<OtherDerived>& other)
|
|
776
|
+
: m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
777
|
+
EIGEN_STATIC_ASSERT(
|
|
778
|
+
(internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
|
|
779
|
+
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
|
780
|
+
const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit);
|
|
781
|
+
if (needToTranspose)
|
|
782
|
+
*this = other.derived();
|
|
783
|
+
else {
|
|
784
|
+
#ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
785
|
+
EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
786
|
+
#endif
|
|
787
|
+
internal::call_assignment_no_alias(*this, other.derived());
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/** Constructs a sparse matrix from the sparse selfadjoint view \a other */
|
|
792
|
+
template <typename OtherDerived, unsigned int UpLo>
|
|
793
|
+
inline SparseMatrix(const SparseSelfAdjointView<OtherDerived, UpLo>& other)
|
|
794
|
+
: m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
795
|
+
Base::operator=(other);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/** Move constructor */
|
|
799
|
+
inline SparseMatrix(SparseMatrix&& other) : SparseMatrix() { this->swap(other); }
|
|
800
|
+
|
|
801
|
+
template <typename OtherDerived>
|
|
802
|
+
inline SparseMatrix(SparseCompressedBase<OtherDerived>&& other) : SparseMatrix() {
|
|
803
|
+
*this = other.derived().markAsRValue();
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/** Copy constructor (it performs a deep copy) */
|
|
807
|
+
inline SparseMatrix(const SparseMatrix& other)
|
|
808
|
+
: Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
809
|
+
*this = other.derived();
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/** \brief Copy constructor with in-place evaluation */
|
|
813
|
+
template <typename OtherDerived>
|
|
814
|
+
SparseMatrix(const ReturnByValue<OtherDerived>& other)
|
|
815
|
+
: Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
816
|
+
initAssignment(other);
|
|
817
|
+
other.evalTo(*this);
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/** \brief Copy constructor with in-place evaluation */
|
|
821
|
+
template <typename OtherDerived>
|
|
822
|
+
explicit SparseMatrix(const DiagonalBase<OtherDerived>& other)
|
|
823
|
+
: Base(), m_outerSize(0), m_innerSize(0), m_outerIndex(0), m_innerNonZeros(0) {
|
|
824
|
+
*this = other.derived();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/** Swaps the content of two sparse matrices of the same type.
|
|
828
|
+
* This is a fast operation that simply swaps the underlying pointers and parameters. */
|
|
829
|
+
inline void swap(SparseMatrix& other) {
|
|
830
|
+
// EIGEN_DBG_SPARSE(std::cout << "SparseMatrix:: swap\n");
|
|
831
|
+
std::swap(m_outerIndex, other.m_outerIndex);
|
|
832
|
+
std::swap(m_innerSize, other.m_innerSize);
|
|
833
|
+
std::swap(m_outerSize, other.m_outerSize);
|
|
834
|
+
std::swap(m_innerNonZeros, other.m_innerNonZeros);
|
|
835
|
+
m_data.swap(other.m_data);
|
|
836
|
+
}
|
|
837
|
+
/** Free-function swap. */
|
|
838
|
+
friend EIGEN_DEVICE_FUNC void swap(SparseMatrix& a, SparseMatrix& b) { a.swap(b); }
|
|
839
|
+
|
|
840
|
+
/** Sets *this to the identity matrix.
|
|
841
|
+
* This function also turns the matrix into compressed mode, and drop any reserved memory. */
|
|
842
|
+
inline void setIdentity() {
|
|
843
|
+
eigen_assert(m_outerSize == m_innerSize && "ONLY FOR SQUARED MATRICES");
|
|
844
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
845
|
+
m_innerNonZeros = 0;
|
|
846
|
+
m_data.resize(m_outerSize);
|
|
847
|
+
// is it necessary to squeeze?
|
|
848
|
+
m_data.squeeze();
|
|
849
|
+
std::iota(m_outerIndex, m_outerIndex + m_outerSize + 1, StorageIndex(0));
|
|
850
|
+
std::iota(innerIndexPtr(), innerIndexPtr() + m_outerSize, StorageIndex(0));
|
|
851
|
+
using std::fill_n;
|
|
852
|
+
fill_n(valuePtr(), m_outerSize, Scalar(1));
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
inline SparseMatrix& operator=(const SparseMatrix& other) {
|
|
856
|
+
if (other.isRValue()) {
|
|
857
|
+
swap(other.const_cast_derived());
|
|
858
|
+
} else if (this != &other) {
|
|
859
|
+
#ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
860
|
+
EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
861
|
+
#endif
|
|
862
|
+
initAssignment(other);
|
|
863
|
+
if (other.isCompressed()) {
|
|
864
|
+
internal::smart_copy(other.m_outerIndex, other.m_outerIndex + m_outerSize + 1, m_outerIndex);
|
|
865
|
+
m_data = other.m_data;
|
|
866
|
+
} else {
|
|
867
|
+
Base::operator=(other);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
return *this;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
inline SparseMatrix& operator=(SparseMatrix&& other) {
|
|
874
|
+
this->swap(other);
|
|
875
|
+
return *this;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
template <typename OtherDerived>
|
|
879
|
+
inline SparseMatrix& operator=(const EigenBase<OtherDerived>& other) {
|
|
880
|
+
return Base::operator=(other.derived());
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
template <typename Lhs, typename Rhs>
|
|
884
|
+
inline SparseMatrix& operator=(const Product<Lhs, Rhs, AliasFreeProduct>& other);
|
|
885
|
+
|
|
886
|
+
template <typename OtherDerived>
|
|
887
|
+
EIGEN_DONT_INLINE SparseMatrix& operator=(const SparseMatrixBase<OtherDerived>& other);
|
|
888
|
+
|
|
889
|
+
template <typename OtherDerived>
|
|
890
|
+
inline SparseMatrix& operator=(SparseCompressedBase<OtherDerived>&& other) {
|
|
891
|
+
*this = other.derived().markAsRValue();
|
|
892
|
+
return *this;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
#ifndef EIGEN_NO_IO
|
|
896
|
+
friend std::ostream& operator<<(std::ostream& s, const SparseMatrix& m) {
|
|
897
|
+
EIGEN_DBG_SPARSE(
|
|
898
|
+
s << "Nonzero entries:\n"; if (m.isCompressed()) {
|
|
899
|
+
for (Index i = 0; i < m.nonZeros(); ++i) s << "(" << m.m_data.value(i) << "," << m.m_data.index(i) << ") ";
|
|
900
|
+
} else {
|
|
901
|
+
for (Index i = 0; i < m.outerSize(); ++i) {
|
|
902
|
+
Index p = m.m_outerIndex[i];
|
|
903
|
+
Index pe = m.m_outerIndex[i] + m.m_innerNonZeros[i];
|
|
904
|
+
Index k = p;
|
|
905
|
+
for (; k < pe; ++k) {
|
|
906
|
+
s << "(" << m.m_data.value(k) << "," << m.m_data.index(k) << ") ";
|
|
907
|
+
}
|
|
908
|
+
for (; k < m.m_outerIndex[i + 1]; ++k) {
|
|
909
|
+
s << "(_,_) ";
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
} s << std::endl;
|
|
913
|
+
s << std::endl; s << "Outer pointers:\n";
|
|
914
|
+
for (Index i = 0; i < m.outerSize(); ++i) { s << m.m_outerIndex[i] << " "; } s << " $" << std::endl;
|
|
915
|
+
if (!m.isCompressed()) {
|
|
916
|
+
s << "Inner non zeros:\n";
|
|
917
|
+
for (Index i = 0; i < m.outerSize(); ++i) {
|
|
918
|
+
s << m.m_innerNonZeros[i] << " ";
|
|
919
|
+
}
|
|
920
|
+
s << " $" << std::endl;
|
|
921
|
+
} s
|
|
922
|
+
<< std::endl;);
|
|
923
|
+
s << static_cast<const SparseMatrixBase<SparseMatrix>&>(m);
|
|
924
|
+
return s;
|
|
925
|
+
}
|
|
926
|
+
#endif
|
|
927
|
+
|
|
928
|
+
/** Destructor */
|
|
929
|
+
inline ~SparseMatrix() {
|
|
930
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_outerIndex, m_outerSize + 1);
|
|
931
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/** Overloaded for performance */
|
|
935
|
+
Scalar sum() const;
|
|
936
|
+
|
|
937
|
+
#ifdef EIGEN_SPARSEMATRIX_PLUGIN
|
|
938
|
+
#include EIGEN_SPARSEMATRIX_PLUGIN
|
|
939
|
+
#endif
|
|
940
|
+
|
|
941
|
+
protected:
|
|
942
|
+
template <typename Other>
|
|
943
|
+
void initAssignment(const Other& other) {
|
|
944
|
+
resize(other.rows(), other.cols());
|
|
945
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
946
|
+
m_innerNonZeros = 0;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/** \internal
|
|
950
|
+
* \sa insert(Index,Index) */
|
|
951
|
+
EIGEN_DEPRECATED EIGEN_DONT_INLINE Scalar& insertCompressed(Index row, Index col);
|
|
952
|
+
|
|
953
|
+
/** \internal
|
|
954
|
+
* A vector object that is equal to 0 everywhere but v at the position i */
|
|
955
|
+
class SingletonVector {
|
|
956
|
+
StorageIndex m_index;
|
|
957
|
+
StorageIndex m_value;
|
|
958
|
+
|
|
959
|
+
public:
|
|
960
|
+
typedef StorageIndex value_type;
|
|
961
|
+
SingletonVector(Index i, Index v) : m_index(convert_index(i)), m_value(convert_index(v)) {}
|
|
962
|
+
|
|
963
|
+
StorageIndex operator[](Index i) const { return i == m_index ? m_value : 0; }
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
/** \internal
|
|
967
|
+
* \sa insert(Index,Index) */
|
|
968
|
+
EIGEN_DEPRECATED EIGEN_DONT_INLINE Scalar& insertUncompressed(Index row, Index col);
|
|
969
|
+
|
|
970
|
+
public:
|
|
971
|
+
/** \internal
|
|
972
|
+
* \sa insert(Index,Index) */
|
|
973
|
+
EIGEN_STRONG_INLINE Scalar& insertBackUncompressed(Index row, Index col) {
|
|
974
|
+
const Index outer = IsRowMajor ? row : col;
|
|
975
|
+
const Index inner = IsRowMajor ? col : row;
|
|
976
|
+
|
|
977
|
+
eigen_assert(!isCompressed());
|
|
978
|
+
eigen_assert(m_innerNonZeros[outer] <= (m_outerIndex[outer + 1] - m_outerIndex[outer]));
|
|
979
|
+
|
|
980
|
+
Index p = m_outerIndex[outer] + m_innerNonZeros[outer]++;
|
|
981
|
+
m_data.index(p) = StorageIndex(inner);
|
|
982
|
+
m_data.value(p) = Scalar(0);
|
|
983
|
+
return m_data.value(p);
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
protected:
|
|
987
|
+
struct IndexPosPair {
|
|
988
|
+
IndexPosPair(Index a_i, Index a_p) : i(a_i), p(a_p) {}
|
|
989
|
+
Index i;
|
|
990
|
+
Index p;
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
/** \internal assign \a diagXpr to the diagonal of \c *this
|
|
994
|
+
* There are different strategies:
|
|
995
|
+
* 1 - if *this is overwritten (Func==assign_op) or *this is empty, then we can work treat *this as a dense vector
|
|
996
|
+
* expression. 2 - otherwise, for each diagonal coeff, 2.a - if it already exists, then we update it, 2.b - if the
|
|
997
|
+
* correct position is at the end of the vector, and there is capacity, push to back 2.b - otherwise, the insertion
|
|
998
|
+
* requires a data move, record insertion locations and handle in a second pass 3 - at the end, if some entries failed
|
|
999
|
+
* to be updated in-place, then we alloc a new buffer, copy each chunk at the right position, and insert the new
|
|
1000
|
+
* elements.
|
|
1001
|
+
*/
|
|
1002
|
+
template <typename DiagXpr, typename Func>
|
|
1003
|
+
void assignDiagonal(const DiagXpr diagXpr, const Func& assignFunc) {
|
|
1004
|
+
constexpr StorageIndex kEmptyIndexVal(-1);
|
|
1005
|
+
typedef typename ScalarVector::AlignedMapType ValueMap;
|
|
1006
|
+
|
|
1007
|
+
Index n = diagXpr.size();
|
|
1008
|
+
|
|
1009
|
+
const bool overwrite = internal::is_same<Func, internal::assign_op<Scalar, Scalar>>::value;
|
|
1010
|
+
if (overwrite) {
|
|
1011
|
+
if ((m_outerSize != n) || (m_innerSize != n)) resize(n, n);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (m_data.size() == 0 || overwrite) {
|
|
1015
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
1016
|
+
m_innerNonZeros = 0;
|
|
1017
|
+
resizeNonZeros(n);
|
|
1018
|
+
ValueMap valueMap(valuePtr(), n);
|
|
1019
|
+
std::iota(m_outerIndex, m_outerIndex + n + 1, StorageIndex(0));
|
|
1020
|
+
std::iota(innerIndexPtr(), innerIndexPtr() + n, StorageIndex(0));
|
|
1021
|
+
valueMap.setZero();
|
|
1022
|
+
internal::call_assignment_no_alias(valueMap, diagXpr, assignFunc);
|
|
1023
|
+
} else {
|
|
1024
|
+
internal::evaluator<DiagXpr> diaEval(diagXpr);
|
|
1025
|
+
|
|
1026
|
+
ei_declare_aligned_stack_constructed_variable(StorageIndex, tmp, n, 0);
|
|
1027
|
+
typename IndexVector::AlignedMapType insertionLocations(tmp, n);
|
|
1028
|
+
insertionLocations.setConstant(kEmptyIndexVal);
|
|
1029
|
+
|
|
1030
|
+
Index deferredInsertions = 0;
|
|
1031
|
+
Index shift = 0;
|
|
1032
|
+
|
|
1033
|
+
for (Index j = 0; j < n; j++) {
|
|
1034
|
+
Index begin = m_outerIndex[j];
|
|
1035
|
+
Index end = isCompressed() ? m_outerIndex[j + 1] : begin + m_innerNonZeros[j];
|
|
1036
|
+
Index capacity = m_outerIndex[j + 1] - end;
|
|
1037
|
+
Index dst = m_data.searchLowerIndex(begin, end, j);
|
|
1038
|
+
// the entry exists: update it now
|
|
1039
|
+
if (dst != end && m_data.index(dst) == StorageIndex(j))
|
|
1040
|
+
assignFunc.assignCoeff(m_data.value(dst), diaEval.coeff(j));
|
|
1041
|
+
// the entry belongs at the back of the vector: push to back
|
|
1042
|
+
else if (dst == end && capacity > 0)
|
|
1043
|
+
assignFunc.assignCoeff(insertBackUncompressed(j, j), diaEval.coeff(j));
|
|
1044
|
+
// the insertion requires a data move, record insertion location and handle in second pass
|
|
1045
|
+
else {
|
|
1046
|
+
insertionLocations.coeffRef(j) = StorageIndex(dst);
|
|
1047
|
+
deferredInsertions++;
|
|
1048
|
+
// if there is no capacity, all vectors to the right of this are shifted
|
|
1049
|
+
if (capacity == 0) shift++;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
if (deferredInsertions > 0) {
|
|
1054
|
+
m_data.resize(m_data.size() + shift);
|
|
1055
|
+
Index copyEnd = isCompressed() ? m_outerIndex[m_outerSize]
|
|
1056
|
+
: m_outerIndex[m_outerSize - 1] + m_innerNonZeros[m_outerSize - 1];
|
|
1057
|
+
for (Index j = m_outerSize - 1; deferredInsertions > 0; j--) {
|
|
1058
|
+
Index begin = m_outerIndex[j];
|
|
1059
|
+
Index end = isCompressed() ? m_outerIndex[j + 1] : begin + m_innerNonZeros[j];
|
|
1060
|
+
Index capacity = m_outerIndex[j + 1] - end;
|
|
1061
|
+
|
|
1062
|
+
bool doInsertion = insertionLocations(j) >= 0;
|
|
1063
|
+
bool breakUpCopy = doInsertion && (capacity > 0);
|
|
1064
|
+
// break up copy for sorted insertion into inactive nonzeros
|
|
1065
|
+
// optionally, add another criterium, i.e. 'breakUpCopy || (capacity > threhsold)'
|
|
1066
|
+
// where `threshold >= 0` to skip inactive nonzeros in each vector
|
|
1067
|
+
// this reduces the total number of copied elements, but requires more moveChunk calls
|
|
1068
|
+
if (breakUpCopy) {
|
|
1069
|
+
Index copyBegin = m_outerIndex[j + 1];
|
|
1070
|
+
Index to = copyBegin + shift;
|
|
1071
|
+
Index chunkSize = copyEnd - copyBegin;
|
|
1072
|
+
m_data.moveChunk(copyBegin, to, chunkSize);
|
|
1073
|
+
copyEnd = end;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
m_outerIndex[j + 1] += shift;
|
|
1077
|
+
|
|
1078
|
+
if (doInsertion) {
|
|
1079
|
+
// if there is capacity, shift into the inactive nonzeros
|
|
1080
|
+
if (capacity > 0) shift++;
|
|
1081
|
+
Index copyBegin = insertionLocations(j);
|
|
1082
|
+
Index to = copyBegin + shift;
|
|
1083
|
+
Index chunkSize = copyEnd - copyBegin;
|
|
1084
|
+
m_data.moveChunk(copyBegin, to, chunkSize);
|
|
1085
|
+
Index dst = to - 1;
|
|
1086
|
+
m_data.index(dst) = StorageIndex(j);
|
|
1087
|
+
m_data.value(dst) = Scalar(0);
|
|
1088
|
+
assignFunc.assignCoeff(m_data.value(dst), diaEval.coeff(j));
|
|
1089
|
+
if (!isCompressed()) m_innerNonZeros[j]++;
|
|
1090
|
+
shift--;
|
|
1091
|
+
deferredInsertions--;
|
|
1092
|
+
copyEnd = copyBegin;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
eigen_assert((shift == 0) && (deferredInsertions == 0));
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/* These functions are used to avoid a redundant binary search operation in functions such as coeffRef() and assume
|
|
1101
|
+
* `dst` is the appropriate sorted insertion point */
|
|
1102
|
+
EIGEN_STRONG_INLINE Scalar& insertAtByOuterInner(Index outer, Index inner, Index dst);
|
|
1103
|
+
Scalar& insertCompressedAtByOuterInner(Index outer, Index inner, Index dst);
|
|
1104
|
+
Scalar& insertUncompressedAtByOuterInner(Index outer, Index inner, Index dst);
|
|
1105
|
+
|
|
1106
|
+
private:
|
|
1107
|
+
EIGEN_STATIC_ASSERT(NumTraits<StorageIndex>::IsSigned, THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE)
|
|
1108
|
+
EIGEN_STATIC_ASSERT((Options & (ColMajor | RowMajor)) == Options, INVALID_MATRIX_TEMPLATE_PARAMETERS)
|
|
1109
|
+
|
|
1110
|
+
struct default_prunning_func {
|
|
1111
|
+
default_prunning_func(const Scalar& ref, const RealScalar& eps) : reference(ref), epsilon(eps) {}
|
|
1112
|
+
inline bool operator()(const Index&, const Index&, const Scalar& value) const {
|
|
1113
|
+
return !internal::isMuchSmallerThan(value, reference, epsilon);
|
|
1114
|
+
}
|
|
1115
|
+
Scalar reference;
|
|
1116
|
+
RealScalar epsilon;
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
namespace internal {
|
|
1121
|
+
|
|
1122
|
+
// Creates a compressed sparse matrix from a range of unsorted triplets
|
|
1123
|
+
// Requires temporary storage to handle duplicate entries
|
|
1124
|
+
template <typename InputIterator, typename SparseMatrixType, typename DupFunctor>
|
|
1125
|
+
void set_from_triplets(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat,
|
|
1126
|
+
DupFunctor dup_func) {
|
|
1127
|
+
constexpr bool IsRowMajor = SparseMatrixType::IsRowMajor;
|
|
1128
|
+
using StorageIndex = typename SparseMatrixType::StorageIndex;
|
|
1129
|
+
using IndexMap = typename VectorX<StorageIndex>::AlignedMapType;
|
|
1130
|
+
using TransposedSparseMatrix =
|
|
1131
|
+
SparseMatrix<typename SparseMatrixType::Scalar, IsRowMajor ? ColMajor : RowMajor, StorageIndex>;
|
|
1132
|
+
|
|
1133
|
+
if (begin == end) {
|
|
1134
|
+
// Clear out existing data (if any).
|
|
1135
|
+
mat.setZero();
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
// There are two strategies to consider for constructing a matrix from unordered triplets:
|
|
1140
|
+
// A) construct the 'mat' in its native storage order and sort in-place (less memory); or,
|
|
1141
|
+
// B) construct the transposed matrix and use an implicit sort upon assignment to `mat` (less time).
|
|
1142
|
+
// This routine uses B) for faster execution time.
|
|
1143
|
+
TransposedSparseMatrix trmat(mat.rows(), mat.cols());
|
|
1144
|
+
|
|
1145
|
+
// scan triplets to determine allocation size before constructing matrix
|
|
1146
|
+
Index nonZeros = 0;
|
|
1147
|
+
for (InputIterator it(begin); it != end; ++it) {
|
|
1148
|
+
eigen_assert(it->row() >= 0 && it->row() < mat.rows() && it->col() >= 0 && it->col() < mat.cols());
|
|
1149
|
+
StorageIndex j = convert_index<StorageIndex>(IsRowMajor ? it->col() : it->row());
|
|
1150
|
+
if (nonZeros == NumTraits<StorageIndex>::highest()) internal::throw_std_bad_alloc();
|
|
1151
|
+
trmat.outerIndexPtr()[j + 1]++;
|
|
1152
|
+
nonZeros++;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
std::partial_sum(trmat.outerIndexPtr(), trmat.outerIndexPtr() + trmat.outerSize() + 1, trmat.outerIndexPtr());
|
|
1156
|
+
eigen_assert(nonZeros == trmat.outerIndexPtr()[trmat.outerSize()]);
|
|
1157
|
+
trmat.resizeNonZeros(nonZeros);
|
|
1158
|
+
|
|
1159
|
+
// construct temporary array to track insertions (outersize) and collapse duplicates (innersize)
|
|
1160
|
+
ei_declare_aligned_stack_constructed_variable(StorageIndex, tmp, numext::maxi(mat.innerSize(), mat.outerSize()), 0);
|
|
1161
|
+
smart_copy(trmat.outerIndexPtr(), trmat.outerIndexPtr() + trmat.outerSize(), tmp);
|
|
1162
|
+
|
|
1163
|
+
// push triplets to back of each vector
|
|
1164
|
+
for (InputIterator it(begin); it != end; ++it) {
|
|
1165
|
+
StorageIndex j = convert_index<StorageIndex>(IsRowMajor ? it->col() : it->row());
|
|
1166
|
+
StorageIndex i = convert_index<StorageIndex>(IsRowMajor ? it->row() : it->col());
|
|
1167
|
+
StorageIndex k = tmp[j];
|
|
1168
|
+
trmat.data().index(k) = i;
|
|
1169
|
+
trmat.data().value(k) = it->value();
|
|
1170
|
+
tmp[j]++;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
IndexMap wi(tmp, trmat.innerSize());
|
|
1174
|
+
trmat.collapseDuplicates(wi, dup_func);
|
|
1175
|
+
// implicit sorting
|
|
1176
|
+
mat = trmat;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
// Creates a compressed sparse matrix from a sorted range of triplets
|
|
1180
|
+
template <typename InputIterator, typename SparseMatrixType, typename DupFunctor>
|
|
1181
|
+
void set_from_triplets_sorted(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat,
|
|
1182
|
+
DupFunctor dup_func) {
|
|
1183
|
+
constexpr bool IsRowMajor = SparseMatrixType::IsRowMajor;
|
|
1184
|
+
using StorageIndex = typename SparseMatrixType::StorageIndex;
|
|
1185
|
+
|
|
1186
|
+
if (begin == end) return;
|
|
1187
|
+
|
|
1188
|
+
constexpr StorageIndex kEmptyIndexValue(-1);
|
|
1189
|
+
// deallocate inner nonzeros if present and zero outerIndexPtr
|
|
1190
|
+
mat.resize(mat.rows(), mat.cols());
|
|
1191
|
+
// use outer indices to count non zero entries (excluding duplicate entries)
|
|
1192
|
+
StorageIndex previous_j = kEmptyIndexValue;
|
|
1193
|
+
StorageIndex previous_i = kEmptyIndexValue;
|
|
1194
|
+
// scan triplets to determine allocation size before constructing matrix
|
|
1195
|
+
Index nonZeros = 0;
|
|
1196
|
+
for (InputIterator it(begin); it != end; ++it) {
|
|
1197
|
+
eigen_assert(it->row() >= 0 && it->row() < mat.rows() && it->col() >= 0 && it->col() < mat.cols());
|
|
1198
|
+
StorageIndex j = convert_index<StorageIndex>(IsRowMajor ? it->row() : it->col());
|
|
1199
|
+
StorageIndex i = convert_index<StorageIndex>(IsRowMajor ? it->col() : it->row());
|
|
1200
|
+
eigen_assert(j > previous_j || (j == previous_j && i >= previous_i));
|
|
1201
|
+
// identify duplicates by examining previous location
|
|
1202
|
+
bool duplicate = (previous_j == j) && (previous_i == i);
|
|
1203
|
+
if (!duplicate) {
|
|
1204
|
+
if (nonZeros == NumTraits<StorageIndex>::highest()) internal::throw_std_bad_alloc();
|
|
1205
|
+
nonZeros++;
|
|
1206
|
+
mat.outerIndexPtr()[j + 1]++;
|
|
1207
|
+
previous_j = j;
|
|
1208
|
+
previous_i = i;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// finalize outer indices and allocate memory
|
|
1213
|
+
std::partial_sum(mat.outerIndexPtr(), mat.outerIndexPtr() + mat.outerSize() + 1, mat.outerIndexPtr());
|
|
1214
|
+
eigen_assert(nonZeros == mat.outerIndexPtr()[mat.outerSize()]);
|
|
1215
|
+
mat.resizeNonZeros(nonZeros);
|
|
1216
|
+
|
|
1217
|
+
previous_i = kEmptyIndexValue;
|
|
1218
|
+
previous_j = kEmptyIndexValue;
|
|
1219
|
+
Index back = 0;
|
|
1220
|
+
for (InputIterator it(begin); it != end; ++it) {
|
|
1221
|
+
StorageIndex j = convert_index<StorageIndex>(IsRowMajor ? it->row() : it->col());
|
|
1222
|
+
StorageIndex i = convert_index<StorageIndex>(IsRowMajor ? it->col() : it->row());
|
|
1223
|
+
bool duplicate = (previous_j == j) && (previous_i == i);
|
|
1224
|
+
if (duplicate) {
|
|
1225
|
+
mat.data().value(back - 1) = dup_func(mat.data().value(back - 1), it->value());
|
|
1226
|
+
} else {
|
|
1227
|
+
// push triplets to back
|
|
1228
|
+
mat.data().index(back) = i;
|
|
1229
|
+
mat.data().value(back) = it->value();
|
|
1230
|
+
previous_j = j;
|
|
1231
|
+
previous_i = i;
|
|
1232
|
+
back++;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
eigen_assert(back == nonZeros);
|
|
1236
|
+
// matrix is finalized
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
// thin wrapper around a generic binary functor to use the sparse disjunction evaluator instead of the default
|
|
1240
|
+
// "arithmetic" evaluator
|
|
1241
|
+
template <typename DupFunctor, typename LhsScalar, typename RhsScalar = LhsScalar>
|
|
1242
|
+
struct scalar_disjunction_op {
|
|
1243
|
+
using result_type = typename result_of<DupFunctor(LhsScalar, RhsScalar)>::type;
|
|
1244
|
+
scalar_disjunction_op(const DupFunctor& op) : m_functor(op) {}
|
|
1245
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator()(const LhsScalar& a, const RhsScalar& b) const {
|
|
1246
|
+
return m_functor(a, b);
|
|
1247
|
+
}
|
|
1248
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const DupFunctor& functor() const { return m_functor; }
|
|
1249
|
+
const DupFunctor& m_functor;
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
template <typename DupFunctor, typename LhsScalar, typename RhsScalar>
|
|
1253
|
+
struct functor_traits<scalar_disjunction_op<DupFunctor, LhsScalar, RhsScalar>> : public functor_traits<DupFunctor> {};
|
|
1254
|
+
|
|
1255
|
+
// Creates a compressed sparse matrix from its existing entries and those from an unsorted range of triplets
|
|
1256
|
+
template <typename InputIterator, typename SparseMatrixType, typename DupFunctor>
|
|
1257
|
+
void insert_from_triplets(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat,
|
|
1258
|
+
DupFunctor dup_func) {
|
|
1259
|
+
using Scalar = typename SparseMatrixType::Scalar;
|
|
1260
|
+
using SrcXprType =
|
|
1261
|
+
CwiseBinaryOp<scalar_disjunction_op<DupFunctor, Scalar>, const SparseMatrixType, const SparseMatrixType>;
|
|
1262
|
+
|
|
1263
|
+
// set_from_triplets is necessary to sort the inner indices and remove the duplicate entries
|
|
1264
|
+
SparseMatrixType trips(mat.rows(), mat.cols());
|
|
1265
|
+
set_from_triplets(begin, end, trips, dup_func);
|
|
1266
|
+
|
|
1267
|
+
SrcXprType src = mat.binaryExpr(trips, scalar_disjunction_op<DupFunctor, Scalar>(dup_func));
|
|
1268
|
+
// the sparse assignment procedure creates a temporary matrix and swaps the final result
|
|
1269
|
+
assign_sparse_to_sparse<SparseMatrixType, SrcXprType>(mat, src);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// Creates a compressed sparse matrix from its existing entries and those from an sorted range of triplets
|
|
1273
|
+
template <typename InputIterator, typename SparseMatrixType, typename DupFunctor>
|
|
1274
|
+
void insert_from_triplets_sorted(const InputIterator& begin, const InputIterator& end, SparseMatrixType& mat,
|
|
1275
|
+
DupFunctor dup_func) {
|
|
1276
|
+
using Scalar = typename SparseMatrixType::Scalar;
|
|
1277
|
+
using SrcXprType =
|
|
1278
|
+
CwiseBinaryOp<scalar_disjunction_op<DupFunctor, Scalar>, const SparseMatrixType, const SparseMatrixType>;
|
|
1279
|
+
|
|
1280
|
+
// TODO: process triplets without making a copy
|
|
1281
|
+
SparseMatrixType trips(mat.rows(), mat.cols());
|
|
1282
|
+
set_from_triplets_sorted(begin, end, trips, dup_func);
|
|
1283
|
+
|
|
1284
|
+
SrcXprType src = mat.binaryExpr(trips, scalar_disjunction_op<DupFunctor, Scalar>(dup_func));
|
|
1285
|
+
// the sparse assignment procedure creates a temporary matrix and swaps the final result
|
|
1286
|
+
assign_sparse_to_sparse<SparseMatrixType, SrcXprType>(mat, src);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
} // namespace internal
|
|
1290
|
+
|
|
1291
|
+
/** Fill the matrix \c *this with the list of \em triplets defined in the half-open range from \a begin to \a end.
|
|
1292
|
+
*
|
|
1293
|
+
* A \em triplet is a tuple (i,j,value) defining a non-zero element.
|
|
1294
|
+
* The input list of triplets does not have to be sorted, and may contain duplicated elements.
|
|
1295
|
+
* In any case, the result is a \b sorted and \b compressed sparse matrix where the duplicates have been summed up.
|
|
1296
|
+
* This is a \em O(n) operation, with \em n the number of triplet elements.
|
|
1297
|
+
* The initial contents of \c *this are destroyed.
|
|
1298
|
+
* The matrix \c *this must be properly resized beforehand using the SparseMatrix(Index,Index) constructor,
|
|
1299
|
+
* or the resize(Index,Index) method. The sizes are not extracted from the triplet list.
|
|
1300
|
+
*
|
|
1301
|
+
* The \a InputIterators value_type must provide the following interface:
|
|
1302
|
+
* \code
|
|
1303
|
+
* Scalar value() const; // the value
|
|
1304
|
+
* IndexType row() const; // the row index i
|
|
1305
|
+
* IndexType col() const; // the column index j
|
|
1306
|
+
* \endcode
|
|
1307
|
+
* See for instance the Eigen::Triplet template class.
|
|
1308
|
+
*
|
|
1309
|
+
* Here is a typical usage example:
|
|
1310
|
+
* \code
|
|
1311
|
+
typedef Triplet<double> T;
|
|
1312
|
+
std::vector<T> tripletList;
|
|
1313
|
+
tripletList.reserve(estimation_of_entries);
|
|
1314
|
+
for(...)
|
|
1315
|
+
{
|
|
1316
|
+
// ...
|
|
1317
|
+
tripletList.push_back(T(i,j,v_ij));
|
|
1318
|
+
}
|
|
1319
|
+
SparseMatrixType m(rows,cols);
|
|
1320
|
+
m.setFromTriplets(tripletList.begin(), tripletList.end());
|
|
1321
|
+
// m is ready to go!
|
|
1322
|
+
* \endcode
|
|
1323
|
+
*
|
|
1324
|
+
* \warning The list of triplets is read multiple times (at least twice). Therefore, it is not recommended to define
|
|
1325
|
+
* an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather
|
|
1326
|
+
* be explicitly stored into a std::vector for instance.
|
|
1327
|
+
*/
|
|
1328
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1329
|
+
template <typename InputIterators>
|
|
1330
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::setFromTriplets(const InputIterators& begin,
|
|
1331
|
+
const InputIterators& end) {
|
|
1332
|
+
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>>(
|
|
1333
|
+
begin, end, *this, internal::scalar_sum_op<Scalar, Scalar>());
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/** The same as setFromTriplets but when duplicates are met the functor \a dup_func is applied:
|
|
1337
|
+
* \code
|
|
1338
|
+
* value = dup_func(OldValue, NewValue)
|
|
1339
|
+
* \endcode
|
|
1340
|
+
* Here is a C++11 example keeping the latest entry only:
|
|
1341
|
+
* \code
|
|
1342
|
+
* mat.setFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });
|
|
1343
|
+
* \endcode
|
|
1344
|
+
*/
|
|
1345
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1346
|
+
template <typename InputIterators, typename DupFunctor>
|
|
1347
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::setFromTriplets(const InputIterators& begin,
|
|
1348
|
+
const InputIterators& end, DupFunctor dup_func) {
|
|
1349
|
+
internal::set_from_triplets<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>, DupFunctor>(
|
|
1350
|
+
begin, end, *this, dup_func);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
/** The same as setFromTriplets but triplets are assumed to be pre-sorted. This is faster and requires less temporary
|
|
1354
|
+
* storage. Two triplets `a` and `b` are appropriately ordered if: \code ColMajor: ((a.col() != b.col()) ? (a.col() <
|
|
1355
|
+
* b.col()) : (a.row() < b.row()) RowMajor: ((a.row() != b.row()) ? (a.row() < b.row()) : (a.col() < b.col()) \endcode
|
|
1356
|
+
*/
|
|
1357
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1358
|
+
template <typename InputIterators>
|
|
1359
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::setFromSortedTriplets(const InputIterators& begin,
|
|
1360
|
+
const InputIterators& end) {
|
|
1361
|
+
internal::set_from_triplets_sorted<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>>(
|
|
1362
|
+
begin, end, *this, internal::scalar_sum_op<Scalar, Scalar>());
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/** The same as setFromSortedTriplets but when duplicates are met the functor \a dup_func is applied:
|
|
1366
|
+
* \code
|
|
1367
|
+
* value = dup_func(OldValue, NewValue)
|
|
1368
|
+
* \endcode
|
|
1369
|
+
* Here is a C++11 example keeping the latest entry only:
|
|
1370
|
+
* \code
|
|
1371
|
+
* mat.setFromSortedTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });
|
|
1372
|
+
* \endcode
|
|
1373
|
+
*/
|
|
1374
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1375
|
+
template <typename InputIterators, typename DupFunctor>
|
|
1376
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::setFromSortedTriplets(const InputIterators& begin,
|
|
1377
|
+
const InputIterators& end,
|
|
1378
|
+
DupFunctor dup_func) {
|
|
1379
|
+
internal::set_from_triplets_sorted<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>, DupFunctor>(
|
|
1380
|
+
begin, end, *this, dup_func);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/** Insert a batch of elements into the matrix \c *this with the list of \em triplets defined in the half-open range
|
|
1384
|
+
from \a begin to \a end.
|
|
1385
|
+
*
|
|
1386
|
+
* A \em triplet is a tuple (i,j,value) defining a non-zero element.
|
|
1387
|
+
* The input list of triplets does not have to be sorted, and may contain duplicated elements.
|
|
1388
|
+
* In any case, the result is a \b sorted and \b compressed sparse matrix where the duplicates have been summed up.
|
|
1389
|
+
* This is a \em O(n) operation, with \em n the number of triplet elements.
|
|
1390
|
+
* The initial contents of \c *this are preserved (except for the summation of duplicate elements).
|
|
1391
|
+
* The matrix \c *this must be properly sized beforehand. The sizes are not extracted from the triplet list.
|
|
1392
|
+
*
|
|
1393
|
+
* The \a InputIterators value_type must provide the following interface:
|
|
1394
|
+
* \code
|
|
1395
|
+
* Scalar value() const; // the value
|
|
1396
|
+
* IndexType row() const; // the row index i
|
|
1397
|
+
* IndexType col() const; // the column index j
|
|
1398
|
+
* \endcode
|
|
1399
|
+
* See for instance the Eigen::Triplet template class.
|
|
1400
|
+
*
|
|
1401
|
+
* Here is a typical usage example:
|
|
1402
|
+
* \code
|
|
1403
|
+
SparseMatrixType m(rows,cols); // m contains nonzero entries
|
|
1404
|
+
typedef Triplet<double> T;
|
|
1405
|
+
std::vector<T> tripletList;
|
|
1406
|
+
tripletList.reserve(estimation_of_entries);
|
|
1407
|
+
for(...)
|
|
1408
|
+
{
|
|
1409
|
+
// ...
|
|
1410
|
+
tripletList.push_back(T(i,j,v_ij));
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
m.insertFromTriplets(tripletList.begin(), tripletList.end());
|
|
1414
|
+
// m is ready to go!
|
|
1415
|
+
* \endcode
|
|
1416
|
+
*
|
|
1417
|
+
* \warning The list of triplets is read multiple times (at least twice). Therefore, it is not recommended to define
|
|
1418
|
+
* an abstract iterator over a complex data-structure that would be expensive to evaluate. The triplets should rather
|
|
1419
|
+
* be explicitly stored into a std::vector for instance.
|
|
1420
|
+
*/
|
|
1421
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1422
|
+
template <typename InputIterators>
|
|
1423
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::insertFromTriplets(const InputIterators& begin,
|
|
1424
|
+
const InputIterators& end) {
|
|
1425
|
+
internal::insert_from_triplets<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>>(
|
|
1426
|
+
begin, end, *this, internal::scalar_sum_op<Scalar, Scalar>());
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
/** The same as insertFromTriplets but when duplicates are met the functor \a dup_func is applied:
|
|
1430
|
+
* \code
|
|
1431
|
+
* value = dup_func(OldValue, NewValue)
|
|
1432
|
+
* \endcode
|
|
1433
|
+
* Here is a C++11 example keeping the latest entry only:
|
|
1434
|
+
* \code
|
|
1435
|
+
* mat.insertFromTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });
|
|
1436
|
+
* \endcode
|
|
1437
|
+
*/
|
|
1438
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1439
|
+
template <typename InputIterators, typename DupFunctor>
|
|
1440
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::insertFromTriplets(const InputIterators& begin,
|
|
1441
|
+
const InputIterators& end, DupFunctor dup_func) {
|
|
1442
|
+
internal::insert_from_triplets<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>, DupFunctor>(
|
|
1443
|
+
begin, end, *this, dup_func);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
/** The same as insertFromTriplets but triplets are assumed to be pre-sorted. This is faster and requires less temporary
|
|
1447
|
+
* storage. Two triplets `a` and `b` are appropriately ordered if: \code ColMajor: ((a.col() != b.col()) ? (a.col() <
|
|
1448
|
+
* b.col()) : (a.row() < b.row()) RowMajor: ((a.row() != b.row()) ? (a.row() < b.row()) : (a.col() < b.col()) \endcode
|
|
1449
|
+
*/
|
|
1450
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1451
|
+
template <typename InputIterators>
|
|
1452
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::insertFromSortedTriplets(const InputIterators& begin,
|
|
1453
|
+
const InputIterators& end) {
|
|
1454
|
+
internal::insert_from_triplets_sorted<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>>(
|
|
1455
|
+
begin, end, *this, internal::scalar_sum_op<Scalar, Scalar>());
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
/** The same as insertFromSortedTriplets but when duplicates are met the functor \a dup_func is applied:
|
|
1459
|
+
* \code
|
|
1460
|
+
* value = dup_func(OldValue, NewValue)
|
|
1461
|
+
* \endcode
|
|
1462
|
+
* Here is a C++11 example keeping the latest entry only:
|
|
1463
|
+
* \code
|
|
1464
|
+
* mat.insertFromSortedTriplets(triplets.begin(), triplets.end(), [] (const Scalar&,const Scalar &b) { return b; });
|
|
1465
|
+
* \endcode
|
|
1466
|
+
*/
|
|
1467
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1468
|
+
template <typename InputIterators, typename DupFunctor>
|
|
1469
|
+
void SparseMatrix<Scalar, Options_, StorageIndex_>::insertFromSortedTriplets(const InputIterators& begin,
|
|
1470
|
+
const InputIterators& end,
|
|
1471
|
+
DupFunctor dup_func) {
|
|
1472
|
+
internal::insert_from_triplets_sorted<InputIterators, SparseMatrix<Scalar, Options_, StorageIndex_>, DupFunctor>(
|
|
1473
|
+
begin, end, *this, dup_func);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
/** \internal */
|
|
1477
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1478
|
+
template <typename Derived, typename DupFunctor>
|
|
1479
|
+
void SparseMatrix<Scalar_, Options_, StorageIndex_>::collapseDuplicates(DenseBase<Derived>& wi, DupFunctor dup_func) {
|
|
1480
|
+
// removes duplicate entries and compresses the matrix
|
|
1481
|
+
// the excess allocated memory is not released
|
|
1482
|
+
// the inner indices do not need to be sorted, nor is the matrix returned in a sorted state
|
|
1483
|
+
eigen_assert(wi.size() == m_innerSize);
|
|
1484
|
+
constexpr StorageIndex kEmptyIndexValue(-1);
|
|
1485
|
+
wi.setConstant(kEmptyIndexValue);
|
|
1486
|
+
StorageIndex count = 0;
|
|
1487
|
+
const bool is_compressed = isCompressed();
|
|
1488
|
+
// for each inner-vector, wi[inner_index] will hold the position of first element into the index/value buffers
|
|
1489
|
+
for (Index j = 0; j < m_outerSize; ++j) {
|
|
1490
|
+
const StorageIndex newBegin = count;
|
|
1491
|
+
const StorageIndex end = is_compressed ? m_outerIndex[j + 1] : m_outerIndex[j] + m_innerNonZeros[j];
|
|
1492
|
+
for (StorageIndex k = m_outerIndex[j]; k < end; ++k) {
|
|
1493
|
+
StorageIndex i = m_data.index(k);
|
|
1494
|
+
if (wi(i) >= newBegin) {
|
|
1495
|
+
// entry at k is a duplicate
|
|
1496
|
+
// accumulate it into the primary entry located at wi(i)
|
|
1497
|
+
m_data.value(wi(i)) = dup_func(m_data.value(wi(i)), m_data.value(k));
|
|
1498
|
+
} else {
|
|
1499
|
+
// k is the primary entry in j with inner index i
|
|
1500
|
+
// shift it to the left and record its location at wi(i)
|
|
1501
|
+
m_data.index(count) = i;
|
|
1502
|
+
m_data.value(count) = m_data.value(k);
|
|
1503
|
+
wi(i) = count;
|
|
1504
|
+
++count;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
m_outerIndex[j] = newBegin;
|
|
1508
|
+
}
|
|
1509
|
+
m_outerIndex[m_outerSize] = count;
|
|
1510
|
+
m_data.resize(count);
|
|
1511
|
+
|
|
1512
|
+
// turn the matrix into compressed form (if it is not already)
|
|
1513
|
+
internal::conditional_aligned_delete_auto<StorageIndex, true>(m_innerNonZeros, m_outerSize);
|
|
1514
|
+
m_innerNonZeros = 0;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
/** \internal */
|
|
1518
|
+
template <typename Scalar, int Options_, typename StorageIndex_>
|
|
1519
|
+
template <typename OtherDerived>
|
|
1520
|
+
EIGEN_DONT_INLINE SparseMatrix<Scalar, Options_, StorageIndex_>&
|
|
1521
|
+
SparseMatrix<Scalar, Options_, StorageIndex_>::operator=(const SparseMatrixBase<OtherDerived>& other) {
|
|
1522
|
+
EIGEN_STATIC_ASSERT(
|
|
1523
|
+
(internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
|
|
1524
|
+
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
|
1525
|
+
|
|
1526
|
+
#ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
1527
|
+
EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
|
|
1528
|
+
#endif
|
|
1529
|
+
|
|
1530
|
+
const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit);
|
|
1531
|
+
if (needToTranspose) {
|
|
1532
|
+
#ifdef EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN
|
|
1533
|
+
EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN
|
|
1534
|
+
#endif
|
|
1535
|
+
// two passes algorithm:
|
|
1536
|
+
// 1 - compute the number of coeffs per dest inner vector
|
|
1537
|
+
// 2 - do the actual copy/eval
|
|
1538
|
+
// Since each coeff of the rhs has to be evaluated twice, let's evaluate it if needed
|
|
1539
|
+
typedef
|
|
1540
|
+
typename internal::nested_eval<OtherDerived, 2, typename internal::plain_matrix_type<OtherDerived>::type>::type
|
|
1541
|
+
OtherCopy;
|
|
1542
|
+
typedef internal::remove_all_t<OtherCopy> OtherCopy_;
|
|
1543
|
+
typedef internal::evaluator<OtherCopy_> OtherCopyEval;
|
|
1544
|
+
OtherCopy otherCopy(other.derived());
|
|
1545
|
+
OtherCopyEval otherCopyEval(otherCopy);
|
|
1546
|
+
|
|
1547
|
+
SparseMatrix dest(other.rows(), other.cols());
|
|
1548
|
+
Eigen::Map<IndexVector>(dest.m_outerIndex, dest.outerSize()).setZero();
|
|
1549
|
+
|
|
1550
|
+
// pass 1
|
|
1551
|
+
// FIXME the above copy could be merged with that pass
|
|
1552
|
+
for (Index j = 0; j < otherCopy.outerSize(); ++j)
|
|
1553
|
+
for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it) ++dest.m_outerIndex[it.index()];
|
|
1554
|
+
|
|
1555
|
+
// prefix sum
|
|
1556
|
+
StorageIndex count = 0;
|
|
1557
|
+
IndexVector positions(dest.outerSize());
|
|
1558
|
+
for (Index j = 0; j < dest.outerSize(); ++j) {
|
|
1559
|
+
StorageIndex tmp = dest.m_outerIndex[j];
|
|
1560
|
+
dest.m_outerIndex[j] = count;
|
|
1561
|
+
positions[j] = count;
|
|
1562
|
+
count += tmp;
|
|
1563
|
+
}
|
|
1564
|
+
dest.m_outerIndex[dest.outerSize()] = count;
|
|
1565
|
+
// alloc
|
|
1566
|
+
dest.m_data.resize(count);
|
|
1567
|
+
// pass 2
|
|
1568
|
+
for (StorageIndex j = 0; j < otherCopy.outerSize(); ++j) {
|
|
1569
|
+
for (typename OtherCopyEval::InnerIterator it(otherCopyEval, j); it; ++it) {
|
|
1570
|
+
Index pos = positions[it.index()]++;
|
|
1571
|
+
dest.m_data.index(pos) = j;
|
|
1572
|
+
dest.m_data.value(pos) = it.value();
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
this->swap(dest);
|
|
1576
|
+
return *this;
|
|
1577
|
+
} else {
|
|
1578
|
+
if (other.isRValue()) {
|
|
1579
|
+
initAssignment(other.derived());
|
|
1580
|
+
}
|
|
1581
|
+
// there is no special optimization
|
|
1582
|
+
return Base::operator=(other.derived());
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1587
|
+
inline typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1588
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insert(Index row, Index col) {
|
|
1589
|
+
return insertByOuterInner(IsRowMajor ? row : col, IsRowMajor ? col : row);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1593
|
+
EIGEN_STRONG_INLINE typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1594
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insertAtByOuterInner(Index outer, Index inner, Index dst) {
|
|
1595
|
+
// random insertion into compressed matrix is very slow
|
|
1596
|
+
uncompress();
|
|
1597
|
+
return insertUncompressedAtByOuterInner(outer, inner, dst);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1601
|
+
EIGEN_DEPRECATED EIGEN_DONT_INLINE typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1602
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insertUncompressed(Index row, Index col) {
|
|
1603
|
+
eigen_assert(!isCompressed());
|
|
1604
|
+
Index outer = IsRowMajor ? row : col;
|
|
1605
|
+
Index inner = IsRowMajor ? col : row;
|
|
1606
|
+
Index start = m_outerIndex[outer];
|
|
1607
|
+
Index end = start + m_innerNonZeros[outer];
|
|
1608
|
+
Index dst = start == end ? end : m_data.searchLowerIndex(start, end, inner);
|
|
1609
|
+
if (dst == end) {
|
|
1610
|
+
Index capacity = m_outerIndex[outer + 1] - end;
|
|
1611
|
+
if (capacity > 0) {
|
|
1612
|
+
// implies uncompressed: push to back of vector
|
|
1613
|
+
m_innerNonZeros[outer]++;
|
|
1614
|
+
m_data.index(end) = StorageIndex(inner);
|
|
1615
|
+
m_data.value(end) = Scalar(0);
|
|
1616
|
+
return m_data.value(end);
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
eigen_assert((dst == end || m_data.index(dst) != inner) &&
|
|
1620
|
+
"you cannot insert an element that already exists, you must call coeffRef to this end");
|
|
1621
|
+
return insertUncompressedAtByOuterInner(outer, inner, dst);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1625
|
+
EIGEN_DEPRECATED EIGEN_DONT_INLINE typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1626
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insertCompressed(Index row, Index col) {
|
|
1627
|
+
eigen_assert(isCompressed());
|
|
1628
|
+
Index outer = IsRowMajor ? row : col;
|
|
1629
|
+
Index inner = IsRowMajor ? col : row;
|
|
1630
|
+
Index start = m_outerIndex[outer];
|
|
1631
|
+
Index end = m_outerIndex[outer + 1];
|
|
1632
|
+
Index dst = start == end ? end : m_data.searchLowerIndex(start, end, inner);
|
|
1633
|
+
eigen_assert((dst == end || m_data.index(dst) != inner) &&
|
|
1634
|
+
"you cannot insert an element that already exists, you must call coeffRef to this end");
|
|
1635
|
+
return insertCompressedAtByOuterInner(outer, inner, dst);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1639
|
+
typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1640
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insertCompressedAtByOuterInner(Index outer, Index inner, Index dst) {
|
|
1641
|
+
eigen_assert(isCompressed());
|
|
1642
|
+
// compressed insertion always requires expanding the buffer
|
|
1643
|
+
// first, check if there is adequate allocated memory
|
|
1644
|
+
if (m_data.allocatedSize() <= m_data.size()) {
|
|
1645
|
+
// if there is no capacity for a single insertion, double the capacity
|
|
1646
|
+
// increase capacity by a minimum of 32
|
|
1647
|
+
Index minReserve = 32;
|
|
1648
|
+
Index reserveSize = numext::maxi(minReserve, m_data.allocatedSize());
|
|
1649
|
+
m_data.reserve(reserveSize);
|
|
1650
|
+
}
|
|
1651
|
+
m_data.resize(m_data.size() + 1);
|
|
1652
|
+
Index chunkSize = m_outerIndex[m_outerSize] - dst;
|
|
1653
|
+
// shift the existing data to the right if necessary
|
|
1654
|
+
m_data.moveChunk(dst, dst + 1, chunkSize);
|
|
1655
|
+
// update nonzero counts
|
|
1656
|
+
// potentially O(outerSize) bottleneck!
|
|
1657
|
+
for (Index j = outer; j < m_outerSize; j++) m_outerIndex[j + 1]++;
|
|
1658
|
+
// initialize the coefficient
|
|
1659
|
+
m_data.index(dst) = StorageIndex(inner);
|
|
1660
|
+
m_data.value(dst) = Scalar(0);
|
|
1661
|
+
// return a reference to the coefficient
|
|
1662
|
+
return m_data.value(dst);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1666
|
+
typename SparseMatrix<Scalar_, Options_, StorageIndex_>::Scalar&
|
|
1667
|
+
SparseMatrix<Scalar_, Options_, StorageIndex_>::insertUncompressedAtByOuterInner(Index outer, Index inner, Index dst) {
|
|
1668
|
+
eigen_assert(!isCompressed());
|
|
1669
|
+
// find a vector with capacity, starting at `outer` and searching to the left and right
|
|
1670
|
+
for (Index leftTarget = outer - 1, rightTarget = outer; (leftTarget >= 0) || (rightTarget < m_outerSize);) {
|
|
1671
|
+
if (rightTarget < m_outerSize) {
|
|
1672
|
+
Index start = m_outerIndex[rightTarget];
|
|
1673
|
+
Index end = start + m_innerNonZeros[rightTarget];
|
|
1674
|
+
Index nextStart = m_outerIndex[rightTarget + 1];
|
|
1675
|
+
Index capacity = nextStart - end;
|
|
1676
|
+
if (capacity > 0) {
|
|
1677
|
+
// move [dst, end) to dst+1 and insert at dst
|
|
1678
|
+
Index chunkSize = end - dst;
|
|
1679
|
+
if (chunkSize > 0) m_data.moveChunk(dst, dst + 1, chunkSize);
|
|
1680
|
+
m_innerNonZeros[outer]++;
|
|
1681
|
+
for (Index j = outer; j < rightTarget; j++) m_outerIndex[j + 1]++;
|
|
1682
|
+
m_data.index(dst) = StorageIndex(inner);
|
|
1683
|
+
m_data.value(dst) = Scalar(0);
|
|
1684
|
+
return m_data.value(dst);
|
|
1685
|
+
}
|
|
1686
|
+
rightTarget++;
|
|
1687
|
+
}
|
|
1688
|
+
if (leftTarget >= 0) {
|
|
1689
|
+
Index start = m_outerIndex[leftTarget];
|
|
1690
|
+
Index end = start + m_innerNonZeros[leftTarget];
|
|
1691
|
+
Index nextStart = m_outerIndex[leftTarget + 1];
|
|
1692
|
+
Index capacity = nextStart - end;
|
|
1693
|
+
if (capacity > 0) {
|
|
1694
|
+
// tricky: dst is a lower bound, so we must insert at dst-1 when shifting left
|
|
1695
|
+
// move [nextStart, dst) to nextStart-1 and insert at dst-1
|
|
1696
|
+
Index chunkSize = dst - nextStart;
|
|
1697
|
+
if (chunkSize > 0) m_data.moveChunk(nextStart, nextStart - 1, chunkSize);
|
|
1698
|
+
m_innerNonZeros[outer]++;
|
|
1699
|
+
for (Index j = leftTarget; j < outer; j++) m_outerIndex[j + 1]--;
|
|
1700
|
+
m_data.index(dst - 1) = StorageIndex(inner);
|
|
1701
|
+
m_data.value(dst - 1) = Scalar(0);
|
|
1702
|
+
return m_data.value(dst - 1);
|
|
1703
|
+
}
|
|
1704
|
+
leftTarget--;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
// no room for interior insertion
|
|
1709
|
+
// nonZeros() == m_data.size()
|
|
1710
|
+
// record offset as outerIndxPtr will change
|
|
1711
|
+
Index dst_offset = dst - m_outerIndex[outer];
|
|
1712
|
+
// allocate space for random insertion
|
|
1713
|
+
if (m_data.allocatedSize() == 0) {
|
|
1714
|
+
// fast method to allocate space for one element per vector in empty matrix
|
|
1715
|
+
m_data.resize(m_outerSize);
|
|
1716
|
+
std::iota(m_outerIndex, m_outerIndex + m_outerSize + 1, StorageIndex(0));
|
|
1717
|
+
} else {
|
|
1718
|
+
// check for integer overflow: if maxReserveSize == 0, insertion is not possible
|
|
1719
|
+
Index maxReserveSize = static_cast<Index>(NumTraits<StorageIndex>::highest()) - m_data.allocatedSize();
|
|
1720
|
+
eigen_assert(maxReserveSize > 0);
|
|
1721
|
+
if (m_outerSize <= maxReserveSize) {
|
|
1722
|
+
// allocate space for one additional element per vector
|
|
1723
|
+
reserveInnerVectors(IndexVector::Constant(m_outerSize, 1));
|
|
1724
|
+
} else {
|
|
1725
|
+
// handle the edge case where StorageIndex is insufficient to reserve outerSize additional elements
|
|
1726
|
+
// allocate space for one additional element in the interval [outer,maxReserveSize)
|
|
1727
|
+
typedef internal::sparse_reserve_op<StorageIndex> ReserveSizesOp;
|
|
1728
|
+
typedef CwiseNullaryOp<ReserveSizesOp, IndexVector> ReserveSizesXpr;
|
|
1729
|
+
ReserveSizesXpr reserveSizesXpr(m_outerSize, 1, ReserveSizesOp(outer, m_outerSize, maxReserveSize));
|
|
1730
|
+
reserveInnerVectors(reserveSizesXpr);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
// insert element at `dst` with new outer indices
|
|
1734
|
+
Index start = m_outerIndex[outer];
|
|
1735
|
+
Index end = start + m_innerNonZeros[outer];
|
|
1736
|
+
Index new_dst = start + dst_offset;
|
|
1737
|
+
Index chunkSize = end - new_dst;
|
|
1738
|
+
if (chunkSize > 0) m_data.moveChunk(new_dst, new_dst + 1, chunkSize);
|
|
1739
|
+
m_innerNonZeros[outer]++;
|
|
1740
|
+
m_data.index(new_dst) = StorageIndex(inner);
|
|
1741
|
+
m_data.value(new_dst) = Scalar(0);
|
|
1742
|
+
return m_data.value(new_dst);
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
namespace internal {
|
|
1746
|
+
|
|
1747
|
+
template <typename Scalar_, int Options_, typename StorageIndex_>
|
|
1748
|
+
struct evaluator<SparseMatrix<Scalar_, Options_, StorageIndex_>>
|
|
1749
|
+
: evaluator<SparseCompressedBase<SparseMatrix<Scalar_, Options_, StorageIndex_>>> {
|
|
1750
|
+
typedef evaluator<SparseCompressedBase<SparseMatrix<Scalar_, Options_, StorageIndex_>>> Base;
|
|
1751
|
+
typedef SparseMatrix<Scalar_, Options_, StorageIndex_> SparseMatrixType;
|
|
1752
|
+
evaluator() : Base() {}
|
|
1753
|
+
explicit evaluator(const SparseMatrixType& mat) : Base(mat) {}
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
} // namespace internal
|
|
1757
|
+
|
|
1758
|
+
// Specialization for SparseMatrix.
|
|
1759
|
+
// Serializes [rows, cols, isCompressed, outerSize, innerBufferSize,
|
|
1760
|
+
// innerNonZeros, outerIndices, innerIndices, values].
|
|
1761
|
+
template <typename Scalar, int Options, typename StorageIndex>
|
|
1762
|
+
class Serializer<SparseMatrix<Scalar, Options, StorageIndex>, void> {
|
|
1763
|
+
public:
|
|
1764
|
+
typedef SparseMatrix<Scalar, Options, StorageIndex> SparseMat;
|
|
1765
|
+
|
|
1766
|
+
struct Header {
|
|
1767
|
+
typename SparseMat::Index rows;
|
|
1768
|
+
typename SparseMat::Index cols;
|
|
1769
|
+
bool compressed;
|
|
1770
|
+
Index outer_size;
|
|
1771
|
+
Index inner_buffer_size;
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
EIGEN_DEVICE_FUNC size_t size(const SparseMat& value) const {
|
|
1775
|
+
// innerNonZeros.
|
|
1776
|
+
std::size_t num_storage_indices = value.isCompressed() ? 0 : value.outerSize();
|
|
1777
|
+
// Outer indices.
|
|
1778
|
+
num_storage_indices += value.outerSize() + 1;
|
|
1779
|
+
// Inner indices.
|
|
1780
|
+
const StorageIndex inner_buffer_size = value.outerIndexPtr()[value.outerSize()];
|
|
1781
|
+
num_storage_indices += inner_buffer_size;
|
|
1782
|
+
// Values.
|
|
1783
|
+
std::size_t num_values = inner_buffer_size;
|
|
1784
|
+
return sizeof(Header) + sizeof(Scalar) * num_values + sizeof(StorageIndex) * num_storage_indices;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
EIGEN_DEVICE_FUNC uint8_t* serialize(uint8_t* dest, uint8_t* end, const SparseMat& value) {
|
|
1788
|
+
if (EIGEN_PREDICT_FALSE(dest == nullptr)) return nullptr;
|
|
1789
|
+
if (EIGEN_PREDICT_FALSE(dest + size(value) > end)) return nullptr;
|
|
1790
|
+
|
|
1791
|
+
const size_t header_bytes = sizeof(Header);
|
|
1792
|
+
Header header = {value.rows(), value.cols(), value.isCompressed(), value.outerSize(),
|
|
1793
|
+
value.outerIndexPtr()[value.outerSize()]};
|
|
1794
|
+
EIGEN_USING_STD(memcpy)
|
|
1795
|
+
memcpy(dest, &header, header_bytes);
|
|
1796
|
+
dest += header_bytes;
|
|
1797
|
+
|
|
1798
|
+
// innerNonZeros.
|
|
1799
|
+
if (!header.compressed) {
|
|
1800
|
+
std::size_t data_bytes = sizeof(StorageIndex) * header.outer_size;
|
|
1801
|
+
memcpy(dest, value.innerNonZeroPtr(), data_bytes);
|
|
1802
|
+
dest += data_bytes;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
// Outer indices.
|
|
1806
|
+
std::size_t data_bytes = sizeof(StorageIndex) * (header.outer_size + 1);
|
|
1807
|
+
memcpy(dest, value.outerIndexPtr(), data_bytes);
|
|
1808
|
+
dest += data_bytes;
|
|
1809
|
+
|
|
1810
|
+
// Inner indices.
|
|
1811
|
+
data_bytes = sizeof(StorageIndex) * header.inner_buffer_size;
|
|
1812
|
+
memcpy(dest, value.innerIndexPtr(), data_bytes);
|
|
1813
|
+
dest += data_bytes;
|
|
1814
|
+
|
|
1815
|
+
// Values.
|
|
1816
|
+
data_bytes = sizeof(Scalar) * header.inner_buffer_size;
|
|
1817
|
+
memcpy(dest, value.valuePtr(), data_bytes);
|
|
1818
|
+
dest += data_bytes;
|
|
1819
|
+
|
|
1820
|
+
return dest;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
EIGEN_DEVICE_FUNC const uint8_t* deserialize(const uint8_t* src, const uint8_t* end, SparseMat& value) const {
|
|
1824
|
+
if (EIGEN_PREDICT_FALSE(src == nullptr)) return nullptr;
|
|
1825
|
+
if (EIGEN_PREDICT_FALSE(src + sizeof(Header) > end)) return nullptr;
|
|
1826
|
+
|
|
1827
|
+
const size_t header_bytes = sizeof(Header);
|
|
1828
|
+
Header header;
|
|
1829
|
+
EIGEN_USING_STD(memcpy)
|
|
1830
|
+
memcpy(&header, src, header_bytes);
|
|
1831
|
+
src += header_bytes;
|
|
1832
|
+
|
|
1833
|
+
value.setZero();
|
|
1834
|
+
value.resize(header.rows, header.cols);
|
|
1835
|
+
if (header.compressed) {
|
|
1836
|
+
value.makeCompressed();
|
|
1837
|
+
} else {
|
|
1838
|
+
value.uncompress();
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
// Adjust value ptr size.
|
|
1842
|
+
value.data().resize(header.inner_buffer_size);
|
|
1843
|
+
|
|
1844
|
+
// Initialize compressed state and inner non-zeros.
|
|
1845
|
+
if (!header.compressed) {
|
|
1846
|
+
// Inner non-zero counts.
|
|
1847
|
+
std::size_t data_bytes = sizeof(StorageIndex) * header.outer_size;
|
|
1848
|
+
if (EIGEN_PREDICT_FALSE(src + data_bytes > end)) return nullptr;
|
|
1849
|
+
memcpy(value.innerNonZeroPtr(), src, data_bytes);
|
|
1850
|
+
src += data_bytes;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
// Outer indices.
|
|
1854
|
+
std::size_t data_bytes = sizeof(StorageIndex) * (header.outer_size + 1);
|
|
1855
|
+
if (EIGEN_PREDICT_FALSE(src + data_bytes > end)) return nullptr;
|
|
1856
|
+
memcpy(value.outerIndexPtr(), src, data_bytes);
|
|
1857
|
+
src += data_bytes;
|
|
1858
|
+
|
|
1859
|
+
// Inner indices.
|
|
1860
|
+
data_bytes = sizeof(StorageIndex) * header.inner_buffer_size;
|
|
1861
|
+
if (EIGEN_PREDICT_FALSE(src + data_bytes > end)) return nullptr;
|
|
1862
|
+
memcpy(value.innerIndexPtr(), src, data_bytes);
|
|
1863
|
+
src += data_bytes;
|
|
1864
|
+
|
|
1865
|
+
// Values.
|
|
1866
|
+
data_bytes = sizeof(Scalar) * header.inner_buffer_size;
|
|
1867
|
+
if (EIGEN_PREDICT_FALSE(src + data_bytes > end)) return nullptr;
|
|
1868
|
+
memcpy(value.valuePtr(), src, data_bytes);
|
|
1869
|
+
src += data_bytes;
|
|
1870
|
+
return src;
|
|
1871
|
+
}
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
} // end namespace Eigen
|
|
1875
|
+
|
|
1876
|
+
#endif // EIGEN_SPARSEMATRIX_H
|