tinygwas 0.2__tar.gz → 0.2.1__tar.gz
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.
- tinygwas-0.2.1/CMakeLists.txt +14 -0
- tinygwas-0.2.1/MANIFEST.in +6 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/PKG-INFO +1 -1
- {tinygwas-0.2 → tinygwas-0.2.1}/README.md +4 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/setup.py +1 -1
- tinygwas-0.2.1/src/FileUtils.cpp +45 -0
- tinygwas-0.2.1/src/FileUtils.h +17 -0
- tinygwas-0.2.1/src/Utils.cpp +1 -0
- tinygwas-0.2.1/src/Utils.h +15 -0
- tinygwas-0.2.1/src/main.cpp +283 -0
- tinygwas-0.2.1/thirdparty/Eigen/Cholesky +45 -0
- tinygwas-0.2.1/thirdparty/Eigen/CholmodSupport +48 -0
- tinygwas-0.2.1/thirdparty/Eigen/Core +384 -0
- tinygwas-0.2.1/thirdparty/Eigen/Dense +7 -0
- tinygwas-0.2.1/thirdparty/Eigen/Eigen +2 -0
- tinygwas-0.2.1/thirdparty/Eigen/Eigenvalues +60 -0
- tinygwas-0.2.1/thirdparty/Eigen/Geometry +59 -0
- tinygwas-0.2.1/thirdparty/Eigen/Householder +29 -0
- tinygwas-0.2.1/thirdparty/Eigen/IterativeLinearSolvers +48 -0
- tinygwas-0.2.1/thirdparty/Eigen/Jacobi +32 -0
- tinygwas-0.2.1/thirdparty/Eigen/KLUSupport +41 -0
- tinygwas-0.2.1/thirdparty/Eigen/LU +49 -0
- tinygwas-0.2.1/thirdparty/Eigen/MetisSupport +35 -0
- tinygwas-0.2.1/thirdparty/Eigen/OrderingMethods +70 -0
- tinygwas-0.2.1/thirdparty/Eigen/PaStiXSupport +49 -0
- tinygwas-0.2.1/thirdparty/Eigen/PardisoSupport +35 -0
- tinygwas-0.2.1/thirdparty/Eigen/QR +50 -0
- tinygwas-0.2.1/thirdparty/Eigen/QtAlignedMalloc +39 -0
- tinygwas-0.2.1/thirdparty/Eigen/SPQRSupport +34 -0
- tinygwas-0.2.1/thirdparty/Eigen/SVD +50 -0
- tinygwas-0.2.1/thirdparty/Eigen/Sparse +34 -0
- tinygwas-0.2.1/thirdparty/Eigen/SparseCholesky +37 -0
- tinygwas-0.2.1/thirdparty/Eigen/SparseCore +69 -0
- tinygwas-0.2.1/thirdparty/Eigen/SparseLU +50 -0
- tinygwas-0.2.1/thirdparty/Eigen/SparseQR +36 -0
- tinygwas-0.2.1/thirdparty/Eigen/StdDeque +27 -0
- tinygwas-0.2.1/thirdparty/Eigen/StdList +26 -0
- tinygwas-0.2.1/thirdparty/Eigen/StdVector +27 -0
- tinygwas-0.2.1/thirdparty/Eigen/SuperLUSupport +64 -0
- tinygwas-0.2.1/thirdparty/Eigen/UmfPackSupport +40 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LDLT.h +688 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LLT.h +558 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArithmeticSequence.h +413 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Array.h +417 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArrayBase.h +226 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ArrayWrapper.h +209 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Assign.h +90 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/AssignEvaluator.h +1000 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Assign_MKL.h +178 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/BandMatrix.h +353 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Block.h +448 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/BooleanRedux.h +162 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CommaInitializer.h +164 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ConditionEstimator.h +175 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CoreEvaluators.h +1738 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CoreIterators.h +132 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseBinaryOp.h +183 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseTernaryOp.h +197 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseUnaryOp.h +103 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/CwiseUnaryView.h +132 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseBase.h +701 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseCoeffsBase.h +685 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/DenseStorage.h +602 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Diagonal.h +258 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/DiagonalMatrix.h +391 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/DiagonalProduct.h +28 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Dot.h +318 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/EigenBase.h +160 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ForceAlignedAccess.h +150 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Fuzzy.h +155 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/GeneralProduct.h +465 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/GenericPacketMath.h +912 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/GlobalFunctions.h +194 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/IO.h +258 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/IndexedView.h +237 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Inverse.h +117 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Map.h +171 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/MapBase.h +310 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/MathFunctions.h +2029 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/MathFunctionsImpl.h +191 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Matrix.h +565 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/MatrixBase.h +547 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/NestByValue.h +85 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/NoAlias.h +109 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/NumTraits.h +335 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/PermutationMatrix.h +605 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/PlainObjectBase.h +1128 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Product.h +191 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ProductEvaluators.h +1179 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Random.h +218 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Redux.h +515 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Ref.h +381 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Replicate.h +142 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Reshaped.h +454 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/ReturnByValue.h +119 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Reverse.h +217 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Select.h +164 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/SelfAdjointView.h +365 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Solve.h +188 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/SolveTriangular.h +235 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/SolverBase.h +168 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/StableNorm.h +251 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/StlIterators.h +463 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Stride.h +116 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Swap.h +68 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Transpose.h +464 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Transpositions.h +386 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/TriangularMatrix.h +1001 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/VectorBlock.h +96 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/VectorwiseOp.h +784 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/Visitor.h +381 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/Complex.h +438 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/PacketMath.h +1579 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/Complex.h +455 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/MathFunctions.h +425 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/PacketMath.h +2309 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/Complex.h +483 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2934 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +637 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/AltiVec/PacketMath.h +2702 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/CUDA/Complex.h +259 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/BFloat16.h +707 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/ConjHelper.h +29 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1655 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +114 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/Half.h +942 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/Settings.h +49 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/Complex.h +720 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/MSA/PacketMath.h +1237 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/Complex.h +672 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/PacketMath.h +4675 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/Complex.h +470 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/PacketMath.h +756 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/Complex.h +525 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/arch/ZVector/PacketMath.h +1063 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/StlFunctors.h +136 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2677 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/Parallelizer.h +180 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/BlasUtil.h +666 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Constants.h +563 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/IntegralConstant.h +272 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/MKL_support.h +137 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Macros.h +1454 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Memory.h +1152 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/Meta.h +807 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/NonMPL2.h +3 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/StaticAssert.h +221 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Core/util/XprHelper.h +868 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealQZ.h +657 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealSchur.h +558 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +899 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/AlignedBox.h +486 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/AngleAxis.h +247 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/EulerAngles.h +114 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Homogeneous.h +501 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Hyperplane.h +282 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/OrthoMethods.h +235 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Quaternion.h +870 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Rotation2D.h +199 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/RotationBase.h +206 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Scaling.h +188 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Transform.h +1563 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Translation.h +202 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/Umeyama.h +166 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Geometry/arch/Geometry_SIMD.h +165 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Householder/BlockHouseholder.h +110 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Householder/Householder.h +176 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Householder/HouseholderSequence.h +545 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/Jacobi/Jacobi.h +483 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/Determinant.h +117 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/FullPivLU.h +877 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/InverseImpl.h +417 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/PartialPivLU.h +619 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/LU/arch/InverseSize4.h +348 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Amd.h +435 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/OrderingMethods/Ordering.h +153 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/HouseholderQR.h +434 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SVD/BDCSVD.h +1366 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SVD/JacobiSVD.h +812 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SVD/SVDBase.h +376 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/AmbiVector.h +378 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/CompressedStorage.h +274 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseAssign.h +270 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseBlock.h +571 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseDot.h +98 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMap.h +305 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparsePermutation.h +178 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseProduct.h +181 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseRedux.h +49 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseRef.h +397 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseTranspose.h +92 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseUtil.h +186 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseVector.h +478 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/SparseView.h +254 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseCore/TriangularSolver.h +315 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU.h +923 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SparseQR/SparseQR.h +758 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdDeque.h +116 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdList.h +106 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/StdVector.h +131 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/StlSupport/details.h +84 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/Image.h +82 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/Kernel.h +79 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/RealSvd2x2.h +55 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/blas.h +440 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapack.h +152 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapacke.h +16292 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/misc/lapacke_mangling.h +17 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ArrayCwiseUnaryOps.h +657 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/BlockMethods.h +1442 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/CommonCwiseUnaryOps.h +220 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
- tinygwas-0.2.1/thirdparty/Eigen/src/plugins/ReshapedMethods.h +149 -0
- tinygwas-0.2.1/thirdparty/pybind11/CMakeLists.txt +281 -0
- tinygwas-0.2.1/thirdparty/pybind11/LICENSE +29 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/attr.h +551 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/buffer_info.h +146 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/cast.h +2261 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/chrono.h +191 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/common.h +2 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/complex.h +65 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/class.h +708 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/common.h +861 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/descr.h +100 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/init.h +336 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/internals.h +363 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/detail/typeid.h +55 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/eigen.h +607 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/embed.h +201 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/eval.h +152 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/functional.h +104 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/iostream.h +220 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/numpy.h +1693 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/operators.h +173 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/options.h +65 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/pybind11.h +2451 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/pytypes.h +1668 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/stl.h +388 -0
- tinygwas-0.2.1/thirdparty/pybind11/include/pybind11/stl_bind.h +676 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/CMakeLists.txt +450 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/CMakeLists.txt +84 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt +26 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt +38 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt +45 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt +39 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt +34 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt +40 -0
- tinygwas-0.2.1/thirdparty/pybind11/tests/test_embed/CMakeLists.txt +46 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/FindCatch.cmake +70 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/FindEigen3.cmake +86 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/FindPythonLibsNew.cmake +257 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/check-style.sh +44 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/cmake_uninstall.cmake.in +23 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/libsize.py +38 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/make_changelog.py +63 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Common.cmake +393 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Config.cmake.in +232 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11NewTools.cmake +267 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/pybind11Tools.cmake +220 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/pyproject.toml +3 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/setup_global.py.in +63 -0
- tinygwas-0.2.1/thirdparty/pybind11/tools/setup_main.py.in +36 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/PKG-INFO +1 -1
- tinygwas-0.2.1/tinygwas.egg-info/SOURCES.txt +401 -0
- tinygwas-0.2/tinygwas.egg-info/SOURCES.txt +0 -8
- {tinygwas-0.2 → tinygwas-0.2.1}/setup.cfg +0 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/dependency_links.txt +0 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/not-zip-safe +0 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/requires.txt +0 -0
- {tinygwas-0.2 → tinygwas-0.2.1}/tinygwas.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.12)
|
|
2
|
+
project(tinygwas)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_BUILD_TYPE Release)
|
|
5
|
+
set(CMAKE_CXX_STANDARD 14)
|
|
6
|
+
|
|
7
|
+
include_directories(${CMAKE_SOURCE_DIR}/thirdparty/)
|
|
8
|
+
set(SOURCE_FILES src/FileUtils.cpp src/FileUtils.h src/Utils.cpp src/Utils.h)
|
|
9
|
+
|
|
10
|
+
add_subdirectory(thirdparty/pybind11)
|
|
11
|
+
pybind11_add_module(tinygwas src/main.cpp ${SOURCE_FILES})
|
|
12
|
+
|
|
13
|
+
#add_executable(tinygwas src/main.cpp ${SOURCE_FILES} )
|
|
14
|
+
#install(TARGETS tinygwas)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#include "FileUtils.h"
|
|
2
|
+
|
|
3
|
+
bool is_file_exist(const string & fileName)
|
|
4
|
+
{
|
|
5
|
+
std::ifstream infile(fileName);
|
|
6
|
+
return infile.good();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
MatrixXi read_int_mat(const std::string &path) {
|
|
10
|
+
std::ifstream in_data;
|
|
11
|
+
in_data.open(path);
|
|
12
|
+
std::string line;
|
|
13
|
+
std::vector<int> values;
|
|
14
|
+
uint n_row = 0;
|
|
15
|
+
|
|
16
|
+
while (std::getline(in_data, line)) {
|
|
17
|
+
for (int i = 0; i < line.size(); i++) {
|
|
18
|
+
values.push_back(line[i] - '0');
|
|
19
|
+
}
|
|
20
|
+
n_row++;
|
|
21
|
+
}
|
|
22
|
+
return Eigen::Map<Matrix<int, Dynamic, Dynamic, RowMajor>>(values.data(), n_row, values.size() / n_row);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
void write_int_mat(const std::string &path, const MatrixXi& mat) {
|
|
26
|
+
ofstream output(path);
|
|
27
|
+
for (int i = 0; i < mat.rows(); i++){
|
|
28
|
+
for (int j = 0; j < mat.cols(); j++){
|
|
29
|
+
output << mat(i, j);
|
|
30
|
+
}
|
|
31
|
+
output << "\n";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
VectorXi read_pos(const std::string &path) {
|
|
36
|
+
std::ifstream in_data;
|
|
37
|
+
in_data.open(path);
|
|
38
|
+
std::string line;
|
|
39
|
+
std::vector<int> values;
|
|
40
|
+
|
|
41
|
+
while (std::getline(in_data, line)) {
|
|
42
|
+
values.push_back(std::stoi(line));
|
|
43
|
+
}
|
|
44
|
+
return Map<VectorXi>(values.data(), values.size());
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#ifndef FILEUTILS_H
|
|
2
|
+
#define FILEUTILS_H
|
|
3
|
+
#include <iostream>
|
|
4
|
+
#include <fstream>
|
|
5
|
+
#include <vector>
|
|
6
|
+
#include <limits>
|
|
7
|
+
#include <Eigen/Core>
|
|
8
|
+
|
|
9
|
+
using namespace std;
|
|
10
|
+
using namespace Eigen;
|
|
11
|
+
|
|
12
|
+
MatrixXi read_int_mat(const std::string &path);
|
|
13
|
+
VectorXi read_pos(const std::string &path);
|
|
14
|
+
void write_int_mat(const std::string &path, const MatrixXi& mat);
|
|
15
|
+
bool is_file_exist(const string & fileName);
|
|
16
|
+
|
|
17
|
+
#endif
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#include "Utils.h"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#ifndef UTILS_H
|
|
2
|
+
#define UTILS_H
|
|
3
|
+
|
|
4
|
+
#include <Eigen/Core>
|
|
5
|
+
#include <cmath>
|
|
6
|
+
#include <iostream>
|
|
7
|
+
|
|
8
|
+
#define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
|
|
9
|
+
#define PBWIDTH 60
|
|
10
|
+
|
|
11
|
+
void print_progress(double percentage);
|
|
12
|
+
|
|
13
|
+
using namespace std;
|
|
14
|
+
using namespace Eigen;
|
|
15
|
+
#endif
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
#include <Eigen/Core>
|
|
2
|
+
#include <Eigen/LU>
|
|
3
|
+
#include <Eigen/SVD>
|
|
4
|
+
#include <ctime>
|
|
5
|
+
#include <iostream>
|
|
6
|
+
#include <numeric>
|
|
7
|
+
#include <random>
|
|
8
|
+
#include <vector>
|
|
9
|
+
|
|
10
|
+
#include <pybind11/eigen.h>
|
|
11
|
+
#include <pybind11/numpy.h>
|
|
12
|
+
#include <pybind11/pybind11.h>
|
|
13
|
+
#include <pybind11/stl.h>
|
|
14
|
+
|
|
15
|
+
namespace py = pybind11;
|
|
16
|
+
|
|
17
|
+
using namespace std;
|
|
18
|
+
using namespace Eigen;
|
|
19
|
+
using RowMatrixXd =
|
|
20
|
+
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
* Logistic regression IRLS implementation.
|
|
24
|
+
* Based on https://bwlewis.github.io/GLM/#svdnewton
|
|
25
|
+
* Perform likelihood ratio test for hypothesis testing
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* The following functions follow the interface for GLM, currently only logistic
|
|
30
|
+
* regression is implemented. However, it is straightforward to extend to other
|
|
31
|
+
* GLM family.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
double link(double mu) { return log(mu / (1 - mu)); }
|
|
35
|
+
|
|
36
|
+
double linkinv(double eta) { return 1 / (1 + exp(-eta)); }
|
|
37
|
+
|
|
38
|
+
double variance(double g) { return g * (1 - g); }
|
|
39
|
+
|
|
40
|
+
double mu_eta(double eta) {
|
|
41
|
+
// derivative of mu to eta
|
|
42
|
+
return exp(-eta) / pow((1 + exp(-eta)), 2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
double logistic_reg(const MatrixXd &X, const VectorXd &y,
|
|
46
|
+
Eigen::Ref<VectorXd> b, Eigen::Ref<VectorXd> se,
|
|
47
|
+
int max_iter, double tol) {
|
|
48
|
+
// b is the effect sizes to be optimized in place, also used as the starting
|
|
49
|
+
// points return loglikelihood
|
|
50
|
+
|
|
51
|
+
int n = X.rows();
|
|
52
|
+
int m = X.cols();
|
|
53
|
+
JacobiSVD<MatrixXd> svd(X, ComputeThinU | ComputeThinV);
|
|
54
|
+
|
|
55
|
+
VectorXd eta = X * b;
|
|
56
|
+
VectorXd s = VectorXd::Zero(m);
|
|
57
|
+
VectorXd s_old(m);
|
|
58
|
+
|
|
59
|
+
VectorXd g(n);
|
|
60
|
+
VectorXd gprime(n);
|
|
61
|
+
VectorXd var_g(n);
|
|
62
|
+
VectorXd z(n);
|
|
63
|
+
VectorXd W(n);
|
|
64
|
+
|
|
65
|
+
for (int i_iter = 0; i_iter < max_iter; i_iter++) {
|
|
66
|
+
g = eta.unaryExpr(std::ref(linkinv));
|
|
67
|
+
var_g = g.unaryExpr(std::ref(variance));
|
|
68
|
+
gprime = eta.unaryExpr(std::ref(mu_eta));
|
|
69
|
+
z = eta + (y - g).cwiseQuotient(gprime);
|
|
70
|
+
W = gprime.array().square() / var_g.array();
|
|
71
|
+
|
|
72
|
+
// fraction of observations can be perfectly predicted
|
|
73
|
+
double predclose_frac =
|
|
74
|
+
((y - g).cwiseAbs().array() < 1e-4).cast<double>().mean();
|
|
75
|
+
if (predclose_frac > 0.05) {
|
|
76
|
+
cout << "Warning: [tinygwas.logistic_reg] A fraction of "
|
|
77
|
+
<< static_cast<int>(predclose_frac * 100)
|
|
78
|
+
<< "% of the observations can be perfectly predicted (abs(y - g) < "
|
|
79
|
+
"1e-4). This might indicate complete quasi-separation. Exiting "
|
|
80
|
+
"iterations early and the corresponding loglik is set to NaN"
|
|
81
|
+
<< endl;
|
|
82
|
+
return std::numeric_limits<double>::quiet_NaN();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
s_old = s;
|
|
86
|
+
|
|
87
|
+
// solve U.T W U s = U.T W z
|
|
88
|
+
auto UtW = svd.matrixU().transpose() * W.asDiagonal();
|
|
89
|
+
s = (UtW * svd.matrixU()).ldlt().solve(UtW * z);
|
|
90
|
+
eta = svd.matrixU() * s;
|
|
91
|
+
if ((s - s_old).squaredNorm() < tol) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
b = svd.matrixV() * svd.singularValues().cwiseInverse().asDiagonal() *
|
|
97
|
+
svd.matrixU().transpose() * eta;
|
|
98
|
+
VectorXd mu = eta.unaryExpr(std::ref(linkinv));
|
|
99
|
+
|
|
100
|
+
// calculate standard errors of beta
|
|
101
|
+
VectorXd var_mu = mu.unaryExpr(std::ref(variance));
|
|
102
|
+
se = (X.transpose() * var_mu.asDiagonal() * X)
|
|
103
|
+
.inverse()
|
|
104
|
+
.diagonal()
|
|
105
|
+
.cwiseSqrt();
|
|
106
|
+
|
|
107
|
+
double loglik = 0.;
|
|
108
|
+
for (int i = 0; i < n; i++) {
|
|
109
|
+
loglik += y(i) * log(mu(i) + 1e-20) + (1 - y(i)) * log(1 - mu(i) + 1e-20);
|
|
110
|
+
}
|
|
111
|
+
return loglik;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/*
|
|
115
|
+
* Implement repeated logistic regression
|
|
116
|
+
*/
|
|
117
|
+
void logistic_lrt(const MatrixXd &var, const MatrixXd &cov, const VectorXd &y,
|
|
118
|
+
int test_size, const vector<int> &test_index,
|
|
119
|
+
Eigen::Ref<RowMatrixXd> res, int max_iter = 200,
|
|
120
|
+
double tol = 1e-6) {
|
|
121
|
+
// return BETA1, SE1, BETA2, SE2, N, P
|
|
122
|
+
int n_indiv = var.rows();
|
|
123
|
+
int n_var = var.cols();
|
|
124
|
+
int n_cov = cov.cols();
|
|
125
|
+
|
|
126
|
+
int n_test = n_var / test_size;
|
|
127
|
+
|
|
128
|
+
if (!((res.rows() == n_test) && (res.cols() == test_size * 2 + 2))) {
|
|
129
|
+
throw std::invalid_argument("[tinygwas.logistic_lrt] res should be a "
|
|
130
|
+
"matrix of size (n_test, test_size * 2 + 2)");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
MatrixXd design(n_indiv, n_cov + test_size);
|
|
134
|
+
design << MatrixXd::Zero(n_indiv, test_size), cov;
|
|
135
|
+
|
|
136
|
+
// coefficients for the covariates
|
|
137
|
+
VectorXd beta_cov = VectorXd::Zero(n_cov);
|
|
138
|
+
VectorXd se_cov = VectorXd::Zero(n_cov);
|
|
139
|
+
logistic_reg(design(all, seq(test_size, n_cov + test_size - 1)), y, beta_cov,
|
|
140
|
+
se_cov, max_iter, tol);
|
|
141
|
+
|
|
142
|
+
VectorXd beta_full = VectorXd::Zero(n_cov + test_size);
|
|
143
|
+
VectorXd se_full = VectorXd::Zero(n_cov + test_size);
|
|
144
|
+
VectorXd beta_reduced = VectorXd::Zero(n_cov + test_size - test_index.size());
|
|
145
|
+
VectorXd se_reduced = VectorXd::Zero(n_cov + test_size - test_index.size());
|
|
146
|
+
|
|
147
|
+
// find index that is in the reduced model
|
|
148
|
+
vector<int> reduced_index;
|
|
149
|
+
for (int i = 0; i < test_size; i++) {
|
|
150
|
+
if (find(test_index.begin(), test_index.end(), i) == test_index.end()) {
|
|
151
|
+
reduced_index.push_back(i);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
for (int i = test_size; i < n_cov + test_size; i++) {
|
|
155
|
+
reduced_index.push_back(i);
|
|
156
|
+
}
|
|
157
|
+
VectorXd loglik_diff(n_test);
|
|
158
|
+
|
|
159
|
+
for (int i_test = 0; i_test < n_test; i_test++) {
|
|
160
|
+
design(all, seq(0, test_size - 1)) =
|
|
161
|
+
var(all, seq(i_test * test_size, i_test * test_size + test_size - 1));
|
|
162
|
+
|
|
163
|
+
// get the individual where all the variables are not NaN
|
|
164
|
+
vector<int> test_indiv_idx;
|
|
165
|
+
for (int i = 0; i < n_indiv; i++) {
|
|
166
|
+
if (!design(i, seq(0, test_size - 1)).array().isNaN().any()) {
|
|
167
|
+
test_indiv_idx.push_back(i);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
int n_test_indiv = test_indiv_idx.size();
|
|
171
|
+
|
|
172
|
+
beta_full.setZero();
|
|
173
|
+
beta_reduced.setZero();
|
|
174
|
+
beta_full(seq(test_size, n_cov + test_size - 1)) = beta_cov;
|
|
175
|
+
|
|
176
|
+
double loglik_full =
|
|
177
|
+
logistic_reg(design(test_indiv_idx, all), y(test_indiv_idx), beta_full,
|
|
178
|
+
se_full, max_iter, tol);
|
|
179
|
+
beta_reduced = beta_full(reduced_index);
|
|
180
|
+
double loglik_reduced =
|
|
181
|
+
logistic_reg(design(test_indiv_idx, reduced_index), y(test_indiv_idx),
|
|
182
|
+
beta_reduced, se_reduced, max_iter, tol);
|
|
183
|
+
|
|
184
|
+
// save results: BETA1, SE1, BETA2, SE2, ..., N, loglihood_diff
|
|
185
|
+
for (int i = 0; i < test_size; i++) {
|
|
186
|
+
res(i_test, i * 2) = beta_full(i);
|
|
187
|
+
res(i_test, i * 2 + 1) = se_full(i);
|
|
188
|
+
}
|
|
189
|
+
res(i_test, test_size * 2) = n_test_indiv;
|
|
190
|
+
res(i_test, test_size * 2 + 1) = loglik_full - loglik_reduced;
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/*
|
|
196
|
+
* For potential computational speedup in the linear regression mode.
|
|
197
|
+
b = np.dot(cov2.T, cov2)
|
|
198
|
+
b_inv = linalg.inv(b)
|
|
199
|
+
|
|
200
|
+
# define commonly used term in subsequent computations
|
|
201
|
+
|
|
202
|
+
# covariance terms
|
|
203
|
+
a = np.dot(cov1.T, cov1)
|
|
204
|
+
a_inv = linalg.inv(a)
|
|
205
|
+
|
|
206
|
+
v = np.dot(cov1.T, cov2)
|
|
207
|
+
v_mul_b_inv = np.dot(v, b_inv)
|
|
208
|
+
# quadratic form
|
|
209
|
+
b_quad = np.linalg.multi_dot([v, b_inv, v.T])
|
|
210
|
+
d_inv = linalg.inv(np.eye(2) - np.dot(b_quad, a_inv))
|
|
211
|
+
|
|
212
|
+
inv11 = a_inv + np.linalg.multi_dot([a_inv, b_quad, d_inv, a_inv])
|
|
213
|
+
inv12 = -np.dot(linalg.inv(a - quad_form), v_mul_b_inv)
|
|
214
|
+
inv22 = b_inv - np.linalg.multi_dot([v_mul_b_inv.T, a_inv, d_inv, v_mul_b_inv])
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
void linear_f_test(const MatrixXd &var, const MatrixXd &cov, const VectorXd &y,
|
|
218
|
+
int test_size, const vector<int> &test_index,
|
|
219
|
+
Eigen::Ref<RowMatrixXd> res) {
|
|
220
|
+
// F-test for linear regression
|
|
221
|
+
// var: variables to be tested (NaN is allowed)
|
|
222
|
+
// cov: covariates common to all tests (no NaN is assumed)
|
|
223
|
+
// y: response variables
|
|
224
|
+
// test_size: number of variables included in each test.
|
|
225
|
+
// test_index: index of the variables to be tested.
|
|
226
|
+
// return: BETA1, SE1, BETA2, SE2, N, f-stat
|
|
227
|
+
|
|
228
|
+
int n_indiv = var.rows();
|
|
229
|
+
int n_var = var.cols();
|
|
230
|
+
int n_cov = cov.cols();
|
|
231
|
+
|
|
232
|
+
MatrixXd design(n_indiv, n_cov + test_size);
|
|
233
|
+
design << MatrixXd::Zero(n_indiv, test_size), cov;
|
|
234
|
+
int n_test = n_var / test_size;
|
|
235
|
+
if (!((res.rows() == n_test) && (res.cols() == test_size * 2 + 2))) {
|
|
236
|
+
throw std::invalid_argument("[tinygwas.logistic_lrt] res should be a "
|
|
237
|
+
"matrix of size (n_test, test_size * 2 + 2)");
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
for (int i_test = 0; i_test < n_test; i_test++) {
|
|
241
|
+
design(all, seq(0, test_size - 1)) =
|
|
242
|
+
var(all, seq(i_test * test_size, i_test * test_size + test_size - 1));
|
|
243
|
+
|
|
244
|
+
// get the individual where all the variables are not NaN
|
|
245
|
+
vector<int> test_indiv_idx;
|
|
246
|
+
for (int i = 0; i < n_indiv; i++) {
|
|
247
|
+
if (!design(i, seq(0, test_size - 1)).array().isNaN().any()) {
|
|
248
|
+
test_indiv_idx.push_back(i);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
int n_test_indiv = test_indiv_idx.size();
|
|
252
|
+
|
|
253
|
+
// compute only on the individuals that do not have NaN
|
|
254
|
+
JacobiSVD<MatrixXd> svd(design(test_indiv_idx, all),
|
|
255
|
+
ComputeThinU | ComputeThinV);
|
|
256
|
+
VectorXd beta = svd.solve(y(test_indiv_idx));
|
|
257
|
+
MatrixXd ViD = svd.matrixV() * svd.singularValues().asDiagonal().inverse();
|
|
258
|
+
double sigmasq =
|
|
259
|
+
(y(test_indiv_idx) - design(test_indiv_idx, all) * beta).squaredNorm() /
|
|
260
|
+
(n_test_indiv - n_cov - test_size);
|
|
261
|
+
MatrixXd iXtX = ViD * ViD.transpose();
|
|
262
|
+
MatrixXd f_stat = beta(test_index).transpose() *
|
|
263
|
+
iXtX(test_index, test_index).inverse() *
|
|
264
|
+
beta(test_index) / (test_index.size() * sigmasq);
|
|
265
|
+
|
|
266
|
+
// save results: BETA1, SE1, BETA2, SE2, ..., N, f-stat
|
|
267
|
+
for (int i = 0; i < test_size; i++) {
|
|
268
|
+
res(i_test, i * 2) = beta(i);
|
|
269
|
+
res(i_test, i * 2 + 1) = sqrt(sigmasq * iXtX(i, i));
|
|
270
|
+
}
|
|
271
|
+
res(i_test, test_size * 2) = n_test_indiv;
|
|
272
|
+
res(i_test, test_size * 2 + 1) = f_stat(0, 0);
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
PYBIND11_MODULE(tinygwas, m) {
|
|
278
|
+
m.doc() = "Toy C++ implementation with python wrapper for genome-wide "
|
|
279
|
+
"association testing";
|
|
280
|
+
m.def("linear_f_test", &linear_f_test);
|
|
281
|
+
m.def("logistic_reg", &logistic_reg);
|
|
282
|
+
m.def("logistic_lrt", &logistic_lrt);
|
|
283
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// This Source Code Form is subject to the terms of the Mozilla
|
|
5
|
+
// Public License v. 2.0. If a copy of the MPL was not distributed
|
|
6
|
+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
7
|
+
|
|
8
|
+
#ifndef EIGEN_CHOLESKY_MODULE_H
|
|
9
|
+
#define EIGEN_CHOLESKY_MODULE_H
|
|
10
|
+
|
|
11
|
+
#include "Core"
|
|
12
|
+
#include "Jacobi"
|
|
13
|
+
|
|
14
|
+
#include "src/Core/util/DisableStupidWarnings.h"
|
|
15
|
+
|
|
16
|
+
/** \defgroup Cholesky_Module Cholesky module
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
|
|
21
|
+
* Those decompositions are also accessible via the following methods:
|
|
22
|
+
* - MatrixBase::llt()
|
|
23
|
+
* - MatrixBase::ldlt()
|
|
24
|
+
* - SelfAdjointView::llt()
|
|
25
|
+
* - SelfAdjointView::ldlt()
|
|
26
|
+
*
|
|
27
|
+
* \code
|
|
28
|
+
* #include <Eigen/Cholesky>
|
|
29
|
+
* \endcode
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
#include "src/Cholesky/LLT.h"
|
|
33
|
+
#include "src/Cholesky/LDLT.h"
|
|
34
|
+
#ifdef EIGEN_USE_LAPACKE
|
|
35
|
+
#ifdef EIGEN_USE_MKL
|
|
36
|
+
#include "mkl_lapacke.h"
|
|
37
|
+
#else
|
|
38
|
+
#include "src/misc/lapacke.h"
|
|
39
|
+
#endif
|
|
40
|
+
#include "src/Cholesky/LLT_LAPACKE.h"
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#include "src/Core/util/ReenableStupidWarnings.h"
|
|
44
|
+
|
|
45
|
+
#endif // EIGEN_CHOLESKY_MODULE_H
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// This Source Code Form is subject to the terms of the Mozilla
|
|
5
|
+
// Public License v. 2.0. If a copy of the MPL was not distributed
|
|
6
|
+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
7
|
+
|
|
8
|
+
#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
|
|
9
|
+
#define EIGEN_CHOLMODSUPPORT_MODULE_H
|
|
10
|
+
|
|
11
|
+
#include "SparseCore"
|
|
12
|
+
|
|
13
|
+
#include "src/Core/util/DisableStupidWarnings.h"
|
|
14
|
+
|
|
15
|
+
extern "C" {
|
|
16
|
+
#include <cholmod.h>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** \ingroup Support_modules
|
|
20
|
+
* \defgroup CholmodSupport_Module CholmodSupport module
|
|
21
|
+
*
|
|
22
|
+
* This module provides an interface to the Cholmod library which is part of the <a href="http://www.suitesparse.com">suitesparse</a> package.
|
|
23
|
+
* It provides the two following main factorization classes:
|
|
24
|
+
* - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
|
|
25
|
+
* - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
|
|
26
|
+
*
|
|
27
|
+
* For the sake of completeness, this module also propose the two following classes:
|
|
28
|
+
* - class CholmodSimplicialLLT
|
|
29
|
+
* - class CholmodSimplicialLDLT
|
|
30
|
+
* Note that these classes does not bring any particular advantage compared to the built-in
|
|
31
|
+
* SimplicialLLT and SimplicialLDLT factorization classes.
|
|
32
|
+
*
|
|
33
|
+
* \code
|
|
34
|
+
* #include <Eigen/CholmodSupport>
|
|
35
|
+
* \endcode
|
|
36
|
+
*
|
|
37
|
+
* In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
|
|
38
|
+
* The dependencies depend on how cholmod has been compiled.
|
|
39
|
+
* For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
#include "src/CholmodSupport/CholmodSupport.h"
|
|
44
|
+
|
|
45
|
+
#include "src/Core/util/ReenableStupidWarnings.h"
|
|
46
|
+
|
|
47
|
+
#endif // EIGEN_CHOLMODSUPPORT_MODULE_H
|
|
48
|
+
|