├── Baselines ├── FGR.py ├── GCTR_matlab │ ├── ReadAndRun │ │ ├── RunGCTR.m │ │ ├── RunGCTRN.m │ │ ├── RunGCTRS.m │ │ ├── RunGCTRT.m │ │ ├── RunGCTRTT.m │ │ ├── RunGCTR_CS.m │ │ ├── Untitled.m │ │ ├── correspondence3.txt │ │ ├── demo.m │ │ ├── pose.txt │ │ ├── pose_gt.txt │ │ ├── read_ply.m │ │ ├── tensorMatching.m │ │ ├── writeCorrespondence.m │ │ └── write_ply.m │ ├── RunScript.m │ ├── RunScript_cs.m │ ├── addPath.m │ ├── ann_mwrapper │ │ ├── Contents.m │ │ ├── Copyright.txt │ │ ├── License.txt │ │ ├── Readme.htm │ │ ├── ann_1.1.1 │ │ │ ├── Copyright.txt │ │ │ ├── License.txt │ │ │ ├── MS_Win32 │ │ │ │ ├── Ann.sln │ │ │ │ ├── Ann.sln.old │ │ │ │ ├── Makefile │ │ │ │ ├── ann2fig │ │ │ │ │ ├── ann2fig.vcproj │ │ │ │ │ └── ann2fig.vcproj.7.10.old │ │ │ │ ├── dll │ │ │ │ │ ├── dll.vcproj │ │ │ │ │ └── dll.vcproj.7.10.old │ │ │ │ ├── sample │ │ │ │ │ ├── sample.vcproj │ │ │ │ │ └── sample.vcproj.7.10.old │ │ │ │ └── test │ │ │ │ │ ├── test.vcproj │ │ │ │ │ └── test.vcproj.7.10.old │ │ │ ├── Make-config │ │ │ ├── Makefile │ │ │ ├── ReadMe.txt │ │ │ ├── ann2fig │ │ │ │ ├── Makefile │ │ │ │ └── ann2fig.cpp │ │ │ ├── doc │ │ │ │ └── ANNmanual.pdf │ │ │ ├── include │ │ │ │ └── ANN │ │ │ │ │ ├── ANN.h │ │ │ │ │ ├── ANNperf.h │ │ │ │ │ └── ANNx.h │ │ │ ├── sample │ │ │ │ ├── Makefile │ │ │ │ ├── ann_sample.cpp │ │ │ │ ├── data.pts │ │ │ │ ├── query.pts │ │ │ │ └── sample.save │ │ │ ├── src │ │ │ │ ├── ANN.cpp │ │ │ │ ├── Makefile │ │ │ │ ├── bd_fix_rad_search.cpp │ │ │ │ ├── bd_pr_search.cpp │ │ │ │ ├── bd_search.cpp │ │ │ │ ├── bd_tree.cpp │ │ │ │ ├── bd_tree.h │ │ │ │ ├── brute.cpp │ │ │ │ ├── kd_dump.cpp │ │ │ │ ├── kd_fix_rad_search.cpp │ │ │ │ ├── kd_fix_rad_search.h │ │ │ │ ├── kd_pr_search.cpp │ │ │ │ ├── kd_pr_search.h │ │ │ │ ├── kd_search.cpp │ │ │ │ ├── kd_search.h │ │ │ │ ├── kd_split.cpp │ │ │ │ ├── kd_split.h │ │ │ │ ├── kd_tree.cpp │ │ │ │ ├── kd_tree.h │ │ │ │ ├── kd_util.cpp │ │ │ │ ├── kd_util.h │ │ │ │ ├── perf.cpp │ │ │ │ ├── pr_queue.h │ │ │ │ └── pr_queue_k.h │ │ │ └── test │ │ │ │ ├── Makefile │ │ │ │ ├── ann_test.cpp │ │ │ │ ├── rand.cpp │ │ │ │ ├── rand.h │ │ │ │ ├── test1-data.pts │ │ │ │ ├── test1-query.pts │ │ │ │ ├── test1.in │ │ │ │ ├── test1.save │ │ │ │ ├── test2-data.pts │ │ │ │ ├── test2-query.pts │ │ │ │ ├── test2.in │ │ │ │ └── test2.save │ │ ├── ann_compile_mex.m │ │ ├── anngplot.m │ │ ├── annquery.m │ │ ├── annquery_demo.m │ │ ├── doc │ │ │ ├── helps │ │ │ │ ├── mdoc.ann_mwrapper.ann_compile_mex.mfile.xml │ │ │ │ ├── mdoc.ann_mwrapper.anngplot.mfile.xml │ │ │ │ ├── mdoc.ann_mwrapper.annquery.mfile.xml │ │ │ │ └── mdoc.ann_mwrapper.mdir.xml │ │ │ ├── mdir_doc.css │ │ │ ├── mdir_doc.xsl │ │ │ ├── mfile_doc.css │ │ │ └── mfile_doc.xsl │ │ └── private │ │ │ ├── ann_mex.cpp │ │ │ ├── ann_mex.mexa64 │ │ │ ├── ann_mex.mexw32 │ │ │ ├── ann_mex.mexw64 │ │ │ ├── setopts.m │ │ │ └── showdoc.m │ ├── correspondence3.txt │ ├── demo.m │ ├── grtc.txt │ ├── install.m │ ├── mexSource │ │ ├── Eigen │ │ │ ├── Array │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky │ │ │ ├── CholmodSupport │ │ │ ├── Core │ │ │ ├── Dense │ │ │ ├── Eigen │ │ │ ├── Eigen2Support │ │ │ ├── Eigenvalues │ │ │ ├── Geometry │ │ │ ├── Householder │ │ │ ├── IterativeLinearSolvers │ │ │ ├── Jacobi │ │ │ ├── LU │ │ │ ├── LeastSquares │ │ │ ├── MetisSupport │ │ │ ├── OrderingMethods │ │ │ ├── PaStiXSupport │ │ │ ├── PardisoSupport │ │ │ ├── QR │ │ │ ├── QtAlignedMalloc │ │ │ ├── SPQRSupport │ │ │ ├── SVD │ │ │ ├── Sparse │ │ │ ├── SparseCholesky │ │ │ ├── SparseCore │ │ │ ├── SparseLU │ │ │ ├── SparseQR │ │ │ ├── StdDeque │ │ │ ├── StdList │ │ │ ├── StdVector │ │ │ ├── SuperLUSupport │ │ │ ├── UmfPackSupport │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Cholesky │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── LDLT.h │ │ │ │ ├── LLT.h │ │ │ │ └── LLT_MKL.h │ │ │ │ ├── CholmodSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── CholmodSupport.h │ │ │ │ ├── Core │ │ │ │ ├── Array.h │ │ │ │ ├── ArrayBase.h │ │ │ │ ├── ArrayWrapper.h │ │ │ │ ├── Assign.h │ │ │ │ ├── Assign_MKL.h │ │ │ │ ├── BandMatrix.h │ │ │ │ ├── Block.h │ │ │ │ ├── BooleanRedux.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── CommaInitializer.h │ │ │ │ ├── CoreIterators.h │ │ │ │ ├── CwiseBinaryOp.h │ │ │ │ ├── CwiseNullaryOp.h │ │ │ │ ├── CwiseUnaryOp.h │ │ │ │ ├── CwiseUnaryView.h │ │ │ │ ├── DenseBase.h │ │ │ │ ├── DenseCoeffsBase.h │ │ │ │ ├── DenseStorage.h │ │ │ │ ├── Diagonal.h │ │ │ │ ├── DiagonalMatrix.h │ │ │ │ ├── DiagonalProduct.h │ │ │ │ ├── Dot.h │ │ │ │ ├── EigenBase.h │ │ │ │ ├── Flagged.h │ │ │ │ ├── ForceAlignedAccess.h │ │ │ │ ├── Functors.h │ │ │ │ ├── Fuzzy.h │ │ │ │ ├── GeneralProduct.h │ │ │ │ ├── GenericPacketMath.h │ │ │ │ ├── GlobalFunctions.h │ │ │ │ ├── IO.h │ │ │ │ ├── Map.h │ │ │ │ ├── MapBase.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── Matrix.h │ │ │ │ ├── MatrixBase.h │ │ │ │ ├── NestByValue.h │ │ │ │ ├── NoAlias.h │ │ │ │ ├── NumTraits.h │ │ │ │ ├── PermutationMatrix.h │ │ │ │ ├── PlainObjectBase.h │ │ │ │ ├── ProductBase.h │ │ │ │ ├── Random.h │ │ │ │ ├── Redux.h │ │ │ │ ├── Ref.h │ │ │ │ ├── Replicate.h │ │ │ │ ├── ReturnByValue.h │ │ │ │ ├── Reverse.h │ │ │ │ ├── Select.h │ │ │ │ ├── SelfAdjointView.h │ │ │ │ ├── SelfCwiseBinaryOp.h │ │ │ │ ├── SolveTriangular.h │ │ │ │ ├── StableNorm.h │ │ │ │ ├── Stride.h │ │ │ │ ├── Swap.h │ │ │ │ ├── Transpose.h │ │ │ │ ├── Transpositions.h │ │ │ │ ├── TriangularMatrix.h │ │ │ │ ├── VectorBlock.h │ │ │ │ ├── VectorwiseOp.h │ │ │ │ ├── Visitor.h │ │ │ │ ├── arch │ │ │ │ │ ├── AltiVec │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Default │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── Settings.h │ │ │ │ │ ├── NEON │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ └── PacketMath.h │ │ │ │ │ └── SSE │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── Complex.h │ │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ │ └── PacketMath.h │ │ │ │ ├── products │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── CoeffBasedProduct.h │ │ │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ │ │ ├── GeneralMatrixMatrix.h │ │ │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ │ │ ├── GeneralMatrixMatrixTriangular_MKL.h │ │ │ │ │ ├── GeneralMatrixMatrix_MKL.h │ │ │ │ │ ├── GeneralMatrixVector.h │ │ │ │ │ ├── GeneralMatrixVector_MKL.h │ │ │ │ │ ├── Parallelizer.h │ │ │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ │ │ ├── SelfadjointMatrixMatrix_MKL.h │ │ │ │ │ ├── SelfadjointMatrixVector.h │ │ │ │ │ ├── SelfadjointMatrixVector_MKL.h │ │ │ │ │ ├── SelfadjointProduct.h │ │ │ │ │ ├── SelfadjointRank2Update.h │ │ │ │ │ ├── TriangularMatrixMatrix.h │ │ │ │ │ ├── TriangularMatrixMatrix_MKL.h │ │ │ │ │ ├── TriangularMatrixVector.h │ │ │ │ │ ├── TriangularMatrixVector_MKL.h │ │ │ │ │ ├── TriangularSolverMatrix.h │ │ │ │ │ ├── TriangularSolverMatrix_MKL.h │ │ │ │ │ └── TriangularSolverVector.h │ │ │ │ └── util │ │ │ │ │ ├── BlasUtil.h │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Constants.h │ │ │ │ │ ├── DisableStupidWarnings.h │ │ │ │ │ ├── ForwardDeclarations.h │ │ │ │ │ ├── MKL_support.h │ │ │ │ │ ├── Macros.h │ │ │ │ │ ├── Memory.h │ │ │ │ │ ├── Meta.h │ │ │ │ │ ├── NonMPL2.h │ │ │ │ │ ├── ReenableStupidWarnings.h │ │ │ │ │ ├── StaticAssert.h │ │ │ │ │ └── XprHelper.h │ │ │ │ ├── Eigen2Support │ │ │ │ ├── Block.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Cwise.h │ │ │ │ ├── CwiseOperators.h │ │ │ │ ├── Geometry │ │ │ │ │ ├── AlignedBox.h │ │ │ │ │ ├── All.h │ │ │ │ │ ├── AngleAxis.h │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Hyperplane.h │ │ │ │ │ ├── ParametrizedLine.h │ │ │ │ │ ├── Quaternion.h │ │ │ │ │ ├── Rotation2D.h │ │ │ │ │ ├── RotationBase.h │ │ │ │ │ ├── Scaling.h │ │ │ │ │ ├── Transform.h │ │ │ │ │ └── Translation.h │ │ │ │ ├── LU.h │ │ │ │ ├── Lazy.h │ │ │ │ ├── LeastSquares.h │ │ │ │ ├── Macros.h │ │ │ │ ├── MathFunctions.h │ │ │ │ ├── Memory.h │ │ │ │ ├── Meta.h │ │ │ │ ├── Minor.h │ │ │ │ ├── QR.h │ │ │ │ ├── SVD.h │ │ │ │ ├── TriangularSolver.h │ │ │ │ └── VectorBlock.h │ │ │ │ ├── Eigenvalues │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ComplexEigenSolver.h │ │ │ │ ├── ComplexSchur.h │ │ │ │ ├── ComplexSchur_MKL.h │ │ │ │ ├── EigenSolver.h │ │ │ │ ├── GeneralizedEigenSolver.h │ │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ │ │ ├── HessenbergDecomposition.h │ │ │ │ ├── MatrixBaseEigenvalues.h │ │ │ │ ├── RealQZ.h │ │ │ │ ├── RealSchur.h │ │ │ │ ├── RealSchur_MKL.h │ │ │ │ ├── SelfAdjointEigenSolver.h │ │ │ │ ├── SelfAdjointEigenSolver_MKL.h │ │ │ │ └── Tridiagonalization.h │ │ │ │ ├── Geometry │ │ │ │ ├── AlignedBox.h │ │ │ │ ├── AngleAxis.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── EulerAngles.h │ │ │ │ ├── Homogeneous.h │ │ │ │ ├── Hyperplane.h │ │ │ │ ├── OrthoMethods.h │ │ │ │ ├── ParametrizedLine.h │ │ │ │ ├── Quaternion.h │ │ │ │ ├── Rotation2D.h │ │ │ │ ├── RotationBase.h │ │ │ │ ├── Scaling.h │ │ │ │ ├── Transform.h │ │ │ │ ├── Translation.h │ │ │ │ ├── Umeyama.h │ │ │ │ └── arch │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Geometry_SSE.h │ │ │ │ ├── Householder │ │ │ │ ├── BlockHouseholder.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Householder.h │ │ │ │ └── HouseholderSequence.h │ │ │ │ ├── IterativeLinearSolvers │ │ │ │ ├── BasicPreconditioners.h │ │ │ │ ├── BiCGSTAB.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ConjugateGradient.h │ │ │ │ ├── IncompleteLUT.h │ │ │ │ └── IterativeSolverBase.h │ │ │ │ ├── Jacobi │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Jacobi.h │ │ │ │ ├── LU │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Determinant.h │ │ │ │ ├── FullPivLU.h │ │ │ │ ├── Inverse.h │ │ │ │ ├── PartialPivLU.h │ │ │ │ ├── PartialPivLU_MKL.h │ │ │ │ └── arch │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Inverse_SSE.h │ │ │ │ ├── MetisSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── MetisSupport.h │ │ │ │ ├── OrderingMethods │ │ │ │ ├── Amd.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Eigen_Colamd.h │ │ │ │ └── Ordering.h │ │ │ │ ├── PaStiXSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── PaStiXSupport.h │ │ │ │ ├── PardisoSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── PardisoSupport.h │ │ │ │ ├── QR │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── ColPivHouseholderQR.h │ │ │ │ ├── ColPivHouseholderQR_MKL.h │ │ │ │ ├── FullPivHouseholderQR.h │ │ │ │ ├── HouseholderQR.h │ │ │ │ └── HouseholderQR_MKL.h │ │ │ │ ├── SPQRSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── SuiteSparseQRSupport.h │ │ │ │ ├── SVD │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── JacobiSVD.h │ │ │ │ ├── JacobiSVD_MKL.h │ │ │ │ └── UpperBidiagonalization.h │ │ │ │ ├── SparseCholesky │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── SimplicialCholesky.h │ │ │ │ └── SimplicialCholesky_impl.h │ │ │ │ ├── SparseCore │ │ │ │ ├── AmbiVector.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── CompressedStorage.h │ │ │ │ ├── ConservativeSparseSparseProduct.h │ │ │ │ ├── MappedSparseMatrix.h │ │ │ │ ├── SparseBlock.h │ │ │ │ ├── SparseColEtree.h │ │ │ │ ├── SparseCwiseBinaryOp.h │ │ │ │ ├── SparseCwiseUnaryOp.h │ │ │ │ ├── SparseDenseProduct.h │ │ │ │ ├── SparseDiagonalProduct.h │ │ │ │ ├── SparseDot.h │ │ │ │ ├── SparseFuzzy.h │ │ │ │ ├── SparseMatrix.h │ │ │ │ ├── SparseMatrixBase.h │ │ │ │ ├── SparsePermutation.h │ │ │ │ ├── SparseProduct.h │ │ │ │ ├── SparseRedux.h │ │ │ │ ├── SparseSelfAdjointView.h │ │ │ │ ├── SparseSparseProductWithPruning.h │ │ │ │ ├── SparseTranspose.h │ │ │ │ ├── SparseTriangularView.h │ │ │ │ ├── SparseUtil.h │ │ │ │ ├── SparseVector.h │ │ │ │ ├── SparseView.h │ │ │ │ └── TriangularSolver.h │ │ │ │ ├── SparseLU │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── SparseLU.h │ │ │ │ ├── SparseLUImpl.h │ │ │ │ ├── SparseLU_Memory.h │ │ │ │ ├── SparseLU_Structs.h │ │ │ │ ├── SparseLU_SupernodalMatrix.h │ │ │ │ ├── SparseLU_Utils.h │ │ │ │ ├── SparseLU_column_bmod.h │ │ │ │ ├── SparseLU_column_dfs.h │ │ │ │ ├── SparseLU_copy_to_ucol.h │ │ │ │ ├── SparseLU_gemm_kernel.h │ │ │ │ ├── SparseLU_heap_relax_snode.h │ │ │ │ ├── SparseLU_kernel_bmod.h │ │ │ │ ├── SparseLU_panel_bmod.h │ │ │ │ ├── SparseLU_panel_dfs.h │ │ │ │ ├── SparseLU_pivotL.h │ │ │ │ ├── SparseLU_pruneL.h │ │ │ │ └── SparseLU_relax_snode.h │ │ │ │ ├── SparseQR │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── SparseQR.h │ │ │ │ ├── StlSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── StdDeque.h │ │ │ │ ├── StdList.h │ │ │ │ ├── StdVector.h │ │ │ │ └── details.h │ │ │ │ ├── SuperLUSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── SuperLUSupport.h │ │ │ │ ├── UmfPackSupport │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── UmfPackSupport.h │ │ │ │ ├── misc │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Image.h │ │ │ │ ├── Kernel.h │ │ │ │ ├── Solve.h │ │ │ │ ├── SparseSolve.h │ │ │ │ └── blas.h │ │ │ │ └── plugins │ │ │ │ ├── ArrayCwiseBinaryOps.h │ │ │ │ ├── ArrayCwiseUnaryOps.h │ │ │ │ ├── BlockMethods.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ │ ├── CommonCwiseUnaryOps.h │ │ │ │ ├── MatrixCwiseBinaryOps.h │ │ │ │ └── MatrixCwiseUnaryOps.h │ │ ├── mexComputeFeature.cpp │ │ ├── mexComputeFeature.h │ │ ├── mexComputeTensor.cpp │ │ ├── mexOliUtil.h │ │ ├── mexTensorMatching.cpp │ │ ├── mexTensorMatching.h │ │ ├── testComputeFeature.cpp │ │ └── testTensorMatching.cpp │ ├── pose.txt │ ├── pose_gt.txt │ ├── readme.txt │ ├── tensorMatching.m │ └── writeCorrespondence.m ├── ICP │ ├── .gitignore │ ├── config.py │ ├── core │ │ ├── __init__.py │ │ ├── correspondence.py │ │ ├── deep_global_registration.py │ │ ├── knn.py │ │ ├── loss.py │ │ ├── metrics.py │ │ ├── registration.py │ │ └── trainer.py │ ├── dataloader │ │ ├── base_loader.py │ │ ├── crosssource_loader.py │ │ ├── data_loaders.py │ │ ├── inf_sampler.py │ │ ├── kitti_loader.py │ │ ├── split │ │ │ ├── test_3dmatch.txt │ │ │ ├── test_kitti.txt │ │ │ ├── test_modelnet40.txt │ │ │ ├── test_scan2cad.txt │ │ │ ├── train_3dmatch.txt │ │ │ ├── train_kitti.txt │ │ │ ├── train_modelnet40.txt │ │ │ ├── train_scan2cad.txt │ │ │ ├── val_3dmatch.txt │ │ │ ├── val_kitti.txt │ │ │ ├── val_modelnet40.txt │ │ │ └── val_scan2cad.txt │ │ ├── threedmatch_loader.py │ │ └── transforms.py │ ├── demo.py │ ├── model │ │ ├── __init__.py │ │ ├── common.py │ │ ├── pyramidnet.py │ │ ├── residual_block.py │ │ ├── resunet.py │ │ └── simpleunet.py │ ├── readme.txt │ ├── scripts │ │ ├── analyze_stats.py │ │ ├── coarsetofile.py │ │ └── test_crosssource.py │ ├── train.py │ └── util │ │ ├── __init__.py │ │ ├── file.py │ │ ├── integration.py │ │ ├── pointcloud.py │ │ └── timer.py ├── JRMPC │ ├── RunJPMPCSynthetic.m │ ├── RunJPMPCT.m │ ├── RunJPMPCT_cs.m │ ├── RunJRMPC.m │ ├── RunJRMPCS.m │ ├── applyPly.py │ ├── demoJrmpcSynthetic.m │ ├── demoJrmpcTof.m │ ├── jrmpc.m │ ├── mat2off.m │ ├── read_ply.m │ ├── readme.txt │ ├── removePointsAndCenters.m │ ├── rigidICP.m │ ├── runOneTest.m │ ├── runScript.m │ ├── runScript_cs.m │ └── write_ply.m └── README.md ├── Dataloader ├── FGR.py ├── README.md ├── crosssource_loader.py └── example.py └── README.md /Baselines/GCTR_matlab/ReadAndRun/Untitled.m: -------------------------------------------------------------------------------- 1 | tmp12=0.3*rand(1)+0.01 2 | fdsa=0 -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/pose.txt: -------------------------------------------------------------------------------- 1 | 0.975950 0.002109 0.217985 5.005210 2 | -0.005915 0.999841 0.016808 5.057080 3 | -0.217915 -0.017693 0.975807 5.130869 4 | 0.000000 0.000000 0.000000 1.000000 5 | 1.724373 -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/pose_gt.txt: -------------------------------------------------------------------------------- 1 | 0.977843 0.000000 0.209340 5.000000 2 | 0.000000 1.000000 0.000000 5.000000 3 | -0.209340 0.000000 0.977843 5.000000 4 | 0.000000 0.000000 0.000000 1.000000 5 | 1.383541 0.000000 0.000000 0.000000 6 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/read_ply.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/GCTR_matlab/ReadAndRun/read_ply.m -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/tensorMatching.m: -------------------------------------------------------------------------------- 1 | function [X2 score] = tensorMatching(X,P1,P2,indH1,valH1,indH2,valH2,indH3,valH3,nIter,sparsity,stoc) 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 | %function [X2 score] = tensorMatching(X,indH1,valH1,indH2,valH2,indH3,valH3[,nIter,sparsity,stoc]) 4 | %input: 5 | % X / N1 x N2 matrix / initial assignment matrix 6 | % indHi / Nt x i matrix / indices in sparse tensor of order i 7 | % valHi / Nt x 1 / values in sprase tensor of order i 8 | % nIter / scalar integer / number of iteration for the power method 9 | % sparsity / boolean / should the algorithm use the sparsity trick as 10 | % discribed in the article 11 | % stoc / boolean / 0 for no contraint on X, 1 for stochastic 12 | % constraint, 2 for doubly stochastic 13 | % 14 | %output: 15 | % X2 / N1 x N2 matrix / output assignment matrix 16 | % score / scalar / score of the matching (high means good matching) 17 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 | if isempty(indH1) && isempty(valH1) 19 | indH1=int32(zeros(0,1)); 20 | valH1=zeros(0,1); 21 | end 22 | if isempty(indH2) && isempty(valH2) 23 | indH2=int32(zeros(0,2)); 24 | valH2=zeros(0,1); 25 | end 26 | if isempty(indH3) && isempty(valH3) 27 | indH3=int32(zeros(0,3)); 28 | valH3=zeros(0,1); 29 | end 30 | 31 | if nargin<8+2 32 | nIter=200; 33 | end 34 | if nargin<9+2 35 | sparsity=1; 36 | end 37 | if nargin<10+2 38 | stoc=2; 39 | end 40 | [X2, score]=mexTensorMatching(double(X),double(P1),double(P2),int32(indH1),valH1,int32(indH2),valH2,int32(indH3),valH3,nIter,sparsity,stoc); 41 | 42 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/writeCorrespondence.m: -------------------------------------------------------------------------------- 1 | function c=writeCorrespondence(Xc,pathSave) 2 | 3 | fid=fopen(pathSave,'wt'); 4 | [m,n]=size(Xc); 5 | 6 | for i=1:1:m 7 | for j=1:1:n 8 | if(j==n) 9 | fprintf(fid,'%g\n',Xc(i,j)); 10 | else 11 | fprintf(fid,'%g\t',Xc(i,j)); 12 | end 13 | 14 | end 15 | end 16 | 17 | fclose(fid); -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ReadAndRun/write_ply.m: -------------------------------------------------------------------------------- 1 | function write_ply(fname, P,C) 2 | % Written by Chenxi cxliu@ucla.edu 3 | % Input: fname: output file name, e.g. 'data.ply' 4 | % P: 3*m matrix with the rows indicating X, Y, Z 5 | % C: 3*m matrix with the rows indicating R, G, B 6 | 7 | ifColor=0; 8 | num = size(P, 2); 9 | m=size(C,2); 10 | if(m>2) 11 | ifColor=1; 12 | end 13 | header = 'ply\n'; 14 | header = [header, 'format ascii 1.0\n']; 15 | header = [header, 'comment written by XiaoshuiHuang\n']; 16 | header = [header, 'element vertex ', num2str(num), '\n']; 17 | header = [header, 'property float x\n']; 18 | header = [header, 'property float y\n']; 19 | header = [header, 'property float z\n']; 20 | if ifColor==1 21 | header = [header, 'property uchar red\n']; 22 | header = [header, 'property uchar green\n']; 23 | header = [header, 'property uchar blue\n']; 24 | end 25 | header = [header, 'end_header\n']; 26 | 27 | data = [P', double(C')]; 28 | %data=P'; 29 | 30 | fid = fopen(fname, 'w'); 31 | fprintf(fid, header); 32 | dlmwrite(fname, data, '-append', 'delimiter', ' ', 'precision', 7); 33 | fclose(fid); -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/RunScript.m: -------------------------------------------------------------------------------- 1 | % Experimnts for CVPR 2017 2 | % create by Xiaoshui Huang 3 | % date: 2016-09-28 4 | 5 | addPath; 6 | 7 | Experiment=1;%% Experiment: 1 T_Data, 2 Syn_CS, 3 Real_CS 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | if(Experiment==1) 11 | % folder='../../Data/T_data/data'; 12 | % tic; 13 | % for j=1:10 14 | % name=sprintf('Data_%d_%d',40,j); 15 | % RunGCTRT(folder,name); 16 | % end 17 | % for j=1:10 18 | % name=sprintf('Data_%d_%d',50,j); 19 | % RunGCTRT(folder,name); 20 | % end 21 | % end 22 | % toc; 23 | %Run for T_data 24 | folder='../../Data/T_data/dataOut'; 25 | for i=1:10 26 | for j=1:10 27 | name=sprintf('Data_%d_%d',i*10,j); 28 | RunGCTRTT(folder,name); 29 | end 30 | end 31 | end 32 | 33 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 34 | if Experiment==2 35 | %Run for Synthetic cross-source point clouds 36 | folder='../../Data/Syn_CS/CrossSyn/'; 37 | RunGCTRS(folder,'angel'); 38 | RunGCTRS(folder,'armadillo'); 39 | RunGCTRS(folder,'bun_zipper'); 40 | RunGCTRS(folder,'dragon'); 41 | RunGCTRS(folder,'hand'); 42 | RunGCTRS(folder,'happy'); 43 | RunGCTRS(folder,'horse'); 44 | RunGCTRS(folder,'lucy'); 45 | RunGCTRS(folder,'xyzrgb_dragon'); 46 | RunGCTRS(folder,'xyzrgb_statuette'); 47 | end 48 | 49 | if Experiment==4 50 | %Run for Synthetic cross-source point clouds 51 | folder='../../Data/Syn_CS/CVPR2017/'; 52 | RunGCTRN(folder,'angel'); 53 | RunGCTRN(folder,'armadillo'); 54 | RunGCTRN(folder,'bun_zipper'); 55 | RunGCTRN(folder,'dragon'); 56 | RunGCTRN(folder,'hand'); 57 | RunGCTRN(folder,'happy'); 58 | RunGCTRN(folder,'horse'); 59 | RunGCTRN(folder,'lucy'); 60 | RunGCTRN(folder,'xyzrgb_dragon'); 61 | RunGCTRN(folder,'xyzrgb_statuette'); 62 | end 63 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 64 | if Experiment==3 65 | %Run for Real cross-source point clouds 66 | folder='../../Data/Real_CS/'; 67 | % RunGCTR(folder,'1dustbin'); 68 | % RunGCTR(folder,'2fourchair'); 69 | % RunGCTR(folder,'3LabOver'); 70 | % RunGCTR(folder,'4sofapart'); 71 | % RunGCTR(folder,'5threechair'); 72 | % RunGCTR(folder,'6TM'); 73 | RunGCTR(folder,'computercluster1'); 74 | RunGCTR(folder,'corner2'); 75 | RunGCTR(folder,'lab31'); 76 | RunGCTR(folder,'oldercomputer2'); 77 | end -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/RunScript_cs.m: -------------------------------------------------------------------------------- 1 | % Experimnts for CVPR 2017 2 | % create by Xiaoshui Huang 3 | % date: 2016-09-28 4 | 5 | addPath; 6 | 7 | %Run for T_data 8 | folder='../cross-source-dataset'; 9 | filelist = dir(fullfile(folder, '**\*.*')); %get list of files and folders in any subfolder 10 | filelist = filelist(~[filelist.isdir]); %remove folders from list 11 | 12 | names = struct2cell(filelist(:,1)); 13 | [col, num] = size(names); 14 | 15 | recall = 0; 16 | ave_rot = 0; 17 | ave_t = 0; 18 | ave_rot_in = 0; 19 | ave_t_in = 0; 20 | ave_time = 0; 21 | num_success = 0; 22 | rot_threashold = 15; 23 | t_threashold = 0.3; 24 | for i = 0:num/4-1 25 | tic; 26 | folder = cell2mat(names(2,i*4+1)); 27 | filename = cell2mat(names(1,i*4+1)); 28 | T0_path= sprintf('%s/%s',folder,filename); 29 | T0 = importdata(T0_path); 30 | 31 | filename = cell2mat(names(1,i*4+2)); 32 | T1_path= sprintf('%s/%s',folder,filename); 33 | T1 = importdata(T1_path); 34 | 35 | 36 | filename = cell2mat(names(1,i*4+3)); 37 | kinect_path= sprintf('%s/%s',folder,filename); 38 | 39 | filename = cell2mat(names(1,i*4+4)); 40 | lidar_sfm_path= sprintf('%s/%s',folder,filename); 41 | 42 | try 43 | [angle_mse, t_mse] = RunGCTR_CS(kinect_path,lidar_sfm_path,T0,T1); 44 | catch exception 45 | fprintf("error\n") 46 | angle_mse = 50; 47 | t_mse = 1.0; 48 | end 49 | 50 | timeelaps = toc; 51 | if angle_mse<=rot_threashold && t_mse <= t_threashold 52 | ave_rot_in = ave_rot_in + angle_mse; 53 | ave_t_in = ave_t_in + t_mse; 54 | num_success = num_success + 1; 55 | end 56 | 57 | ave_rot = ave_rot + angle_mse; 58 | ave_t = ave_t + t_mse; 59 | ave_time = ave_time + timeelaps; 60 | fprintf("pair%d: rot_error = %.3f, t_erro = %.3f, time=%.3f\n",i,angle_mse,t_mse,ave_time/(i+1)); 61 | end 62 | 63 | recall = num_success/202; 64 | ave_time = ave_time/202; 65 | % display the output 66 | fprintf("recall=%.5f, rot_err = %.3f, trans_err=%.3f, time=%.3f",recall,ave_rot_in/num_success, ave_t_in/num_success, ave_time); 67 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/addPath.m: -------------------------------------------------------------------------------- 1 | function addPath 2 | % Add folders of predefined functions into matlab searching paths. 3 | % 4 | % History 5 | % create - Xiaoshui Huang (Xiaoshui.Huang@student.uts.edu.au), 28-09-2016 6 | 7 | 8 | global footpath; 9 | footpath = cd; 10 | 11 | addpath('ann_mwrapper'); 12 | addpath('mex'); 13 | addpath('ReadAndRun'); 14 | 15 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/Contents.m: -------------------------------------------------------------------------------- 1 | % ANN_MWRAPPER 2 | % 3 | % Files 4 | % ann_compile_mex - Compiles the core-mex files of the ANN Lib 5 | % anngplot - Plots the nearest neighbor graph 6 | % annquery - Performs Approximate K-Nearest-Neighbor query for a set of points 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/Copyright.txt: -------------------------------------------------------------------------------- 1 | ANN MATLAB Wrapper 2 | Version 1.0 3 | Release Date Jul 07, 2007 4 | ----------------------------------------------------- 5 | Copyright (C) 2007 Dahua Lin. All Rights Reserved. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | A copy of the GNU Lesser General Public License is can be found in 18 | the License.txt or online at 19 | 20 | http://www.gnu.org/licenses/ 21 | 22 | To obtain a copy, you may also write to 23 | 24 | the Free Software Foundation, Inc., 25 | 51 Franklin Street, Fifth Floor, 26 | Boston, MA 02110-1301 USA. 27 | 28 | Authors 29 | ------- 30 | Dahua Lin, 31 | dhlin@mit.edu 32 | http://web.mit.edu/dhlin/www/ 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/Copyright.txt: -------------------------------------------------------------------------------- 1 | ANN: Approximate Nearest Neighbors 2 | Version: 1.1.1 3 | Release Date: Aug 4, 2006 4 | ---------------------------------------------------------------------------- 5 | Copyright (c) 1997-2005 University of Maryland and Sunil Arya and David 6 | Mount All Rights Reserved. 7 | 8 | This program is free software; you can redistribute it and/or modify it 9 | under the terms of the GNU Lesser Public License as published by the 10 | Free Software Foundation; either version 2.1 of the License, or (at your 11 | option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but 14 | WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser Public License for more details. 17 | 18 | A copy of the terms and conditions of the license can be found in 19 | License.txt or online at 20 | 21 | http://www.gnu.org/copyleft/lesser.html 22 | 23 | To obtain a copy, write to the Free Software Foundation, Inc., 24 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | 26 | Disclaimer 27 | ---------- 28 | The University of Maryland and the authors make no representations about 29 | the suitability or fitness of this software for any purpose. It is 30 | provided "as is" without express or implied warranty. 31 | --------------------------------------------------------------------- 32 | 33 | Authors 34 | ------- 35 | David Mount 36 | Dept of Computer Science 37 | University of Maryland, 38 | College Park, MD 20742 USA 39 | mount@cs.umd.edu 40 | http://www.cs.umd.edu/~mount/ 41 | 42 | Sunil Arya 43 | Dept of Computer Science 44 | Hong University of Science and Technology 45 | Clearwater Bay, HONG KONG 46 | arya@cs.ust.hk 47 | http://www.cs.ust.hk/faculty/arya/ 48 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/MS_Win32/Ann.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll", "dll\dll.vcproj", "{A7D00B21-CB9C-4BBB-8DEE-51025104F867}" 4 | EndProject 5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "sample\sample.vcproj", "{C76F5A10-7A4A-4546-9414-296DB38BE825}" 6 | ProjectSection(ProjectDependencies) = postProject 7 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 8 | EndProjectSection 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{6AC673C7-7B3F-4520-A761-647B212A4BEF}" 11 | ProjectSection(ProjectDependencies) = postProject 12 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 13 | EndProjectSection 14 | EndProject 15 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ann2fig", "ann2fig\ann2fig.vcproj", "{622DD7D8-0C0A-4303-9176-C9A8AF467E70}" 16 | ProjectSection(ProjectDependencies) = postProject 17 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 18 | EndProjectSection 19 | EndProject 20 | Global 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 22 | Debug|Win32 = Debug|Win32 23 | Release|Win32 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Debug|Win32.Build.0 = Debug|Win32 28 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Release|Win32.ActiveCfg = Release|Win32 29 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Release|Win32.Build.0 = Release|Win32 30 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Debug|Win32.ActiveCfg = Debug|Win32 31 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Debug|Win32.Build.0 = Debug|Win32 32 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Release|Win32.ActiveCfg = Release|Win32 33 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Release|Win32.Build.0 = Release|Win32 34 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Debug|Win32.Build.0 = Debug|Win32 36 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Release|Win32.ActiveCfg = Release|Win32 37 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Release|Win32.Build.0 = Release|Win32 38 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Debug|Win32.ActiveCfg = Debug|Win32 39 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Debug|Win32.Build.0 = Debug|Win32 40 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Release|Win32.ActiveCfg = Release|Win32 41 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Release|Win32.Build.0 = Release|Win32 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/MS_Win32/Ann.sln.old: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll", "dll\dll.vcproj", "{A7D00B21-CB9C-4BBB-8DEE-51025104F867}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "sample\sample.vcproj", "{C76F5A10-7A4A-4546-9414-296DB38BE825}" 7 | ProjectSection(ProjectDependencies) = postProject 8 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 9 | EndProjectSection 10 | EndProject 11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{6AC673C7-7B3F-4520-A761-647B212A4BEF}" 12 | ProjectSection(ProjectDependencies) = postProject 13 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 14 | EndProjectSection 15 | EndProject 16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ann2fig", "ann2fig\ann2fig.vcproj", "{622DD7D8-0C0A-4303-9176-C9A8AF467E70}" 17 | ProjectSection(ProjectDependencies) = postProject 18 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867} = {A7D00B21-CB9C-4BBB-8DEE-51025104F867} 19 | EndProjectSection 20 | EndProject 21 | Global 22 | GlobalSection(SolutionConfiguration) = preSolution 23 | Debug = Debug 24 | Release = Release 25 | EndGlobalSection 26 | GlobalSection(ProjectConfiguration) = postSolution 27 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Debug.ActiveCfg = Debug|Win32 28 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Debug.Build.0 = Debug|Win32 29 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Release.ActiveCfg = Release|Win32 30 | {A7D00B21-CB9C-4BBB-8DEE-51025104F867}.Release.Build.0 = Release|Win32 31 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Debug.ActiveCfg = Debug|Win32 32 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Debug.Build.0 = Debug|Win32 33 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Release.ActiveCfg = Release|Win32 34 | {C76F5A10-7A4A-4546-9414-296DB38BE825}.Release.Build.0 = Release|Win32 35 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Debug.ActiveCfg = Debug|Win32 36 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Debug.Build.0 = Debug|Win32 37 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Release.ActiveCfg = Release|Win32 38 | {6AC673C7-7B3F-4520-A761-647B212A4BEF}.Release.Build.0 = Release|Win32 39 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Debug.ActiveCfg = Debug|Win32 40 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Debug.Build.0 = Debug|Win32 41 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Release.ActiveCfg = Release|Win32 42 | {622DD7D8-0C0A-4303-9176-C9A8AF467E70}.Release.Build.0 = Release|Win32 43 | EndGlobalSection 44 | GlobalSection(ExtensibilityGlobals) = postSolution 45 | EndGlobalSection 46 | GlobalSection(ExtensibilityAddIns) = postSolution 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/MS_Win32/Makefile: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------------------- 2 | # Makefile for Windows Versions. 3 | # 4 | # ANN: Approximate Nearest Neighbors 5 | # Version: 1.1.1 08/04/06 6 | #----------------------------------------------------------------------------- 7 | # Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | # David Mount. All Rights Reserved. 9 | # 10 | # This software and related documentation is part of the Approximate 11 | # Nearest Neighbor Library (ANN). This software is provided under 12 | # the provisions of the Lesser GNU Public License (LGPL). See the 13 | # file ../ReadMe.txt for further information. 14 | # 15 | # The University of Maryland (U.M.) and the authors make no 16 | # representations about the suitability or fitness of this software for 17 | # any purpose. It is provided "as is" without express or implied 18 | # warranty. 19 | #----------------------------------------------------------------------------- 20 | # Revision 1.0 05/03/05 21 | # Initial release 22 | # Revision 1.1.1 08/04/06 23 | # Added copyright/license 24 | #----------------------------------------------------------------------------- 25 | 26 | #----------------------------------------------------------------------------- 27 | # This is not used for compiling the dll. It is just used for cleaning 28 | # things up for distribution. For compilcation, open the Ann.sln 29 | # solution file in Microsoft Windows Visual Studio.NET. 30 | #----------------------------------------------------------------------------- 31 | 32 | default: 33 | @echo "Enter one of the following:" 34 | @echo " make clean remove object files" 35 | @echo " make realclean remove library and executable files" 36 | @echo " " 37 | @echo "See file Makefile for other compilation options." 38 | 39 | #----------------------------------------------------------------------------- 40 | # Remove .o files and core files 41 | #----------------------------------------------------------------------------- 42 | clean: 43 | -rm -f -r ann2fig/Debug ann2fig/Release 44 | -rm -f -r dll/Debug dll/Release 45 | -rm -f -r sample/Debug sample/Release 46 | -rm -f -r test/Debug test/Release 47 | -rm -f Ann.ncb Ann.suo 48 | 49 | #----------------------------------------------------------------------------- 50 | # Remove everthing that can be remade 51 | #----------------------------------------------------------------------------- 52 | realclean: clean 53 | -rm -f bin/* 54 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ANN: Approximate Nearest Neighbors 2 | Version: 1.1.1 3 | Release date: Aug 4, 2006 4 | ---------------------------------------------------------------------------- 5 | Copyright (c) 1997-2005 University of Maryland and Sunil Arya and David 6 | Mount. All Rights Reserved. See Copyright.txt and License.txt for 7 | complete information on terms and conditions of use and distribution of 8 | this software. 9 | ---------------------------------------------------------------------------- 10 | 11 | Authors 12 | ------- 13 | David Mount 14 | Dept of Computer Science 15 | University of Maryland, 16 | College Park, MD 20742 USA 17 | mount@cs.umd.edu 18 | http://www.cs.umd.edu/~mount/ 19 | 20 | Sunil Arya 21 | Dept of Computer Science 22 | Hong University of Science and Technology 23 | Clearwater Bay, HONG KONG 24 | arya@cs.ust.hk 25 | http://www.cs.ust.hk/faculty/arya/ 26 | 27 | Introduction 28 | ------------ 29 | ANN is a library written in the C++ programming language to support both 30 | exact and approximate nearest neighbor searching in spaces of various 31 | dimensions. It was implemented by David M. Mount of the University of 32 | Maryland, and Sunil Arya of the Hong Kong University of Science and 33 | Technology. ANN (pronounced like the name ``Ann'') stands for 34 | Approximate Nearest Neighbors. ANN is also a testbed containing 35 | programs and procedures for generating data sets, collecting and 36 | analyzing statistics on the performance of nearest neighbor algorithms 37 | and data structures, and visualizing the geometric structure of these 38 | data structures. 39 | 40 | The ANN source code and documentation is available from the following 41 | web page: 42 | 43 | http://www.cs.umd.edu/~mount/ANN 44 | 45 | For more information on ANN and its use, see the ``ANN Programming 46 | Manual,'' which is provided with the software distribution. 47 | 48 | ---------------------------------------------------------------------------- 49 | History 50 | Version 0.1 03/04/98 51 | Preliminary release 52 | Version 0.2 06/24/98 53 | Changes for SGI compiler. 54 | Version 1.0 04/01/05 55 | Fixed a number of small bugs 56 | Added dump/load operations 57 | Added annClose to eliminate minor memory leak 58 | Improved compatibility with current C++ compilers 59 | Added compilation for Microsoft Visual Studio.NET 60 | Added compilation for Linux 2.x 61 | Version 1.1 05/03/05 62 | Added make target for Mac OS X 63 | Added fixed-radius range searching and counting 64 | Added instructions on compiling/using ANN on Windows platforms 65 | Fixed minor output bug in ann2fig 66 | Version 1.1.1 08/04/06 67 | Added "planted" distribution 68 | Updated old source comments for GNU LPL. 69 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/doc/ANNmanual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/doc/ANNmanual.pdf -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/sample/data.pts: -------------------------------------------------------------------------------- 1 | -0.297462 0.176102 2 | 0.565538 -0.361496 3 | 0.909313 -0.182785 4 | 0.920712 0.478408 5 | 0.167682 0.0499836 6 | 0.305223 -0.0805835 7 | 0.114973 0.882453 8 | 0.742916 0.16376 9 | 0.0724605 -0.826775 10 | 0.690960 -0.559284 11 | 0.188485 -0.643934 12 | 0.749427 -0.942415 13 | -0.970662 -0.223466 14 | 0.916110 0.879597 15 | 0.927417 -0.382593 16 | -0.711327 0.278713 17 | -0.519172 0.986146 18 | 0.135338 0.924588 19 | -0.0837537 0.61687 20 | 0.0520465 0.896306 21 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/sample/query.pts: -------------------------------------------------------------------------------- 1 | 0.0902484 -0.207129 2 | -0.419567 0.485743 3 | 0.826225 -0.30962 4 | 0.694758 0.987088 5 | -0.410807 -0.465182 6 | -0.836501 0.490184 7 | 0.588289 0.656408 8 | 0.325807 0.38721 9 | -0.532226 -0.727036 10 | -0.52506 -0.853508 11 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/sample/sample.save: -------------------------------------------------------------------------------- 1 | Data Points: 2 | (-0.297462, 0.176102) 3 | (0.565538, -0.361496) 4 | (0.909313, -0.182785) 5 | (0.920712, 0.478408) 6 | (0.167682, 0.0499836) 7 | (0.305223, -0.0805835) 8 | (0.114973, 0.882453) 9 | (0.742916, 0.16376) 10 | (0.0724605, -0.826775) 11 | (0.69096, -0.559284) 12 | (0.188485, -0.643934) 13 | (0.749427, -0.942415) 14 | (-0.970662, -0.223466) 15 | (0.91611, 0.879597) 16 | (0.927417, -0.382593) 17 | (-0.711327, 0.278713) 18 | (-0.519172, 0.986146) 19 | (0.135338, 0.924588) 20 | (-0.0837537, 0.61687) 21 | (0.0520465, 0.896306) 22 | Query point: (0.0902484, -0.207129) 23 | NN: Index Distance 24 | 0 5 0.249455 25 | Query point: (-0.419567, 0.485743) 26 | NN: Index Distance 27 | 0 0 0.332847 28 | Query point: (0.826225, -0.30962) 29 | NN: Index Distance 30 | 0 14 0.124759 31 | Query point: (0.694758, 0.987088) 32 | NN: Index Distance 33 | 0 13 0.246071 34 | Query point: (-0.410807, -0.465182) 35 | NN: Index Distance 36 | 0 8 0.60357 37 | Query point: (-0.836501, 0.490184) 38 | NN: Index Distance 39 | 0 15 0.245741 40 | Query point: (0.588289, 0.656408) 41 | NN: Index Distance 42 | 0 3 0.37708 43 | Query point: (0.325807, 0.38721) 44 | NN: Index Distance 45 | 0 4 0.372458 46 | Query point: (-0.532226, -0.727036) 47 | NN: Index Distance 48 | 0 8 0.612857 49 | Query point: (-0.52506, -0.853508) 50 | NN: Index Distance 51 | 0 8 0.598118 52 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/bd_fix_rad_search.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: bd_fix_rad_search.cpp 3 | // Programmer: David Mount 4 | // Description: Standard bd-tree search 5 | // Last modified: 05/03/05 (Version 1.1) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | // History: 21 | // Revision 1.1 05/03/05 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #include "bd_tree.h" // bd-tree declarations 26 | #include "kd_fix_rad_search.h" // kd-tree FR search declarations 27 | 28 | //---------------------------------------------------------------------- 29 | // Approximate searching for bd-trees. 30 | // See the file kd_FR_search.cpp for general information on the 31 | // approximate nearest neighbor search algorithm. Here we 32 | // include the extensions for shrinking nodes. 33 | //---------------------------------------------------------------------- 34 | 35 | //---------------------------------------------------------------------- 36 | // bd_shrink::ann_FR_search - search a shrinking node 37 | //---------------------------------------------------------------------- 38 | 39 | void ANNbd_shrink::ann_FR_search(ANNdist box_dist) 40 | { 41 | // check dist calc term cond. 42 | if (ANNmaxPtsVisited != 0 && ANNptsVisited > ANNmaxPtsVisited) return; 43 | 44 | ANNdist inner_dist = 0; // distance to inner box 45 | for (int i = 0; i < n_bnds; i++) { // is query point in the box? 46 | if (bnds[i].out(ANNkdFRQ)) { // outside this bounding side? 47 | // add to inner distance 48 | inner_dist = (ANNdist) ANN_SUM(inner_dist, bnds[i].dist(ANNkdFRQ)); 49 | } 50 | } 51 | if (inner_dist <= box_dist) { // if inner box is closer 52 | child[ANN_IN]->ann_FR_search(inner_dist);// search inner child first 53 | child[ANN_OUT]->ann_FR_search(box_dist);// ...then outer child 54 | } 55 | else { // if outer box is closer 56 | child[ANN_OUT]->ann_FR_search(box_dist);// search outer child first 57 | child[ANN_IN]->ann_FR_search(inner_dist);// ...then outer child 58 | } 59 | ANN_FLOP(3*n_bnds) // increment floating ops 60 | ANN_SHR(1) // one more shrinking node 61 | } 62 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/bd_pr_search.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: bd_pr_search.cpp 3 | // Programmer: David Mount 4 | // Description: Priority search for bd-trees 5 | // Last modified: 01/04/05 (Version 1.0) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | //History: 21 | // Revision 0.1 03/04/98 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #include "bd_tree.h" // bd-tree declarations 26 | #include "kd_pr_search.h" // kd priority search declarations 27 | 28 | //---------------------------------------------------------------------- 29 | // Approximate priority searching for bd-trees. 30 | // See the file kd_pr_search.cc for general information on the 31 | // approximate nearest neighbor priority search algorithm. Here 32 | // we include the extensions for shrinking nodes. 33 | //---------------------------------------------------------------------- 34 | 35 | //---------------------------------------------------------------------- 36 | // bd_shrink::ann_search - search a shrinking node 37 | //---------------------------------------------------------------------- 38 | 39 | void ANNbd_shrink::ann_pri_search(ANNdist box_dist) 40 | { 41 | ANNdist inner_dist = 0; // distance to inner box 42 | for (int i = 0; i < n_bnds; i++) { // is query point in the box? 43 | if (bnds[i].out(ANNprQ)) { // outside this bounding side? 44 | // add to inner distance 45 | inner_dist = (ANNdist) ANN_SUM(inner_dist, bnds[i].dist(ANNprQ)); 46 | } 47 | } 48 | if (inner_dist <= box_dist) { // if inner box is closer 49 | if (child[ANN_OUT] != KD_TRIVIAL) // enqueue outer if not trivial 50 | ANNprBoxPQ->insert(box_dist,child[ANN_OUT]); 51 | // continue with inner child 52 | child[ANN_IN]->ann_pri_search(inner_dist); 53 | } 54 | else { // if outer box is closer 55 | if (child[ANN_IN] != KD_TRIVIAL) // enqueue inner if not trivial 56 | ANNprBoxPQ->insert(inner_dist,child[ANN_IN]); 57 | // continue with outer child 58 | child[ANN_OUT]->ann_pri_search(box_dist); 59 | } 60 | ANN_FLOP(3*n_bnds) // increment floating ops 61 | ANN_SHR(1) // one more shrinking node 62 | } 63 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/bd_search.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: bd_search.cpp 3 | // Programmer: David Mount 4 | // Description: Standard bd-tree search 5 | // Last modified: 01/04/05 (Version 1.0) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | // History: 21 | // Revision 0.1 03/04/98 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #include "bd_tree.h" // bd-tree declarations 26 | #include "kd_search.h" // kd-tree search declarations 27 | 28 | //---------------------------------------------------------------------- 29 | // Approximate searching for bd-trees. 30 | // See the file kd_search.cpp for general information on the 31 | // approximate nearest neighbor search algorithm. Here we 32 | // include the extensions for shrinking nodes. 33 | //---------------------------------------------------------------------- 34 | 35 | //---------------------------------------------------------------------- 36 | // bd_shrink::ann_search - search a shrinking node 37 | //---------------------------------------------------------------------- 38 | 39 | void ANNbd_shrink::ann_search(ANNdist box_dist) 40 | { 41 | // check dist calc term cond. 42 | if (ANNmaxPtsVisited != 0 && ANNptsVisited > ANNmaxPtsVisited) return; 43 | 44 | ANNdist inner_dist = 0; // distance to inner box 45 | for (int i = 0; i < n_bnds; i++) { // is query point in the box? 46 | if (bnds[i].out(ANNkdQ)) { // outside this bounding side? 47 | // add to inner distance 48 | inner_dist = (ANNdist) ANN_SUM(inner_dist, bnds[i].dist(ANNkdQ)); 49 | } 50 | } 51 | if (inner_dist <= box_dist) { // if inner box is closer 52 | child[ANN_IN]->ann_search(inner_dist); // search inner child first 53 | child[ANN_OUT]->ann_search(box_dist); // ...then outer child 54 | } 55 | else { // if outer box is closer 56 | child[ANN_OUT]->ann_search(box_dist); // search outer child first 57 | child[ANN_IN]->ann_search(inner_dist); // ...then outer child 58 | } 59 | ANN_FLOP(3*n_bnds) // increment floating ops 60 | ANN_SHR(1) // one more shrinking node 61 | } 62 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/kd_fix_rad_search.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: kd_fix_rad_search.h 3 | // Programmer: Sunil Arya and David Mount 4 | // Description: Standard kd-tree fixed-radius kNN search 5 | // Last modified: 05/03/05 (Version 1.1) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | // History: 21 | // Revision 1.1 05/03/05 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #ifndef ANN_kd_fix_rad_search_H 26 | #define ANN_kd_fix_rad_search_H 27 | 28 | #include "kd_tree.h" // kd-tree declarations 29 | #include "kd_util.h" // kd-tree utilities 30 | #include "pr_queue_k.h" // k-element priority queue 31 | 32 | #include // performance evaluation 33 | 34 | //---------------------------------------------------------------------- 35 | // Global variables 36 | // These are active for the life of each call to 37 | // annRangeSearch(). They are set to save the number of 38 | // variables that need to be passed among the various search 39 | // procedures. 40 | //---------------------------------------------------------------------- 41 | 42 | extern ANNpoint ANNkdFRQ; // query point (static copy) 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/kd_pr_search.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: kd_pr_search.h 3 | // Programmer: Sunil Arya and David Mount 4 | // Description: Priority kd-tree search 5 | // Last modified: 01/04/05 (Version 1.0) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | // History: 21 | // Revision 0.1 03/04/98 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #ifndef ANN_kd_pr_search_H 26 | #define ANN_kd_pr_search_H 27 | 28 | #include "kd_tree.h" // kd-tree declarations 29 | #include "kd_util.h" // kd-tree utilities 30 | #include "pr_queue.h" // priority queue declarations 31 | #include "pr_queue_k.h" // k-element priority queue 32 | 33 | #include // performance evaluation 34 | 35 | //---------------------------------------------------------------------- 36 | // Global variables 37 | // Active for the life of each call to Appx_Near_Neigh() or 38 | // Appx_k_Near_Neigh(). 39 | //---------------------------------------------------------------------- 40 | 41 | extern double ANNprEps; // the error bound 42 | extern int ANNprDim; // dimension of space 43 | extern ANNpoint ANNprQ; // query point 44 | extern double ANNprMaxErr; // max tolerable squared error 45 | extern ANNpointArray ANNprPts; // the points 46 | extern ANNpr_queue *ANNprBoxPQ; // priority queue for boxes 47 | extern ANNmin_k *ANNprPointMK; // set of k closest points 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/src/kd_search.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // File: kd_search.h 3 | // Programmer: Sunil Arya and David Mount 4 | // Description: Standard kd-tree search 5 | // Last modified: 01/04/05 (Version 1.0) 6 | //---------------------------------------------------------------------- 7 | // Copyright (c) 1997-2005 University of Maryland and Sunil Arya and 8 | // David Mount. All Rights Reserved. 9 | // 10 | // This software and related documentation is part of the Approximate 11 | // Nearest Neighbor Library (ANN). This software is provided under 12 | // the provisions of the Lesser GNU Public License (LGPL). See the 13 | // file ../ReadMe.txt for further information. 14 | // 15 | // The University of Maryland (U.M.) and the authors make no 16 | // representations about the suitability or fitness of this software for 17 | // any purpose. It is provided "as is" without express or implied 18 | // warranty. 19 | //---------------------------------------------------------------------- 20 | // History: 21 | // Revision 0.1 03/04/98 22 | // Initial release 23 | //---------------------------------------------------------------------- 24 | 25 | #ifndef ANN_kd_search_H 26 | #define ANN_kd_search_H 27 | 28 | #include "kd_tree.h" // kd-tree declarations 29 | #include "kd_util.h" // kd-tree utilities 30 | #include "pr_queue_k.h" // k-element priority queue 31 | 32 | #include // performance evaluation 33 | 34 | //---------------------------------------------------------------------- 35 | // More global variables 36 | // These are active for the life of each call to annkSearch(). They 37 | // are set to save the number of variables that need to be passed 38 | // among the various search procedures. 39 | //---------------------------------------------------------------------- 40 | 41 | extern int ANNkdDim; // dimension of space (static copy) 42 | extern ANNpoint ANNkdQ; // query point (static copy) 43 | extern double ANNkdMaxErr; // max tolerable squared error 44 | extern ANNpointArray ANNkdPts; // the points (static copy) 45 | extern ANNmin_k *ANNkdPointMK; // set of k closest points 46 | extern int ANNptsVisited; // number of points visited 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/test/test1-data.pts: -------------------------------------------------------------------------------- 1 | -0.297462 0.176102 2 | 0.565538 -0.361496 3 | 0.909313 -0.182785 4 | 0.920712 0.478408 5 | 0.167682 0.0499836 6 | 0.305223 -0.0805835 7 | 0.114973 0.882453 8 | 0.742916 0.16376 9 | 0.0724605 -0.826775 10 | 0.690960 -0.559284 11 | 0.188485 -0.643934 12 | 0.749427 -0.942415 13 | -0.970662 -0.223466 14 | 0.916110 0.879597 15 | 0.927417 -0.382593 16 | -0.711327 0.278713 17 | -0.519172 0.986146 18 | 0.135338 0.924588 19 | -0.0837537 0.61687 20 | 0.0520465 0.896306 21 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/test/test1-query.pts: -------------------------------------------------------------------------------- 1 | 0.0902484 -0.207129 2 | -0.419567 0.485743 3 | 0.826225 -0.30962 4 | 0.694758 0.987088 5 | -0.410807 -0.465182 6 | -0.836501 0.490184 7 | 0.588289 0.656408 8 | 0.325807 0.38721 9 | -0.532226 -0.727036 10 | -0.52506 -0.853508 11 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/test/test1.in: -------------------------------------------------------------------------------- 1 | validate on 2 | stats query_stats 3 | dim 2 4 | data_size 20 5 | query_size 10 6 | read_data_pts test1-data.pts 7 | read_query_pts test1-query.pts 8 | bucket_size 1 9 | near_neigh 3 10 | split_rule suggest 11 | shrink_rule none 12 | build_ann 13 | epsilon 0.0 14 | run_queries standard 15 | run_queries priority 16 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_1.1.1/test/test2.in: -------------------------------------------------------------------------------- 1 | validate on 2 | stats query_stats 3 | dim 8 4 | data_size 5000 5 | read_data_pts test2-data.pts 6 | query_size 100 7 | read_query_pts test2-query.pts 8 | bucket_size 1 9 | near_neigh 3 10 | split_rule suggest 11 | shrink_rule none 12 | build_ann 13 | epsilon 0.0 14 | run_queries standard 15 | run_queries priority 16 | epsilon 0.10 17 | run_queries standard 18 | run_queries priority 19 | epsilon 0.50 20 | run_queries standard 21 | run_queries priority 22 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/ann_compile_mex.m: -------------------------------------------------------------------------------- 1 | function ann_compile_mex() 2 | %ANN_COMPILE_MEX Compiles the core-mex files of the ANN Lib 3 | % 4 | % [ Syntax ] 5 | % - ann_compile_mex 6 | % 7 | % [ Description ] 8 | % - ann_compile_mex re-compiles the mex files. 9 | % 10 | % [ History ] 11 | % - Created by Dahua Lin, on Jul 06, 2007 12 | % 13 | 14 | 15 | %% configurations 16 | 17 | % When you intend to change the configuration, please modify the following 18 | % lines 19 | 20 | ann_lib_root = 'ann_1.1.1'; 21 | 22 | ann_src_dir = [ann_lib_root, '/src']; 23 | ann_inc_dir = [ann_lib_root, '/include']; 24 | 25 | options = {'-O', '-v'}; 26 | 27 | 28 | %% main 29 | 30 | main_file = 'private/ann_mex.cpp'; 31 | output_dir = 'private'; 32 | 33 | src_files = { ... 34 | 'ANN.cpp', ... 35 | 'bd_fix_rad_search.cpp', ... 36 | 'bd_pr_search.cpp', ... 37 | 'bd_search.cpp', ... 38 | 'bd_tree.cpp', ... 39 | 'brute.cpp', ... 40 | 'kd_dump.cpp', ... 41 | 'kd_fix_rad_search.cpp', ... 42 | 'kd_pr_search.cpp', ... 43 | 'kd_search.cpp', ... 44 | 'kd_split.cpp', ... 45 | 'kd_tree.cpp', ... 46 | 'kd_util.cpp', ... 47 | 'perf.cpp' }; 48 | 49 | check_exist(main_file); 50 | 51 | src_paths = cell(size(src_files)); 52 | for i = 1 : length(src_files) 53 | src_paths{i} = [ann_src_dir '/' src_files{i}]; 54 | check_exist(src_paths{i}); 55 | end 56 | 57 | mex(options{:}, ['-I', ann_inc_dir], '-outdir', output_dir, main_file, src_paths{:}); 58 | 59 | 60 | function check_exist(path) 61 | 62 | if ~exist(path, 'file') 63 | error('ann_mwrapper:ann_compile_mex:filenotfound', ... 64 | 'The file %s is not found', path); 65 | end 66 | 67 | 68 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/anngplot.m: -------------------------------------------------------------------------------- 1 | function anngplot(Xr, Xq, nnidx) 2 | %ANNGPLOT Plots the nearest neighbor graph 3 | % 4 | % [ Syntax ] 5 | % - anngplot(Xr, Xq, nnidx) 6 | % - anngplot -doc 7 | % 8 | % [ Arguments ] 9 | % - Xr: the set of reference points (2 x n matrix) 10 | % - Xq: the set of query points (2 x nq matrix) 11 | % - nnidx: the indices of the neighbors (k x n) 12 | % - linespec: the specification of line plotting 13 | % 14 | % [ Description ] 15 | % - anngplot(Xr, Xq, nnidx) plots the graph showing the neighboring 16 | % relations, in which the neighboring points are linked with lines. 17 | % 18 | % In the graph, the blue markers depict the reference points, the 19 | % red markers depict the query points. The neighboring relations 20 | % are expressed by the solid line sections in magenta color. 21 | % 22 | % - anngplot -doc or anngplot('-doc') shows the HTML document of anngplot 23 | % in the MATLAB embedded browser. 24 | % 25 | % [ Remarks ] 26 | % - Only 2D points are supported for plotting. 27 | % 28 | % [ History ] 29 | % - Created by Dahua Lin, on Jul 6, 2007 30 | % 31 | 32 | %% For help 33 | 34 | if nargin == 1 && ischar(Xr) && strcmpi(Xr, '-doc') 35 | showdoc(mfilename('fullpath')); 36 | return; 37 | end 38 | 39 | %% parse and verify input arguments 40 | 41 | error(nargchk(3, 3, nargin)); 42 | 43 | is_normal_matrix = @(x) isnumeric(x) && ndims(x) == 2 && isreal(x) && ~issparse(x); 44 | 45 | assert(is_normal_matrix(Xr), 'ann_mwrapper:anngplot:invalidarg', 'Xr should be a numeric matrix'); 46 | assert(is_normal_matrix(Xq), 'ann_mwrapper:anngplot:invalidarg', 'Xq should be a numeric matrix'); 47 | assert(is_normal_matrix(nnidx), 'ann_mwrapper:anngplot:invalidarg', 'nnidx should be a numeric matrix'); 48 | 49 | d = size(Xr, 1); 50 | [dq, nq] = size(Xq); 51 | 52 | assert(d == dq, 'ann_mwrapper:anngplot:dimmismatch', 'The point dimension of Xr and Xq are not the same.'); 53 | assert(d == 2, 'ann_mwrapper:anngplot:illegaldim', 'The point dimension should be 2 for visualization.'); 54 | assert(size(nnidx, 2) == nq, 'ann_mwrapper:anngplot:sizmismatch', ... 55 | 'The number of columns in nnidx does not equal that in Xq'); 56 | 57 | %% draw the graph 58 | 59 | k = size(nnidx, 1); 60 | qidx = repmat(1:nq, k, 1); 61 | 62 | idx_q = qidx(nnidx > 0); 63 | idx_r = nnidx(nnidx > 0); 64 | ne = numel(idx_r); 65 | 66 | x_coords = reshape([Xq(1, idx_q); Xr(1, idx_r); nan(1, ne)], 1, 3*ne); 67 | y_coords = reshape([Xq(2, idx_q); Xr(2, idx_r); nan(1, ne)], 1, 3*ne); 68 | 69 | edge_spec = 'm-'; 70 | qnode_spec = 'r.'; 71 | rnode_spec = 'b.'; 72 | 73 | plot(x_coords, y_coords, edge_spec, ... 74 | Xr(1, :), Xr(2, :), rnode_spec, ... 75 | Xq(1, :), Xq(2, :), qnode_spec); 76 | 77 | axis equal; 78 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/annquery_demo.m: -------------------------------------------------------------------------------- 1 | function annquery_demo() 2 | %ANNQUERY_DEMO A demo to show how to search and plot with ANN Wrapper 3 | % 4 | % [ History ] 5 | % - Created by Dahua Lin, on Aug 10, 2007 6 | % 7 | 8 | %% Prepare Data Points 9 | ref_pts = rand(2, 300); 10 | query_pts = rand(2, 100); 11 | 12 | %% Do ANN query 13 | k = 4; 14 | nnidx = annquery(ref_pts, query_pts, 3); 15 | 16 | %% Plot the results 17 | anngplot(ref_pts, query_pts, nnidx); 18 | axis([0 1 0 1]); 19 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/doc/helps/mdoc.ann_mwrapper.ann_compile_mex.mfile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Compiles the core-mex files of the ANN Lib 13 | 14 | 15 | 16 | ann_compile_mex 17 | 18 | 19 | 20 | 21 | 22 | 23 | ann_compile_mex re-compiles the mex files. 24 | 25 | 26 | 27 | 28 | 29 | 30 | Created by Dahua Lin, on Jul 06, 2007 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/doc/helps/mdoc.ann_mwrapper.anngplot.mfile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Plots the nearest neighbor graph 20 | 21 | 22 | 23 | anngplot(Xr, Xq, nnidx) 24 | 25 | 26 | anngplot -doc 27 | 28 | 29 | 30 | 31 | 32 | 33 | the set of reference points (2 x n matrix) 34 | 35 | 36 | the set of query points (2 x nq matrix) 37 | 38 | 39 | the indices of the neighbors (k x n) 40 | 41 | 42 | the specification of line plotting 43 | 44 | 45 | 46 | 47 | 48 | 49 | anngplot(Xr, Xq, nnidx) plots the graph showing the neighboring relations, in which the neighboring points are linked with lines. 50 | In the graph, the blue markers depict the reference points, the red markers depict the query points. The neighboring relations are expressed by the solid line sections in magenta color. 51 | 52 | 53 | anngplot -doc or anngplot('-doc') shows the HTML document of anngplot in the MATLAB embedded browser. 54 | 55 | 56 | 57 | 58 | 59 | 60 | Only 2D points are supported for plotting. 61 | 62 | 63 | 64 | 65 | 66 | 67 | Created by Dahua Lin, on Jul 6, 2007 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/doc/helps/mdoc.ann_mwrapper.mdir.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/doc/mdir_doc.css: -------------------------------------------------------------------------------- 1 | 2 | .context_nav 3 | { 4 | background-color:#f0fff0; 5 | color:black; 6 | position:absolute; 7 | width: 100%; 8 | height: 20px; 9 | top: 2px; 10 | } 11 | 12 | .context_link 13 | { 14 | background-color: #a0e0a0; 15 | color: #000080; 16 | font-weight:bold; 17 | position: absolute; 18 | height: 20px; 19 | text-align:center; 20 | } 21 | 22 | .prev 23 | { 24 | width: 80px; 25 | left: 2px; 26 | } 27 | 28 | .next 29 | { 30 | width: 80px; 31 | right: 2px; 32 | } 33 | 34 | .root 35 | { 36 | width: 80px; 37 | right: 51%; 38 | } 39 | 40 | .parent 41 | { 42 | width: 80px; 43 | left: 51%; 44 | } 45 | 46 | 47 | 48 | .doc_title 49 | { 50 | margin-top: 50px; 51 | } 52 | 53 | .list_title 54 | { 55 | font-weight:bold; 56 | color:#800000; 57 | background-color:white; 58 | } 59 | 60 | .brief 61 | { 62 | padding-left:20px 63 | } 64 | 65 | .detailed_list h2 66 | { 67 | color: #400080; 68 | background-color:white; 69 | } 70 | 71 | .content_list h3 72 | { 73 | color: #800000; 74 | background-color:white; 75 | } 76 | 77 | .content_dir_ref 78 | { 79 | color: #800000; 80 | background-color:white; 81 | } 82 | 83 | 84 | .content_table 85 | { 86 | text-align:left; 87 | border:solid; 88 | border-width:1px; 89 | background-color: #fffffa; 90 | color:black; 91 | } 92 | 93 | .content_table th 94 | { 95 | padding: 2px 10px; 96 | } 97 | 98 | .content_table td 99 | { 100 | padding: 2px 10px; 101 | } 102 | 103 | .topref 104 | { 105 | font-size: 75% 106 | } 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/doc/mfile_doc.css: -------------------------------------------------------------------------------- 1 | 2 | .context_nav 3 | { 4 | text-align: center 5 | } 6 | 7 | 8 | .context_nav 9 | { 10 | background-color:#f0fff0; 11 | color:black; 12 | position:absolute; 13 | width: 100%; 14 | height: 20px; 15 | top: 2px; 16 | } 17 | 18 | .context_link 19 | { 20 | background-color: #a0e0a0; 21 | color: #000080; 22 | font-weight:bold; 23 | position: absolute; 24 | height: 20px; 25 | text-align:center; 26 | } 27 | 28 | .prev 29 | { 30 | width: 80px; 31 | left: 2px; 32 | } 33 | 34 | .next 35 | { 36 | width: 80px; 37 | right: 2px; 38 | } 39 | 40 | .root 41 | { 42 | width: 80px; 43 | right: 51%; 44 | } 45 | 46 | .parent 47 | { 48 | width: 80px; 49 | left: 51%; 50 | } 51 | 52 | .mname 53 | { 54 | margin-top: 50px; 55 | } 56 | 57 | .section_name 58 | { 59 | background-color: white; 60 | color: #800000; 61 | text-transform: capitalize; 62 | } 63 | 64 | .mparagraph 65 | { 66 | padding-bottom: 5px; 67 | } 68 | 69 | .mlist_item 70 | { 71 | padding-bottom: 8px; 72 | } 73 | 74 | 75 | .mterm_div 76 | { 77 | padding-top: 8px; 78 | padding-bottom: 12px; 79 | padding-left: 20px; 80 | padding-right: 20px; 81 | } 82 | 83 | .mtermlist 84 | { 85 | border-collapse: collapse; 86 | } 87 | 88 | .mtermlist th 89 | { 90 | font-weight: bold; 91 | text-align: left; 92 | vertical-align: top; 93 | padding: 3px 10px; 94 | border: 1px #e0e0e0 solid; 95 | color: black; 96 | background-color: #f8f8f8; 97 | } 98 | 99 | .mtermlist td 100 | { 101 | text-align: left; 102 | vertical-align: top; 103 | padding: 3px 10px; 104 | border: 1px #e0e0e0 solid; 105 | } 106 | 107 | .mtable_div 108 | { 109 | padding-top: 8px; 110 | padding-bottom: 12px; 111 | padding-left: 20px; 112 | padding-right: 20px; 113 | } 114 | 115 | .mtable 116 | { 117 | border-collapse: collapse; 118 | } 119 | 120 | .mtable caption 121 | { 122 | font-size: 110%; 123 | font-weight: bold; 124 | padding: 10px 20px; 125 | background-color: white; 126 | color: #000080; 127 | } 128 | 129 | .mtable th 130 | { 131 | border-style:solid; 132 | border-width:1px; 133 | border-color:#808080; 134 | background-color: #c0c0c0; 135 | color: black; 136 | padding: 4px 15px; 137 | } 138 | 139 | .mtable td 140 | { 141 | border-style:solid; 142 | border-width:1px; 143 | border-color:#808080; 144 | background-color: white; 145 | color: black; 146 | padding: 4px 15px; 147 | } 148 | 149 | .mcodeblock 150 | { 151 | background-color: #fffff0; 152 | color: #000060; 153 | border-style:solid; 154 | border-width:1px; 155 | border-color:#808080; 156 | padding: 5px 10px; 157 | } 158 | 159 | .mformula_line 160 | { 161 | background-color: #f0f0ff; 162 | color: black; 163 | border-style:solid; 164 | border-width:1px; 165 | border-color:#808080; 166 | padding: 5px 10px; 167 | } 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexa64 -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexw32 -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/GCTR_matlab/ann_mwrapper/private/ann_mex.mexw64 -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/ann_mwrapper/private/showdoc.m: -------------------------------------------------------------------------------- 1 | function showdoc(mpath) 2 | %SHOWDOC Shows the HTML document for an m-file 3 | % 4 | % [ Syntax ] 5 | % - showdoc(mname, mpath) 6 | % 7 | % [ History ] 8 | % - Created by Dahua Lin, on Jul 7, 2007 9 | % 10 | 11 | if exist('web', 'file') == 2 12 | [parent, name] = fileparts(mpath); 13 | docpath = fullfile(parent, 'doc/helps', ['mdoc.ann_mwrapper.' name '.mfile.xml']); 14 | 15 | web(['file:///', docpath], '-notoolbar'); 16 | else 17 | error('ann_mwrapper:showdoc:noweb', ... 18 | 'The MATLAB does not support HTML-browsing.'); 19 | end -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/install.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | cd ann_mwrapper 4 | ann_compile_mex 5 | cd .. 6 | 7 | mex mexSource/mexComputeFeature.cpp -output mex/mexComputeFeature -g 8 | mex mexSource/mexTensorMatching.cpp -output mex/mexTensorMatching -g 9 | 10 | 11 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Array: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ARRAY_MODULE_H 2 | #define EIGEN_ARRAY_MODULE_H 3 | 4 | // include Core first to handle Eigen2 support macros 5 | #include "Core" 6 | 7 | #ifndef EIGEN2_SUPPORT 8 | #error The Eigen/Array header does no longer exist in Eigen3. All that functionality has moved to Eigen/Core. 9 | #endif 10 | 11 | #endif // EIGEN_ARRAY_MODULE_H 12 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | add_subdirectory(src) 20 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Cholesky_Module Cholesky module 9 | * 10 | * 11 | * 12 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 13 | * Those decompositions are accessible via the following MatrixBase methods: 14 | * - MatrixBase::llt(), 15 | * - MatrixBase::ldlt() 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | */ 21 | 22 | #include "src/misc/Solve.h" 23 | #include "src/Cholesky/LLT.h" 24 | #include "src/Cholesky/LDLT.h" 25 | #ifdef EIGEN_USE_LAPACKE 26 | #include "src/Cholesky/LLT_MKL.h" 27 | #endif 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_CHOLESKY_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup CholmodSupport_Module CholmodSupport module 14 | * 15 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 16 | * It provides the two following main factorization classes: 17 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 18 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 19 | * 20 | * For the sake of completeness, this module also propose the two following classes: 21 | * - class CholmodSimplicialLLT 22 | * - class CholmodSimplicialLDLT 23 | * Note that these classes does not bring any particular advantage compared to the built-in 24 | * SimplicialLLT and SimplicialLDLT factorization classes. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * 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. 31 | * The dependencies depend on how cholmod has been compiled. 32 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/misc/Solve.h" 37 | #include "src/misc/SparseSolve.h" 38 | 39 | #include "src/CholmodSupport/CholmodSupport.h" 40 | 41 | 42 | #include "src/Core/util/ReenableStupidWarnings.h" 43 | 44 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 45 | 46 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | #include "Geometry" 13 | 14 | /** \defgroup Eigenvalues_Module Eigenvalues module 15 | * 16 | * 17 | * 18 | * This module mainly provides various eigenvalue solvers. 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::eigenvalues(), 21 | * - MatrixBase::operatorNorm() 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | */ 27 | 28 | #include "src/Eigenvalues/Tridiagonalization.h" 29 | #include "src/Eigenvalues/RealSchur.h" 30 | #include "src/Eigenvalues/EigenSolver.h" 31 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 32 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/HessenbergDecomposition.h" 34 | #include "src/Eigenvalues/ComplexSchur.h" 35 | #include "src/Eigenvalues/ComplexEigenSolver.h" 36 | #include "src/Eigenvalues/RealQZ.h" 37 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 38 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 39 | #ifdef EIGEN_USE_LAPACKE 40 | #include "src/Eigenvalues/RealSchur_MKL.h" 41 | #include "src/Eigenvalues/ComplexSchur_MKL.h" 42 | #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_EIGENVALUES_MODULE_H 48 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 49 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | /** \defgroup Geometry_Module Geometry module 17 | * 18 | * 19 | * 20 | * This module provides support for: 21 | * - fixed-size homogeneous transformations 22 | * - translation, scaling, 2D and 3D rotations 23 | * - quaternions 24 | * - \ref MatrixBase::cross() "cross product" 25 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 26 | * - some linear components: parametrized-lines and hyperplanes 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #include "src/Geometry/OrthoMethods.h" 34 | #include "src/Geometry/EulerAngles.h" 35 | 36 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS 37 | #include "src/Geometry/Homogeneous.h" 38 | #include "src/Geometry/RotationBase.h" 39 | #include "src/Geometry/Rotation2D.h" 40 | #include "src/Geometry/Quaternion.h" 41 | #include "src/Geometry/AngleAxis.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | #endif 54 | 55 | #ifdef EIGEN2_SUPPORT 56 | #include "src/Eigen2Support/Geometry/All.h" 57 | #endif 58 | 59 | #include "src/Core/util/ReenableStupidWarnings.h" 60 | 61 | #endif // EIGEN_GEOMETRY_MODULE_H 62 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 63 | 64 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Householder_Module Householder module 9 | * This module provides Householder transformations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | */ 15 | 16 | #include "src/Householder/Householder.h" 17 | #include "src/Householder/HouseholderSequence.h" 18 | #include "src/Householder/BlockHouseholder.h" 19 | 20 | #include "src/Core/util/ReenableStupidWarnings.h" 21 | 22 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 23 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 24 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 2 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | 7 | #include "src/Core/util/DisableStupidWarnings.h" 8 | 9 | /** 10 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 11 | * 12 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 13 | * Those solvers are accessible via the following classes: 14 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 15 | * - BiCGSTAB for general square matrices. 16 | * 17 | * These iterative solvers are associated with some preconditioners: 18 | * - IdentityPreconditioner - not really useful 19 | * - DiagonalPreconditioner - also called JAcobi preconditioner, work very well on diagonal dominant matrices. 20 | * - IncompleteILUT - incomplete LU factorization with dual thresholding 21 | * 22 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 33 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 34 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 35 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 36 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 41 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Jacobi_Module Jacobi module 9 | * This module provides Jacobi and Givens rotations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | * 15 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 16 | * - MatrixBase::applyOnTheLeft() 17 | * - MatrixBase::applyOnTheRight(). 18 | */ 19 | 20 | #include "src/Jacobi/Jacobi.h" 21 | 22 | #include "src/Core/util/ReenableStupidWarnings.h" 23 | 24 | #endif // EIGEN_JACOBI_MODULE_H 25 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 26 | 27 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup LU_Module LU module 9 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 10 | * This module defines the following MatrixBase methods: 11 | * - MatrixBase::inverse() 12 | * - MatrixBase::determinant() 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "src/misc/Solve.h" 20 | #include "src/misc/Kernel.h" 21 | #include "src/misc/Image.h" 22 | #include "src/LU/FullPivLU.h" 23 | #include "src/LU/PartialPivLU.h" 24 | #ifdef EIGEN_USE_LAPACKE 25 | #include "src/LU/PartialPivLU_MKL.h" 26 | #endif 27 | #include "src/LU/Determinant.h" 28 | #include "src/LU/Inverse.h" 29 | 30 | #if defined EIGEN_VECTORIZE_SSE 31 | #include "src/LU/arch/Inverse_SSE.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/LU.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_LU_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/LeastSquares: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_REGRESSION_MODULE_H 2 | #define EIGEN_REGRESSION_MODULE_H 3 | 4 | #ifndef EIGEN2_SUPPORT 5 | #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT) 6 | #endif 7 | 8 | // exclude from normal eigen3-only documentation 9 | #ifdef EIGEN2_SUPPORT 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Eigenvalues" 16 | #include "Geometry" 17 | 18 | /** \defgroup LeastSquares_Module LeastSquares module 19 | * This module provides linear regression and related features. 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/Eigen2Support/LeastSquares.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN2_SUPPORT 31 | 32 | #endif // EIGEN_REGRESSION_MODULE_H 33 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_METISSUPPORT_MODULE_H 2 | #define EIGEN_METISSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | 13 | /** \ingroup Support_modules 14 | * \defgroup MetisSupport_Module MetisSupport module 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 20 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 21 | */ 22 | 23 | 24 | #include "src/MetisSupport/MetisSupport.h" 25 | 26 | #include "src/Core/util/ReenableStupidWarnings.h" 27 | 28 | #endif // EIGEN_METISSUPPORT_MODULE_H 29 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/OrderingMethods: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ORDERINGMETHODS_MODULE_H 2 | #define EIGEN_ORDERINGMETHODS_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** 9 | * \defgroup OrderingMethods_Module OrderingMethods module 10 | * 11 | * This module is currently for internal use only 12 | * 13 | * It defines various built-in and external ordering methods for sparse matrices. 14 | * They are typically used to reduce the number of elements during 15 | * the sparse matrix decomposition (LLT, LU, QR). 16 | * Precisely, in a preprocessing step, a permutation matrix P is computed using 17 | * those ordering methods and applied to the columns of the matrix. 18 | * Using for instance the sparse Cholesky decomposition, it is expected that 19 | * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). 20 | * 21 | * 22 | * Usage : 23 | * \code 24 | * #include 25 | * \endcode 26 | * 27 | * A simple usage is as a template parameter in the sparse decomposition classes : 28 | * 29 | * \code 30 | * SparseLU > solver; 31 | * \endcode 32 | * 33 | * \code 34 | * SparseQR > solver; 35 | * \endcode 36 | * 37 | * It is possible as well to call directly a particular ordering method for your own purpose, 38 | * \code 39 | * AMDOrdering ordering; 40 | * PermutationMatrix perm; 41 | * SparseMatrix A; 42 | * //Fill the matrix ... 43 | * 44 | * ordering(A, perm); // Call AMD 45 | * \endcode 46 | * 47 | * \note Some of these methods (like AMD or METIS), need the sparsity pattern 48 | * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, 49 | * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. 50 | * If your matrix is already symmetric (at leat in structure), you can avoid that 51 | * by calling the method with a SelfAdjointView type. 52 | * 53 | * \code 54 | * // Call the ordering on the pattern of the lower triangular matrix A 55 | * ordering(A.selfadjointView(), perm); 56 | * \endcode 57 | */ 58 | 59 | #ifndef EIGEN_MPL2_ONLY 60 | #include "src/OrderingMethods/Amd.h" 61 | #endif 62 | 63 | #include "src/OrderingMethods/Ordering.h" 64 | #include "src/Core/util/ReenableStupidWarnings.h" 65 | 66 | #endif // EIGEN_ORDERINGMETHODS_MODULE_H 67 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 2 | #define EIGEN_PASTIXSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | extern "C" { 10 | #include 11 | #include 12 | } 13 | 14 | #ifdef complex 15 | #undef complex 16 | #endif 17 | 18 | /** \ingroup Support_modules 19 | * \defgroup PaStiXSupport_Module PaStiXSupport module 20 | * 21 | * This module provides an interface to the PaSTiX library. 22 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 23 | * It provides the two following main factorization classes: 24 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 25 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 26 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | * 32 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 33 | * The dependencies depend on how PaSTiX has been compiled. 34 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 35 | * 36 | */ 37 | 38 | #include "src/misc/Solve.h" 39 | #include "src/misc/SparseSolve.h" 40 | 41 | #include "src/PaStiXSupport/PaStiXSupport.h" 42 | 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 47 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 2 | #define EIGEN_PARDISOSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup PardisoSupport_Module PardisoSupport module 14 | * 15 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 22 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 23 | * 24 | */ 25 | 26 | #include "src/PardisoSupport/PardisoSupport.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 31 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | /** \defgroup QR_Module QR module 13 | * 14 | * 15 | * 16 | * This module provides various QR decompositions 17 | * This module also provides some MatrixBase methods, including: 18 | * - MatrixBase::qr(), 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/QR/HouseholderQR.h" 27 | #include "src/QR/FullPivHouseholderQR.h" 28 | #include "src/QR/ColPivHouseholderQR.h" 29 | #ifdef EIGEN_USE_LAPACKE 30 | #include "src/QR/HouseholderQR_MKL.h" 31 | #include "src/QR/ColPivHouseholderQR_MKL.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/QR.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #ifdef EIGEN2_SUPPORT 41 | #include "Eigenvalues" 42 | #endif 43 | 44 | #endif // EIGEN_QR_MODULE_H 45 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 46 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EIGEN_QTMALLOC_MODULE_H 3 | #define EIGEN_QTMALLOC_MODULE_H 4 | 5 | #include "Core" 6 | 7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 8 | 9 | #include "src/Core/util/DisableStupidWarnings.h" 10 | 11 | void *qMalloc(size_t size) 12 | { 13 | return Eigen::internal::aligned_malloc(size); 14 | } 15 | 16 | void qFree(void *ptr) 17 | { 18 | Eigen::internal::aligned_free(ptr); 19 | } 20 | 21 | void *qRealloc(void *ptr, size_t size) 22 | { 23 | void* newPtr = Eigen::internal::aligned_malloc(size); 24 | memcpy(newPtr, ptr, size); 25 | Eigen::internal::aligned_free(ptr); 26 | return newPtr; 27 | } 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif 32 | 33 | #endif // EIGEN_QTMALLOC_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 2 | #define EIGEN_SPQRSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SuiteSparseQR.hpp" 9 | 10 | /** \ingroup Support_modules 11 | * \defgroup SPQRSupport_Module SuiteSparseQR module 12 | * 13 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 14 | * 15 | * \code 16 | * #include 17 | * \endcode 18 | * 19 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 20 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | #include "src/CholmodSupport/CholmodSupport.h" 27 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableStupidWarnings.h" 9 | 10 | /** \defgroup SVD_Module SVD module 11 | * 12 | * 13 | * 14 | * This module provides SVD decomposition for matrices (both real and complex). 15 | * This decomposition is accessible via the following MatrixBase method: 16 | * - MatrixBase::jacobiSvd() 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/SVD/JacobiSVD.h" 25 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 26 | #include "src/SVD/JacobiSVD_MKL.h" 27 | #endif 28 | #include "src/SVD/UpperBidiagonalization.h" 29 | 30 | #ifdef EIGEN2_SUPPORT 31 | #include "src/Eigen2Support/SVD.h" 32 | #endif 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_SVD_MODULE_H 37 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 38 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | /** \defgroup Sparse_Module Sparse meta-module 5 | * 6 | * Meta-module including all related modules: 7 | * - \ref SparseCore_Module 8 | * - \ref OrderingMethods_Module 9 | * - \ref SparseCholesky_Module 10 | * - \ref SparseLU_Module 11 | * - \ref SparseQR_Module 12 | * - \ref IterativeLinearSolvers_Module 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "SparseCore" 20 | #include "OrderingMethods" 21 | #include "SparseCholesky" 22 | #include "SparseLU" 23 | #include "SparseQR" 24 | #include "IterativeLinearSolvers" 25 | 26 | #endif // EIGEN_SPARSE_MODULE_H 27 | 28 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 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_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/misc/Solve.h" 38 | #include "src/misc/SparseSolve.h" 39 | #include "src/SparseCholesky/SimplicialCholesky.h" 40 | 41 | #ifndef EIGEN_MPL2_ONLY 42 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 48 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SparseCore: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSECORE_MODULE_H 2 | #define EIGEN_SPARSECORE_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /** 15 | * \defgroup SparseCore_Module SparseCore module 16 | * 17 | * This module provides a sparse matrix representation, and basic associated matrix manipulations 18 | * and operations. 19 | * 20 | * See the \ref TutorialSparse "Sparse tutorial" 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * This module depends on: Core. 27 | */ 28 | 29 | namespace Eigen { 30 | 31 | /** The type used to identify a general sparse storage. */ 32 | struct Sparse {}; 33 | 34 | } 35 | 36 | #include "src/SparseCore/SparseUtil.h" 37 | #include "src/SparseCore/SparseMatrixBase.h" 38 | #include "src/SparseCore/CompressedStorage.h" 39 | #include "src/SparseCore/AmbiVector.h" 40 | #include "src/SparseCore/SparseMatrix.h" 41 | #include "src/SparseCore/MappedSparseMatrix.h" 42 | #include "src/SparseCore/SparseVector.h" 43 | #include "src/SparseCore/SparseBlock.h" 44 | #include "src/SparseCore/SparseTranspose.h" 45 | #include "src/SparseCore/SparseCwiseUnaryOp.h" 46 | #include "src/SparseCore/SparseCwiseBinaryOp.h" 47 | #include "src/SparseCore/SparseDot.h" 48 | #include "src/SparseCore/SparsePermutation.h" 49 | #include "src/SparseCore/SparseRedux.h" 50 | #include "src/SparseCore/SparseFuzzy.h" 51 | #include "src/SparseCore/ConservativeSparseSparseProduct.h" 52 | #include "src/SparseCore/SparseSparseProductWithPruning.h" 53 | #include "src/SparseCore/SparseProduct.h" 54 | #include "src/SparseCore/SparseDenseProduct.h" 55 | #include "src/SparseCore/SparseDiagonalProduct.h" 56 | #include "src/SparseCore/SparseTriangularView.h" 57 | #include "src/SparseCore/SparseSelfAdjointView.h" 58 | #include "src/SparseCore/TriangularSolver.h" 59 | #include "src/SparseCore/SparseView.h" 60 | 61 | #include "src/Core/util/ReenableStupidWarnings.h" 62 | 63 | #endif // EIGEN_SPARSECORE_MODULE_H 64 | 65 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/misc/SparseSolve.h" 25 | 26 | // Ordering interface 27 | #include "OrderingMethods" 28 | 29 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 30 | 31 | #include "src/SparseLU/SparseLU_Structs.h" 32 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 33 | #include "src/SparseLU/SparseLUImpl.h" 34 | #include "src/SparseCore/SparseColEtree.h" 35 | #include "src/SparseLU/SparseLU_Memory.h" 36 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 37 | #include "src/SparseLU/SparseLU_relax_snode.h" 38 | #include "src/SparseLU/SparseLU_pivotL.h" 39 | #include "src/SparseLU/SparseLU_panel_dfs.h" 40 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 41 | #include "src/SparseLU/SparseLU_panel_bmod.h" 42 | #include "src/SparseLU/SparseLU_column_dfs.h" 43 | #include "src/SparseLU/SparseLU_column_bmod.h" 44 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 45 | #include "src/SparseLU/SparseLU_pruneL.h" 46 | #include "src/SparseLU/SparseLU_Utils.h" 47 | #include "src/SparseLU/SparseLU.h" 48 | 49 | #endif // EIGEN_SPARSELU_MODULE_H 50 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSEQR_MODULE_H 2 | #define EIGEN_SPARSEQR_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup SparseQR_Module SparseQR module 9 | * \brief Provides QR decomposition for sparse matrices 10 | * 11 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 12 | * The columns of the input matrix should be reordered to limit the fill-in during the 13 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 14 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 15 | * of built-in and external ordering methods. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | 27 | #include "OrderingMethods" 28 | #include "src/SparseCore/SparseColEtree.h" 29 | #include "src/SparseQR/SparseQR.h" 30 | 31 | #include "src/Core/util/ReenableStupidWarnings.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 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_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 2 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #ifdef EMPTY 9 | #define EIGEN_EMPTY_WAS_ALREADY_DEFINED 10 | #endif 11 | 12 | typedef int int_t; 13 | #include 14 | #include 15 | #include 16 | 17 | // slu_util.h defines a preprocessor token named EMPTY which is really polluting, 18 | // so we remove it in favor of a SUPERLU_EMPTY token. 19 | // If EMPTY was already defined then we don't undef it. 20 | 21 | #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) 22 | # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED 23 | #elif defined(EMPTY) 24 | # undef EMPTY 25 | #endif 26 | 27 | #define SUPERLU_EMPTY (-1) 28 | 29 | namespace Eigen { struct SluMatrix; } 30 | 31 | /** \ingroup Support_modules 32 | * \defgroup SuperLUSupport_Module SuperLUSupport module 33 | * 34 | * This module provides an interface to the SuperLU library. 35 | * It provides the following factorization class: 36 | * - class SuperLU: a supernodal sequential LU factorization. 37 | * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). 38 | * 39 | * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. 40 | * 41 | * \code 42 | * #include 43 | * \endcode 44 | * 45 | * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. 46 | * The dependencies depend on how superlu has been compiled. 47 | * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 48 | * 49 | */ 50 | 51 | #include "src/misc/Solve.h" 52 | #include "src/misc/SparseSolve.h" 53 | 54 | #include "src/SuperLUSupport/SuperLUSupport.h" 55 | 56 | 57 | #include "src/Core/util/ReenableStupidWarnings.h" 58 | 59 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 60 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup UmfPackSupport_Module UmfPackSupport module 14 | * 15 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 16 | * It provides the following factorization class: 17 | * - class UmfPackLU: a multifrontal sequential LU factorization. 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | * 23 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 24 | * The dependencies depend on how umfpack has been compiled. 25 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 26 | * 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/UmfPackSupport/UmfPackSupport.h" 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 37 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 3 | foreach(f ${Eigen_src_subdirectories}) 4 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" ) 5 | add_subdirectory(${f}) 6 | endif() 7 | endforeach() 8 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/CholmodSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_CholmodSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_CholmodSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/CholmodSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/CoreIterators.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 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_COREITERATORS_H 11 | #define EIGEN_COREITERATORS_H 12 | 13 | namespace Eigen { 14 | 15 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 16 | */ 17 | 18 | /** \ingroup SparseCore_Module 19 | * \class InnerIterator 20 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 21 | * 22 | * todo 23 | */ 24 | 25 | // generic version for dense matrix and expressions 26 | template class DenseBase::InnerIterator 27 | { 28 | protected: 29 | typedef typename Derived::Scalar Scalar; 30 | typedef typename Derived::Index Index; 31 | 32 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 33 | public: 34 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 35 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 36 | {} 37 | 38 | EIGEN_STRONG_INLINE Scalar value() const 39 | { 40 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 41 | : m_expression.coeff(m_inner, m_outer); 42 | } 43 | 44 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 45 | 46 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 47 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 48 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 49 | 50 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 51 | 52 | protected: 53 | const Derived& m_expression; 54 | Index m_inner; 55 | const Index m_outer; 56 | const Index m_end; 57 | }; 58 | 59 | } // end namespace Eigen 60 | 61 | #endif // EIGEN_COREITERATORS_H 62 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/util/DisableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_WARNINGS_DISABLED 2 | #define EIGEN_WARNINGS_DISABLED 3 | 4 | #ifdef _MSC_VER 5 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 6 | // 4101 - unreferenced local variable 7 | // 4127 - conditional expression is constant 8 | // 4181 - qualifier applied to reference type ignored 9 | // 4211 - nonstandard extension used : redefined extern to static 10 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 11 | // 4273 - QtAlignedMalloc, inconsistent DLL linkage 12 | // 4324 - structure was padded due to declspec(align()) 13 | // 4512 - assignment operator could not be generated 14 | // 4522 - 'class' : multiple assignment operators specified 15 | // 4700 - uninitialized local variable 'xyz' used 16 | // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 17 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 18 | #pragma warning( push ) 19 | #endif 20 | #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4700 4717 ) 21 | #elif defined __INTEL_COMPILER 22 | // 2196 - routine is both "inline" and "noinline" ("noinline" assumed) 23 | // ICC 12 generates this warning even without any inline keyword, when defining class methods 'inline' i.e. inside of class body 24 | // typedef that may be a reference type. 25 | // 279 - controlling expression is constant 26 | // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case. 27 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 28 | #pragma warning push 29 | #endif 30 | #pragma warning disable 2196 279 31 | #elif defined __clang__ 32 | // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant 33 | // this is really a stupid warning as it warns on compile-time expressions involving enums 34 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 35 | #pragma clang diagnostic push 36 | #endif 37 | #pragma clang diagnostic ignored "-Wconstant-logical-operand" 38 | 39 | #elif defined __GNUC__ && __GNUC__>=6 40 | 41 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 42 | #pragma GCC diagnostic push 43 | #endif 44 | #pragma GCC diagnostic ignored "-Wignored-attributes" 45 | 46 | #endif 47 | 48 | #endif // not EIGEN_WARNINGS_DISABLED 49 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #elif defined __GNUC__ && __GNUC__>=6 12 | #pragma GCC diagnostic pop 13 | #endif 14 | 15 | #endif 16 | 17 | #endif // EIGEN_WARNINGS_DISABLED 18 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(Geometry) -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support/Geometry 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/Lazy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Benoit Jacob 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_LAZY_H 11 | #define EIGEN_LAZY_H 12 | 13 | namespace Eigen { 14 | 15 | /** \deprecated it is only used by lazy() which is deprecated 16 | * 17 | * \returns an expression of *this with added flags 18 | * 19 | * Example: \include MatrixBase_marked.cpp 20 | * Output: \verbinclude MatrixBase_marked.out 21 | * 22 | * \sa class Flagged, extract(), part() 23 | */ 24 | template 25 | template 26 | inline const Flagged 27 | MatrixBase::marked() const 28 | { 29 | return derived(); 30 | } 31 | 32 | /** \deprecated use MatrixBase::noalias() 33 | * 34 | * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. 35 | * 36 | * Example: \include MatrixBase_lazy.cpp 37 | * Output: \verbinclude MatrixBase_lazy.out 38 | * 39 | * \sa class Flagged, marked() 40 | */ 41 | template 42 | inline const Flagged 43 | MatrixBase::lazy() const 44 | { 45 | return derived(); 46 | } 47 | 48 | 49 | /** \internal 50 | * Overloaded to perform an efficient C += (A*B).lazy() */ 51 | template 52 | template 53 | Derived& MatrixBase::operator+=(const Flagged, 0, 54 | EvalBeforeAssigningBit>& other) 55 | { 56 | other._expression().derived().addTo(derived()); return derived(); 57 | } 58 | 59 | /** \internal 60 | * Overloaded to perform an efficient C -= (A*B).lazy() */ 61 | template 62 | template 63 | Derived& MatrixBase::operator-=(const Flagged, 0, 64 | EvalBeforeAssigningBit>& other) 65 | { 66 | other._expression().derived().subTo(derived()); return derived(); 67 | } 68 | 69 | } // end namespace Eigen 70 | 71 | #endif // EIGEN_LAZY_H 72 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/Macros.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 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 EIGEN2_MACROS_H 11 | #define EIGEN2_MACROS_H 12 | 13 | #define ei_assert eigen_assert 14 | #define ei_internal_assert eigen_internal_assert 15 | 16 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16 17 | 18 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY 19 | 20 | #endif // EIGEN2_MACROS_H 21 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/MathFunctions.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 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 EIGEN2_MATH_FUNCTIONS_H 11 | #define EIGEN2_MATH_FUNCTIONS_H 12 | 13 | namespace Eigen { 14 | 15 | template inline typename NumTraits::Real ei_real(const T& x) { return numext::real(x); } 16 | template inline typename NumTraits::Real ei_imag(const T& x) { return numext::imag(x); } 17 | template inline T ei_conj(const T& x) { return numext::conj(x); } 18 | template inline typename NumTraits::Real ei_abs (const T& x) { using std::abs; return abs(x); } 19 | template inline typename NumTraits::Real ei_abs2(const T& x) { return numext::abs2(x); } 20 | template inline T ei_sqrt(const T& x) { using std::sqrt; return sqrt(x); } 21 | template inline T ei_exp (const T& x) { using std::exp; return exp(x); } 22 | template inline T ei_log (const T& x) { using std::log; return log(x); } 23 | template inline T ei_sin (const T& x) { using std::sin; return sin(x); } 24 | template inline T ei_cos (const T& x) { using std::cos; return cos(x); } 25 | template inline T ei_atan2(const T& x,const T& y) { using std::atan2; return atan2(x,y); } 26 | template inline T ei_pow (const T& x,const T& y) { return numext::pow(x,y); } 27 | template inline T ei_random () { return internal::random(); } 28 | template inline T ei_random (const T& x, const T& y) { return internal::random(x, y); } 29 | 30 | template inline T precision () { return NumTraits::dummy_precision(); } 31 | template inline T machine_epsilon () { return NumTraits::epsilon(); } 32 | 33 | 34 | template 35 | inline bool ei_isMuchSmallerThan(const Scalar& x, const OtherScalar& y, 36 | typename NumTraits::Real precision = NumTraits::dummy_precision()) 37 | { 38 | return internal::isMuchSmallerThan(x, y, precision); 39 | } 40 | 41 | template 42 | inline bool ei_isApprox(const Scalar& x, const Scalar& y, 43 | typename NumTraits::Real precision = NumTraits::dummy_precision()) 44 | { 45 | return internal::isApprox(x, y, precision); 46 | } 47 | 48 | template 49 | inline bool ei_isApproxOrLessThan(const Scalar& x, const Scalar& y, 50 | typename NumTraits::Real precision = NumTraits::dummy_precision()) 51 | { 52 | return internal::isApproxOrLessThan(x, y, precision); 53 | } 54 | 55 | } // end namespace Eigen 56 | 57 | #endif // EIGEN2_MATH_FUNCTIONS_H 58 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/Memory.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 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 EIGEN2_MEMORY_H 11 | #define EIGEN2_MEMORY_H 12 | 13 | namespace Eigen { 14 | 15 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); } 16 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); } 17 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); } 18 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); } 19 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); } 20 | 21 | template inline void* ei_conditional_aligned_malloc(size_t size) 22 | { 23 | return internal::conditional_aligned_malloc(size); 24 | } 25 | template inline void ei_conditional_aligned_free(void *ptr) 26 | { 27 | internal::conditional_aligned_free(ptr); 28 | } 29 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size) 30 | { 31 | return internal::conditional_aligned_realloc(ptr, new_size, old_size); 32 | } 33 | 34 | template inline T* ei_aligned_new(size_t size) 35 | { 36 | return internal::aligned_new(size); 37 | } 38 | template inline void ei_aligned_delete(T *ptr, size_t size) 39 | { 40 | return internal::aligned_delete(ptr, size); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN2_MACROS_H 46 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/QR.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2011 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN2_QR_H 12 | #define EIGEN2_QR_H 13 | 14 | namespace Eigen { 15 | 16 | template 17 | class QR : public HouseholderQR 18 | { 19 | public: 20 | 21 | typedef HouseholderQR Base; 22 | typedef Block MatrixRBlockType; 23 | 24 | QR() : Base() {} 25 | 26 | template 27 | explicit QR(const T& t) : Base(t) {} 28 | 29 | template 30 | bool solve(const MatrixBase& b, ResultType *result) const 31 | { 32 | *result = static_cast(this)->solve(b); 33 | return true; 34 | } 35 | 36 | MatrixType matrixQ(void) const { 37 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols()); 38 | ret = this->householderQ() * ret; 39 | return ret; 40 | } 41 | 42 | bool isFullRank() const { 43 | return true; 44 | } 45 | 46 | const TriangularView 47 | matrixR(void) const 48 | { 49 | int cols = this->cols(); 50 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView(); 51 | } 52 | }; 53 | 54 | /** \return the QR decomposition of \c *this. 55 | * 56 | * \sa class QR 57 | */ 58 | template 59 | const QR::PlainObject> 60 | MatrixBase::qr() const 61 | { 62 | return QR(eval()); 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN2_QR_H 68 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 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_TRIANGULAR_SOLVER2_H 11 | #define EIGEN_TRIANGULAR_SOLVER2_H 12 | 13 | namespace Eigen { 14 | 15 | const unsigned int UnitDiagBit = UnitDiag; 16 | const unsigned int SelfAdjointBit = SelfAdjoint; 17 | const unsigned int UpperTriangularBit = Upper; 18 | const unsigned int LowerTriangularBit = Lower; 19 | 20 | const unsigned int UpperTriangular = Upper; 21 | const unsigned int LowerTriangular = Lower; 22 | const unsigned int UnitUpperTriangular = UnitUpper; 23 | const unsigned int UnitLowerTriangular = UnitLower; 24 | 25 | template 26 | template 27 | typename ExpressionType::PlainObject 28 | Flagged::solveTriangular(const MatrixBase& other) const 29 | { 30 | return m_matrix.template triangularView().solve(other.derived()); 31 | } 32 | 33 | template 34 | template 35 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 36 | { 37 | m_matrix.template triangularView().solveInPlace(other.derived()); 38 | } 39 | 40 | } // end namespace Eigen 41 | 42 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 43 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigen2Support/VectorBlock.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN2_VECTORBLOCK_H 12 | #define EIGEN2_VECTORBLOCK_H 13 | 14 | namespace Eigen { 15 | 16 | /** \deprecated use DenseMase::head(Index) */ 17 | template 18 | inline VectorBlock 19 | MatrixBase::start(Index size) 20 | { 21 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 22 | return VectorBlock(derived(), 0, size); 23 | } 24 | 25 | /** \deprecated use DenseMase::head(Index) */ 26 | template 27 | inline const VectorBlock 28 | MatrixBase::start(Index size) const 29 | { 30 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 31 | return VectorBlock(derived(), 0, size); 32 | } 33 | 34 | /** \deprecated use DenseMase::tail(Index) */ 35 | template 36 | inline VectorBlock 37 | MatrixBase::end(Index size) 38 | { 39 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 40 | return VectorBlock(derived(), this->size() - size, size); 41 | } 42 | 43 | /** \deprecated use DenseMase::tail(Index) */ 44 | template 45 | inline const VectorBlock 46 | MatrixBase::end(Index size) const 47 | { 48 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 49 | return VectorBlock(derived(), this->size() - size, size); 50 | } 51 | 52 | /** \deprecated use DenseMase::head() */ 53 | template 54 | template 55 | inline VectorBlock 56 | MatrixBase::start() 57 | { 58 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 59 | return VectorBlock(derived(), 0); 60 | } 61 | 62 | /** \deprecated use DenseMase::head() */ 63 | template 64 | template 65 | inline const VectorBlock 66 | MatrixBase::start() const 67 | { 68 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 69 | return VectorBlock(derived(), 0); 70 | } 71 | 72 | /** \deprecated use DenseMase::tail() */ 73 | template 74 | template 75 | inline VectorBlock 76 | MatrixBase::end() 77 | { 78 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 79 | return VectorBlock(derived(), size() - Size); 80 | } 81 | 82 | /** \deprecated use DenseMase::tail() */ 83 | template 84 | template 85 | inline const VectorBlock 86 | MatrixBase::end() const 87 | { 88 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 89 | return VectorBlock(derived(), size() - Size); 90 | } 91 | 92 | } // end namespace Eigen 93 | 94 | #endif // EIGEN2_VECTORBLOCK_H 95 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Householder/BlockHouseholder.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Vincent Lejeune 5 | // Copyright (C) 2010 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_BLOCK_HOUSEHOLDER_H 12 | #define EIGEN_BLOCK_HOUSEHOLDER_H 13 | 14 | // This file contains some helper function to deal with block householder reflectors 15 | 16 | namespace Eigen { 17 | 18 | namespace internal { 19 | 20 | /** \internal */ 21 | template 22 | void make_block_householder_triangular_factor(TriangularFactorType& triFactor, const VectorsType& vectors, const CoeffsType& hCoeffs) 23 | { 24 | typedef typename TriangularFactorType::Index Index; 25 | typedef typename VectorsType::Scalar Scalar; 26 | const Index nbVecs = vectors.cols(); 27 | eigen_assert(triFactor.rows() == nbVecs && triFactor.cols() == nbVecs && vectors.rows()>=nbVecs); 28 | 29 | for(Index i = 0; i < nbVecs; i++) 30 | { 31 | Index rs = vectors.rows() - i; 32 | Scalar Vii = vectors(i,i); 33 | vectors.const_cast_derived().coeffRef(i,i) = Scalar(1); 34 | triFactor.col(i).head(i).noalias() = -hCoeffs(i) * vectors.block(i, 0, rs, i).adjoint() 35 | * vectors.col(i).tail(rs); 36 | vectors.const_cast_derived().coeffRef(i, i) = Vii; 37 | // FIXME add .noalias() once the triangular product can work inplace 38 | triFactor.col(i).head(i) = triFactor.block(0,0,i,i).template triangularView() 39 | * triFactor.col(i).head(i); 40 | triFactor(i,i) = hCoeffs(i); 41 | } 42 | } 43 | 44 | /** \internal */ 45 | template 46 | void apply_block_householder_on_the_left(MatrixType& mat, const VectorsType& vectors, const CoeffsType& hCoeffs) 47 | { 48 | typedef typename MatrixType::Index Index; 49 | enum { TFactorSize = MatrixType::ColsAtCompileTime }; 50 | Index nbVecs = vectors.cols(); 51 | Matrix T(nbVecs,nbVecs); 52 | make_block_householder_triangular_factor(T, vectors, hCoeffs); 53 | 54 | const TriangularView& V(vectors); 55 | 56 | // A -= V T V^* A 57 | Matrix tmp = V.adjoint() * mat; 59 | // FIXME add .noalias() once the triangular product can work inplace 60 | tmp = T.template triangularView().adjoint() * tmp; 61 | mat.noalias() -= V * tmp; 62 | } 63 | 64 | } // end namespace internal 65 | 66 | } // end namespace Eigen 67 | 68 | #endif // EIGEN_BLOCK_HOUSEHOLDER_H 69 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/IterativeLinearSolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_IterativeLinearSolvers_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_IterativeLinearSolvers_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/IterativeLinearSolvers COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/MetisSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MetisSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MetisSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/MetisSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/OrderingMethods/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_OrderingMethods_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_OrderingMethods_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/OrderingMethods COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/PaStiXSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PastixSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PastixSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PaStiXSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/PardisoSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PardisoSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PardisoSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PardisoSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SPQRSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SPQRSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SPQRSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SPQRSupport/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseCholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseCore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCore_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCore_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCore COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 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_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | // template 14 | // template 15 | // bool SparseMatrixBase::isApprox( 16 | // const OtherDerived& other, 17 | // typename NumTraits::Real prec 18 | // ) const 19 | // { 20 | // const typename internal::nested::type nested(derived()); 21 | // const typename internal::nested::type otherNested(other.derived()); 22 | // return (nested - otherNested).cwise().abs2().sum() 23 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 24 | // } 25 | 26 | #endif // EIGEN_SPARSE_FUZZY_H 27 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 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_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | for (Index j=0; j 28 | typename internal::traits >::Scalar 29 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 30 | { 31 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 32 | if(this->isCompressed()) 33 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 34 | else 35 | return Base::sum(); 36 | } 37 | 38 | template 39 | typename internal::traits >::Scalar 40 | SparseVector<_Scalar,_Options,_Index>::sum() const 41 | { 42 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 43 | return Matrix::Map(m_data.valuePtr(), m_data.size()).sum(); 44 | } 45 | 46 | } // end namespace Eigen 47 | 48 | #endif // EIGEN_SPARSEREDUX_H 49 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseCore/SparseTranspose.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 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_SPARSETRANSPOSE_H 11 | #define EIGEN_SPARSETRANSPOSE_H 12 | 13 | namespace Eigen { 14 | 15 | template class TransposeImpl 16 | : public SparseMatrixBase > 17 | { 18 | typedef typename internal::remove_all::type _MatrixTypeNested; 19 | public: 20 | 21 | EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose ) 22 | 23 | class InnerIterator; 24 | class ReverseInnerIterator; 25 | 26 | inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); } 27 | }; 28 | 29 | // NOTE: VC10 and VC11 trigger an ICE if don't put typename TransposeImpl:: in front of Index, 30 | // a typedef typename TransposeImpl::Index Index; 31 | // does not fix the issue. 32 | // An alternative is to define the nested class in the parent class itself. 33 | template class TransposeImpl::InnerIterator 34 | : public _MatrixTypeNested::InnerIterator 35 | { 36 | typedef typename _MatrixTypeNested::InnerIterator Base; 37 | typedef typename TransposeImpl::Index Index; 38 | public: 39 | 40 | EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, typename TransposeImpl::Index outer) 41 | : Base(trans.derived().nestedExpression(), outer) 42 | {} 43 | typename TransposeImpl::Index row() const { return Base::col(); } 44 | typename TransposeImpl::Index col() const { return Base::row(); } 45 | }; 46 | 47 | template class TransposeImpl::ReverseInnerIterator 48 | : public _MatrixTypeNested::ReverseInnerIterator 49 | { 50 | typedef typename _MatrixTypeNested::ReverseInnerIterator Base; 51 | typedef typename TransposeImpl::Index Index; 52 | public: 53 | 54 | EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, typename TransposeImpl::Index outer) 55 | : Base(xpr.derived().nestedExpression(), outer) 56 | {} 57 | typename TransposeImpl::Index row() const { return Base::col(); } 58 | typename TransposeImpl::Index col() const { return Base::row(); } 59 | }; 60 | 61 | } // end namespace Eigen 62 | 63 | #endif // EIGEN_SPARSETRANSPOSE_H 64 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseLU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseLU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseLU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseLU COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseLU/SparseLU_Utils.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 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 | 11 | #ifndef EIGEN_SPARSELU_UTILS_H 12 | #define EIGEN_SPARSELU_UTILS_H 13 | 14 | namespace Eigen { 15 | namespace internal { 16 | 17 | /** 18 | * \brief Count Nonzero elements in the factors 19 | */ 20 | template 21 | void SparseLUImpl::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu) 22 | { 23 | nnzL = 0; 24 | nnzU = (glu.xusub)(n); 25 | Index nsuper = (glu.supno)(n); 26 | Index jlen; 27 | Index i, j, fsupc; 28 | if (n <= 0 ) return; 29 | // For each supernode 30 | for (i = 0; i <= nsuper; i++) 31 | { 32 | fsupc = glu.xsup(i); 33 | jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); 34 | 35 | for (j = fsupc; j < glu.xsup(i+1); j++) 36 | { 37 | nnzL += jlen; 38 | nnzU += j - fsupc + 1; 39 | jlen--; 40 | } 41 | } 42 | } 43 | 44 | /** 45 | * \brief Fix up the data storage lsub for L-subscripts. 46 | * 47 | * It removes the subscripts sets for structural pruning, 48 | * and applies permutation to the remaining subscripts 49 | * 50 | */ 51 | template 52 | void SparseLUImpl::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu) 53 | { 54 | Index fsupc, i, j, k, jstart; 55 | 56 | Index nextl = 0; 57 | Index nsuper = (glu.supno)(n); 58 | 59 | // For each supernode 60 | for (i = 0; i <= nsuper; i++) 61 | { 62 | fsupc = glu.xsup(i); 63 | jstart = glu.xlsub(fsupc); 64 | glu.xlsub(fsupc) = nextl; 65 | for (j = jstart; j < glu.xlsub(fsupc + 1); j++) 66 | { 67 | glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A 68 | nextl++; 69 | } 70 | for (k = fsupc+1; k < glu.xsup(i+1); k++) 71 | glu.xlsub(k) = nextl; // other columns in supernode i 72 | } 73 | 74 | glu.xlsub(n) = nextl; 75 | } 76 | 77 | } // end namespace internal 78 | 79 | } // end namespace Eigen 80 | #endif // EIGEN_SPARSELU_UTILS_H 81 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseLU/SparseLU_relax_snode.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 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 | /* This file is a modified version of heap_relax_snode.c file in SuperLU 11 | * -- SuperLU routine (version 3.0) -- 12 | * Univ. of California Berkeley, Xerox Palo Alto Research Center, 13 | * and Lawrence Berkeley National Lab. 14 | * October 15, 2003 15 | * 16 | * Copyright (c) 1994 by Xerox Corporation. All rights reserved. 17 | * 18 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY 19 | * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. 20 | * 21 | * Permission is hereby granted to use or copy this program for any 22 | * purpose, provided the above notices are retained on all copies. 23 | * Permission to modify the code and to distribute modified code is 24 | * granted, provided the above notices are retained, and a notice that 25 | * the code was modified is included with the above copyright notice. 26 | */ 27 | 28 | #ifndef SPARSELU_RELAX_SNODE_H 29 | #define SPARSELU_RELAX_SNODE_H 30 | 31 | namespace Eigen { 32 | 33 | namespace internal { 34 | 35 | /** 36 | * \brief Identify the initial relaxed supernodes 37 | * 38 | * This routine is applied to a column elimination tree. 39 | * It assumes that the matrix has been reordered according to the postorder of the etree 40 | * \param n the number of columns 41 | * \param et elimination tree 42 | * \param relax_columns Maximum number of columns allowed in a relaxed snode 43 | * \param descendants Number of descendants of each node in the etree 44 | * \param relax_end last column in a supernode 45 | */ 46 | template 47 | void SparseLUImpl::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end) 48 | { 49 | 50 | // compute the number of descendants of each node in the etree 51 | Index j, parent; 52 | relax_end.setConstant(emptyIdxLU); 53 | descendants.setZero(); 54 | for (j = 0; j < n; j++) 55 | { 56 | parent = et(j); 57 | if (parent != n) // not the dummy root 58 | descendants(parent) += descendants(j) + 1; 59 | } 60 | // Identify the relaxed supernodes by postorder traversal of the etree 61 | Index snode_start; // beginning of a snode 62 | for (j = 0; j < n; ) 63 | { 64 | parent = et(j); 65 | snode_start = j; 66 | while ( parent != n && descendants(parent) < relax_columns ) 67 | { 68 | j = parent; 69 | parent = et(j); 70 | } 71 | // Found a supernode in postordered etree, j is the last column 72 | relax_end(snode_start) = j; // Record last column 73 | j++; 74 | // Search for a new leaf 75 | while (descendants(j) != 0 && j < n) j++; 76 | } // End postorder traversal of the etree 77 | 78 | } 79 | 80 | } // end namespace internal 81 | 82 | } // end namespace Eigen 83 | #endif 84 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SparseQR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseQR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseQR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseQR/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/StlSupport/details.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STL_DETAILS_H 12 | #define EIGEN_STL_DETAILS_H 13 | 14 | #ifndef EIGEN_ALIGNED_ALLOCATOR 15 | #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator 16 | #endif 17 | 18 | namespace Eigen { 19 | 20 | // This one is needed to prevent reimplementing the whole std::vector. 21 | template 22 | class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR 23 | { 24 | public: 25 | typedef size_t size_type; 26 | typedef ptrdiff_t difference_type; 27 | typedef T* pointer; 28 | typedef const T* const_pointer; 29 | typedef T& reference; 30 | typedef const T& const_reference; 31 | typedef T value_type; 32 | 33 | template 34 | struct rebind 35 | { 36 | typedef aligned_allocator_indirection other; 37 | }; 38 | 39 | aligned_allocator_indirection() {} 40 | aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} 41 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 42 | template 43 | aligned_allocator_indirection(const aligned_allocator_indirection& ) {} 44 | template 45 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 46 | ~aligned_allocator_indirection() {} 47 | }; 48 | 49 | #ifdef _MSC_VER 50 | 51 | // sometimes, MSVC detects, at compile time, that the argument x 52 | // in std::vector::resize(size_t s,T x) won't be aligned and generate an error 53 | // even if this function is never called. Whence this little wrapper. 54 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \ 55 | typename Eigen::internal::conditional< \ 56 | Eigen::internal::is_arithmetic::value, \ 57 | T, \ 58 | Eigen::internal::workaround_msvc_stl_support \ 59 | >::type 60 | 61 | namespace internal { 62 | template struct workaround_msvc_stl_support : public T 63 | { 64 | inline workaround_msvc_stl_support() : T() {} 65 | inline workaround_msvc_stl_support(const T& other) : T(other) {} 66 | inline operator T& () { return *static_cast(this); } 67 | inline operator const T& () const { return *static_cast(this); } 68 | template 69 | inline T& operator=(const OtherT& other) 70 | { T::operator=(other); return *this; } 71 | inline workaround_msvc_stl_support& operator=(const workaround_msvc_stl_support& other) 72 | { T::operator=(other); return *this; } 73 | }; 74 | } 75 | 76 | #else 77 | 78 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T 79 | 80 | #endif 81 | 82 | } 83 | 84 | #endif // EIGEN_STL_DETAILS_H 85 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/SuperLUSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SuperLUSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SuperLUSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SuperLUSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/UmfPackSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_UmfPackSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_UmfPackSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/UmfPackSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/misc/Kernel.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 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_MISC_KERNEL_H 11 | #define EIGEN_MISC_KERNEL_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class kernel_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix< 25 | typename MatrixType::Scalar, 26 | MatrixType::ColsAtCompileTime, // the number of rows in the "kernel matrix" 27 | // is the number of cols of the original matrix 28 | // so that the product "matrix * kernel = zero" makes sense 29 | Dynamic, // we don't know at compile-time the dimension of the kernel 30 | MatrixType::Options, 31 | MatrixType::MaxColsAtCompileTime, // see explanation for 2nd template parameter 32 | MatrixType::MaxColsAtCompileTime // the kernel is a subspace of the domain space, 33 | // whose dimension is the number of columns of the original matrix 34 | > ReturnType; 35 | }; 36 | 37 | template struct kernel_retval_base 38 | : public ReturnByValue > 39 | { 40 | typedef _DecompositionType DecompositionType; 41 | typedef ReturnByValue Base; 42 | typedef typename Base::Index Index; 43 | 44 | kernel_retval_base(const DecompositionType& dec) 45 | : m_dec(dec), 46 | m_rank(dec.rank()), 47 | m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank) 48 | {} 49 | 50 | inline Index rows() const { return m_dec.cols(); } 51 | inline Index cols() const { return m_cols; } 52 | inline Index rank() const { return m_rank; } 53 | inline const DecompositionType& dec() const { return m_dec; } 54 | 55 | template inline void evalTo(Dest& dst) const 56 | { 57 | static_cast*>(this)->evalTo(dst); 58 | } 59 | 60 | protected: 61 | const DecompositionType& m_dec; 62 | Index m_rank, m_cols; 63 | }; 64 | 65 | } // end namespace internal 66 | 67 | #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \ 68 | typedef typename DecompositionType::MatrixType MatrixType; \ 69 | typedef typename MatrixType::Scalar Scalar; \ 70 | typedef typename MatrixType::RealScalar RealScalar; \ 71 | typedef typename MatrixType::Index Index; \ 72 | typedef Eigen::internal::kernel_retval_base Base; \ 73 | using Base::dec; \ 74 | using Base::rank; \ 75 | using Base::rows; \ 76 | using Base::cols; \ 77 | kernel_retval(const DecompositionType& dec) : Base(dec) {} 78 | 79 | } // end namespace Eigen 80 | 81 | #endif // EIGEN_MISC_KERNEL_H 82 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/misc/Solve.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 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_MISC_SOLVE_H 11 | #define EIGEN_MISC_SOLVE_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | /** \class solve_retval_base 18 | * 19 | */ 20 | template 21 | struct traits > 22 | { 23 | typedef typename DecompositionType::MatrixType MatrixType; 24 | typedef Matrix ReturnType; 30 | }; 31 | 32 | template struct solve_retval_base 33 | : public ReturnByValue > 34 | { 35 | typedef typename remove_all::type RhsNestedCleaned; 36 | typedef _DecompositionType DecompositionType; 37 | typedef ReturnByValue Base; 38 | typedef typename Base::Index Index; 39 | 40 | solve_retval_base(const DecompositionType& dec, const Rhs& rhs) 41 | : m_dec(dec), m_rhs(rhs) 42 | {} 43 | 44 | inline Index rows() const { return m_dec.cols(); } 45 | inline Index cols() const { return m_rhs.cols(); } 46 | inline const DecompositionType& dec() const { return m_dec; } 47 | inline const RhsNestedCleaned& rhs() const { return m_rhs; } 48 | 49 | template inline void evalTo(Dest& dst) const 50 | { 51 | static_cast*>(this)->evalTo(dst); 52 | } 53 | 54 | protected: 55 | const DecompositionType& m_dec; 56 | typename Rhs::Nested m_rhs; 57 | }; 58 | 59 | } // end namespace internal 60 | 61 | #define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType,Rhs) \ 62 | typedef typename DecompositionType::MatrixType MatrixType; \ 63 | typedef typename MatrixType::Scalar Scalar; \ 64 | typedef typename MatrixType::RealScalar RealScalar; \ 65 | typedef typename MatrixType::Index Index; \ 66 | typedef Eigen::internal::solve_retval_base Base; \ 67 | using Base::dec; \ 68 | using Base::rhs; \ 69 | using Base::rows; \ 70 | using Base::cols; \ 71 | solve_retval(const DecompositionType& dec, const Rhs& rhs) \ 72 | : Base(dec, rhs) {} 73 | 74 | } // end namespace Eigen 75 | 76 | #endif // EIGEN_MISC_SOLVE_H 77 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing common coefficient wise functions. 12 | 13 | /** \returns an expression of the difference of \c *this and \a other 14 | * 15 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 16 | * 17 | * \sa class CwiseBinaryOp, operator-=() 18 | */ 19 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,internal::scalar_difference_op) 20 | 21 | /** \returns an expression of the sum of \c *this and \a other 22 | * 23 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 24 | * 25 | * \sa class CwiseBinaryOp, operator+=() 26 | */ 27 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op) 28 | 29 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 30 | * 31 | * The template parameter \a CustomBinaryOp is the type of the functor 32 | * of the custom operator (see class CwiseBinaryOp for an example) 33 | * 34 | * Here is an example illustrating the use of custom functors: 35 | * \include class_CwiseBinaryOp.cpp 36 | * Output: \verbinclude class_CwiseBinaryOp.out 37 | * 38 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 39 | */ 40 | template 41 | EIGEN_STRONG_INLINE const CwiseBinaryOp 42 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 43 | { 44 | return CwiseBinaryOp(derived(), other.derived(), func); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing matrix specifics coefficient wise functions. 12 | 13 | /** \returns an expression of the coefficient-wise absolute value of \c *this 14 | * 15 | * Example: \include MatrixBase_cwiseAbs.cpp 16 | * Output: \verbinclude MatrixBase_cwiseAbs.out 17 | * 18 | * \sa cwiseAbs2() 19 | */ 20 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 21 | cwiseAbs() const { return derived(); } 22 | 23 | /** \returns an expression of the coefficient-wise squared absolute value of \c *this 24 | * 25 | * Example: \include MatrixBase_cwiseAbs2.cpp 26 | * Output: \verbinclude MatrixBase_cwiseAbs2.out 27 | * 28 | * \sa cwiseAbs() 29 | */ 30 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 31 | cwiseAbs2() const { return derived(); } 32 | 33 | /** \returns an expression of the coefficient-wise square root of *this. 34 | * 35 | * Example: \include MatrixBase_cwiseSqrt.cpp 36 | * Output: \verbinclude MatrixBase_cwiseSqrt.out 37 | * 38 | * \sa cwisePow(), cwiseSquare() 39 | */ 40 | inline const CwiseUnaryOp, const Derived> 41 | cwiseSqrt() const { return derived(); } 42 | 43 | /** \returns an expression of the coefficient-wise inverse of *this. 44 | * 45 | * Example: \include MatrixBase_cwiseInverse.cpp 46 | * Output: \verbinclude MatrixBase_cwiseInverse.out 47 | * 48 | * \sa cwiseProduct() 49 | */ 50 | inline const CwiseUnaryOp, const Derived> 51 | cwiseInverse() const { return derived(); } 52 | 53 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/mexComputeFeature.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* feat1 feat2 <- P1 P2 t1 type */ 4 | 5 | 6 | #include "mex.h" 7 | #include "math.h" 8 | #include "mexOliUtil.h" 9 | #include 10 | #include 11 | 12 | #include "mexComputeFeature.h" 13 | 14 | 15 | void mexFunction( int nlhs, mxArray *plhs[], 16 | int nrhs, const mxArray*prhs[] ) 17 | { 18 | enum{ P1i , P2i , t1i , typei }; 19 | enum{ feat1i , feat2i }; 20 | 21 | oliCheckArgNumber(nrhs,4,nlhs,2); 22 | int nP1,nP2,nT1; 23 | double* pP1 = oliCheckArg(prhs,P1i,3,&nP1,oliDouble); 24 | double* pP2 = oliCheckArg(prhs,P2i,3,&nP2,oliDouble); 25 | int* pT1 = (int*)oliCheckArg(prhs,t1i,3,&nT1,oliInt); 26 | 27 | const int nFeature=3; 28 | plhs[feat1i] = mxCreateDoubleMatrix(nFeature, nT1, mxREAL); 29 | double* pF1 = mxGetPr(plhs[feat1i]); 30 | plhs[feat2i] = mxCreateDoubleMatrix(nFeature, nP2*nP2*nP2, mxREAL); 31 | double* pF2 = mxGetPr(plhs[feat2i]); 32 | 33 | computeFeature(pP1,nP1,pP2,nP2,pT1,nT1,pF1,pF2); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/mexComputeTensor.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /* P1 P2 nT nK -> indH valH */ 6 | 7 | 8 | #include "mex.h" 9 | #include "math.h" 10 | #include "mexOliUtil.h" 11 | #include 12 | #include 13 | 14 | extern void computeTensor( double* pP1, int nP1 , double* pP2, int nP2, int nT, int nK); 15 | 16 | void mexFunction( int nlhs, mxArray *plhs[], 17 | int nrhs, const mxArray*prhs[] ) 18 | { 19 | enum{ P1i , P2i }; 20 | enum{ indHi , valHi , nTi , nKi }; 21 | srand( time(NULL) ); 22 | 23 | oliCheckArgNumber(nrhs,4,nlhs,2); 24 | int nP1,nP2; 25 | double* pP1 = oliCheckArg(prhs,P1i,2,&nP1,oliDouble); 26 | double* pP2 = oliCheckArg(prhs,P2i,2,&nP2,oliDouble); 27 | int nT = (int)mxGetScalar(prhs[nTi]); 28 | int nK = (int)mxGetScalar(prhs[nKi]); 29 | 30 | int* pT = new int[nT*3]; 31 | const int nFeature=3; 32 | double* pFeature1 = new double[nT*nFeature]; 33 | double* vecX = new double[nFeature]; 34 | double* vecY = new double[nFeature]; 35 | for(int t=0;t 7 | using namespace std; 8 | 9 | void oliCheckArgNumber(int nrhs, int nIn, int nlhs = NULL , int nOut = -1) 10 | { 11 | if(nIn != -1) 12 | if (nrhs != nIn) 13 | { 14 | stringstream errMsg; 15 | errMsg << nIn << " input arguments required." << endl; 16 | mexErrMsgTxt(errMsg.str().c_str()); 17 | } 18 | if(nOut != -1) 19 | if (nlhs != nOut) 20 | { 21 | stringstream errMsg; 22 | errMsg << nOut << " output arguments required." << endl; 23 | mexErrMsgTxt(errMsg.str().c_str()); 24 | } 25 | } 26 | 27 | enum{ oliDouble , oliInt }; 28 | 29 | double* oliCheckArg(const mxArray *prhs[],int indArg,int m = -1 ,int n = -1, int type = -1) 30 | { 31 | if(m!=-1) 32 | { 33 | if(mxGetM(prhs[indArg])!=m) 34 | { 35 | stringstream errMsg; 36 | errMsg << "argument number " << indArg+1 << " should have " << m << " rows." << endl; 37 | mexErrMsgTxt(errMsg.str().c_str()); 38 | } 39 | } 40 | if(n!=-1) 41 | { 42 | if(mxGetN(prhs[indArg])!=n) 43 | { 44 | stringstream errMsg; 45 | errMsg << "argument number " << indArg+1 << " should have " << n << " columns." << endl; 46 | mexErrMsgTxt(errMsg.str().c_str()); 47 | } 48 | } 49 | switch(type) 50 | { 51 | case 0: 52 | if(!mxIsDouble(prhs[indArg])) 53 | { 54 | stringstream errMsg; 55 | errMsg << "argument number " << indArg+1 << " should be double." << endl; 56 | mexErrMsgTxt(errMsg.str().c_str()); 57 | } 58 | break; 59 | case 1: 60 | if(!mxIsInt32(prhs[indArg])) 61 | { 62 | stringstream errMsg; 63 | errMsg << "argument number " << indArg+1 << " should be integer." << endl; 64 | mexErrMsgTxt(errMsg.str().c_str()); 65 | } 66 | break; 67 | } 68 | // if(mxIsDouble(prhs[indArg])) 69 | // return mxGetPr(prhs[indArg]); 70 | return mxGetPr(prhs[indArg]); 71 | } 72 | 73 | double* oliCheckArg(const mxArray *prhs[],int indArg, int* mOut ,int n = -1, int type = -1) 74 | { 75 | *mOut = mxGetM(prhs[indArg]); 76 | return oliCheckArg(prhs,indArg,-1,n,type); 77 | } 78 | double* oliCheckArg(const mxArray *prhs[],int indArg, int m ,int* nOut, int type = -1) 79 | { 80 | *nOut = mxGetN(prhs[indArg]); 81 | return oliCheckArg(prhs,indArg,m,-1,type); 82 | } 83 | double* oliCheckArg(const mxArray *prhs[],int indArg, int* mOut ,int* nOut, int type = -1) 84 | { 85 | *mOut = mxGetM(prhs[indArg]); 86 | *nOut = mxGetN(prhs[indArg]); 87 | return oliCheckArg(prhs,indArg,-1,-1,type); 88 | } 89 | 90 | 91 | 92 | 93 | #endif 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/mexTensorMatching.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /* X indH valH -> Xout */ 5 | 6 | 7 | #include "mex.h" 8 | #include "math.h" 9 | #include "mexOliUtil.h" 10 | 11 | #include "mexTensorMatching.h" 12 | 13 | void mexFunction( int nlhs, mxArray *plhs[], 14 | int nrhs, const mxArray*prhs[] ) 15 | { 16 | enum{ Xi , P1i,P2i, indH1i , valH1i , indH2i , valH2i , indH3i , valH3i , nIteri, sparsei, stoci}; 17 | enum{ Xouti , scoreOuti}; 18 | oliCheckArgNumber(nrhs,10+2,nlhs,2); 19 | int Nt1,Nt2,Nt3,N1,N2; 20 | //check two points 21 | double* P1 = oliCheckArg(prhs,P1i,&N1,&N2,oliDouble); 22 | double* P2 = oliCheckArg(prhs,P2i,&N1,&N2,oliDouble); 23 | 24 | double* pX = oliCheckArg(prhs,Xi,&N1,&N2,oliDouble); 25 | int* pIndH1 = (int*)oliCheckArg(prhs,indH1i,&Nt1,1,oliInt); 26 | double* pValH1 = oliCheckArg(prhs,valH1i,Nt1,1,oliDouble); 27 | int* pIndH2 = (int*)oliCheckArg(prhs,indH2i,&Nt2,2,oliInt); 28 | double* pValH2 = oliCheckArg(prhs,valH2i,Nt2,1,oliDouble); 29 | int* pIndH3 = (int*)oliCheckArg(prhs,indH3i,&Nt3,3,oliInt); 30 | double* pValH3 = oliCheckArg(prhs,valH3i,Nt3,1,oliDouble); 31 | double* pNIter = oliCheckArg(prhs,nIteri,1,1,oliDouble); 32 | double* pSparse = oliCheckArg(prhs,sparsei,1,1,oliDouble); 33 | double* pStoc = oliCheckArg(prhs,stoci,1,1,oliDouble); 34 | 35 | plhs[Xouti] = mxCreateDoubleMatrix(N1, N2, mxREAL); 36 | double* pXout = mxGetPr(plhs[Xouti]); 37 | 38 | plhs[scoreOuti] = mxCreateDoubleMatrix(1, 1, mxREAL); 39 | double* pScoreOut = mxGetPr(plhs[scoreOuti]); 40 | 41 | tensorMatching(pX,P1,N1,P2,N2,pIndH1,pValH1,Nt1,pIndH2,pValH2,Nt2,pIndH3,pValH3,Nt3,(int)(*pNIter),(int)(*pSparse),(int)(*pStoc),pXout,pScoreOut); 42 | 43 | 44 | 45 | } 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Baselines/GCTR_matlab/mexSource/testComputeFeature.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* feat1 feat2 <- P1 P2 t1 type */ 4 | 5 | 6 | #include "math.h" 7 | #include 8 | #include 9 | #include "stdio.h" 10 | #include "mexComputeFeature.h" 11 | 12 | 13 | int main() 14 | { 15 | srand(time(NULL)); 16 | 17 | int nP1=100; 18 | int nP2=100; 19 | int nT1=1000; 20 | double* pP1 = new double[nP1*2]; 21 | double* pP2 = new double[nP2*2]; 22 | int* pT1 = new int[nT1*3]; 23 | 24 | const int nFeature=3; 25 | double* pF1 = new double[nT1*nFeature];; 26 | double* pF2 = new double[nP2*nP2*nP2*nFeature]; 27 | 28 | for(int p=0;p 11 | #include "time.h" 12 | #include "stdio.h" 13 | 14 | 15 | #include "mexTensorMatching.h" 16 | 17 | int main() 18 | { 19 | 20 | srand(time(NULL)); 21 | 22 | int N1=50; 23 | int N2=50; 24 | int Nt=10000; 25 | int NN = N1*N2; 26 | double* pX = new double[NN]; 27 | int* pIndH = new int[Nt*3]; 28 | double* pValH = new double[Nt]; 29 | 30 | double* pXout = new double[NN]; 31 | 32 | for(int i=0;i 0.5) 49 | target = target 50 | return torch.norm(output - target) 51 | 52 | 53 | def corr_dist(est, gth, xyz0, xyz1, weight=None, max_dist=1): 54 | xyz0_est = xyz0 @ est[:3, :3].t() + est[:3, 3] 55 | xyz0_gth = xyz0 @ gth[:3, :3].t() + gth[:3, 3] 56 | dists = torch.clamp(torch.sqrt(((xyz0_est - xyz0_gth).pow(2)).sum(1)), max=max_dist) 57 | if weight is not None: 58 | dists = weight * dists 59 | return dists.mean() 60 | 61 | 62 | def pdist(A, B, dist_type='L2'): 63 | if dist_type == 'L2': 64 | D2 = torch.sum((A.unsqueeze(1) - B.unsqueeze(0)).pow(2), 2) 65 | return torch.sqrt(D2 + 1e-7) 66 | elif dist_type == 'SquareL2': 67 | return torch.sum((A.unsqueeze(1) - B.unsqueeze(0)).pow(2), 2) 68 | else: 69 | raise NotImplementedError('Not implemented') 70 | 71 | 72 | def get_loss_fn(loss): 73 | if loss == 'corr_dist': 74 | return corr_dist 75 | else: 76 | raise ValueError(f'Loss {loss}, not defined') 77 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/data_loaders.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | from dataloader.threedmatch_loader import * 8 | from dataloader.kitti_loader import * 9 | 10 | ALL_DATASETS = [ 11 | ThreeDMatchPairDataset07, ThreeDMatchPairDataset05, ThreeDMatchPairDataset03, 12 | ThreeDMatchTrajectoryDataset, KITTIPairDataset, KITTINMPairDataset 13 | ] 14 | dataset_str_mapping = {d.__name__: d for d in ALL_DATASETS} 15 | 16 | 17 | def make_data_loader(config, phase, batch_size, num_workers=0, shuffle=None): 18 | assert phase in ['train', 'trainval', 'val', 'test'] 19 | if shuffle is None: 20 | shuffle = phase != 'test' 21 | 22 | if config.dataset not in dataset_str_mapping.keys(): 23 | logging.error(f'Dataset {config.dataset}, does not exists in ' + 24 | ', '.join(dataset_str_mapping.keys())) 25 | 26 | Dataset = dataset_str_mapping[config.dataset] 27 | 28 | use_random_scale = False 29 | use_random_rotation = False 30 | transforms = [] 31 | if phase in ['train', 'trainval']: 32 | use_random_rotation = config.use_random_rotation 33 | use_random_scale = config.use_random_scale 34 | transforms += [t.Jitter()] 35 | 36 | if phase in ['val', 'test']: 37 | use_random_rotation = config.test_random_rotation 38 | 39 | dset = Dataset(phase, 40 | transform=t.Compose(transforms), 41 | random_scale=use_random_scale, 42 | random_rotation=use_random_rotation, 43 | config=config) 44 | 45 | collation_fn = CollationFunctionFactory(concat_correspondences=False, 46 | collation_type='collate_pair') 47 | 48 | loader = torch.utils.data.DataLoader(dset, 49 | batch_size=batch_size, 50 | collate_fn=collation_fn, 51 | num_workers=num_workers, 52 | sampler=InfSampler(dset, shuffle)) 53 | 54 | return loader 55 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/inf_sampler.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import torch 8 | from torch.utils.data.sampler import Sampler 9 | 10 | 11 | class InfSampler(Sampler): 12 | """Samples elements randomly, without replacement. 13 | 14 | Arguments: 15 | data_source (Dataset): dataset to sample from 16 | """ 17 | 18 | def __init__(self, data_source, shuffle=False): 19 | self.data_source = data_source 20 | self.shuffle = shuffle 21 | self.reset_permutation() 22 | 23 | def reset_permutation(self): 24 | perm = len(self.data_source) 25 | if self.shuffle: 26 | perm = torch.randperm(perm) 27 | self._perm = perm.tolist() 28 | 29 | def __iter__(self): 30 | return self 31 | 32 | def __next__(self): 33 | if len(self._perm) == 0: 34 | self.reset_permutation() 35 | return self._perm.pop() 36 | 37 | def __len__(self): 38 | return len(self.data_source) 39 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/test_3dmatch.txt: -------------------------------------------------------------------------------- 1 | 7-scenes-redkitchen 2 | sun3d-home_at-home_at_scan1_2013_jan_1 3 | sun3d-home_md-home_md_scan9_2012_sep_30 4 | sun3d-hotel_uc-scan3 5 | sun3d-hotel_umd-maryland_hotel1 6 | sun3d-hotel_umd-maryland_hotel3 7 | sun3d-mit_76_studyroom-76-1studyroom2 8 | sun3d-mit_lab_hj-lab_hj_tea_nov_2_2012_scan1_erika -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/test_kitti.txt: -------------------------------------------------------------------------------- 1 | 8 2 | 9 3 | 10 4 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/test_scan2cad.txt: -------------------------------------------------------------------------------- 1 | full_annotations_clean_test.json 2 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/train_3dmatch.txt: -------------------------------------------------------------------------------- 1 | sun3d-brown_bm_1-brown_bm_1 2 | sun3d-brown_cogsci_1-brown_cogsci_1 3 | sun3d-brown_cs_2-brown_cs2 4 | sun3d-brown_cs_3-brown_cs3 5 | sun3d-harvard_c3-hv_c3_1 6 | sun3d-harvard_c5-hv_c5_1 7 | sun3d-harvard_c6-hv_c6_1 8 | sun3d-harvard_c8-hv_c8_3 9 | sun3d-home_bksh-home_bksh_oct_30_2012_scan2_erika 10 | sun3d-hotel_nips2012-nips_4 11 | sun3d-hotel_sf-scan1 12 | sun3d-mit_32_d507-d507_2 13 | sun3d-mit_46_ted_lab1-ted_lab_2 14 | sun3d-mit_76_417-76-417b 15 | sun3d-mit_dorm_next_sj-dorm_next_sj_oct_30_2012_scan1_erika 16 | sun3d-mit_w20_athena-sc_athena_oct_29_2012_scan1_erika 17 | 7-scenes-chess 18 | 7-scenes-fire 19 | 7-scenes-office 20 | 7-scenes-pumpkin 21 | 7-scenes-stairs 22 | rgbd-scenes-v2-scene_01 23 | rgbd-scenes-v2-scene_02 24 | rgbd-scenes-v2-scene_03 25 | rgbd-scenes-v2-scene_04 26 | rgbd-scenes-v2-scene_05 27 | rgbd-scenes-v2-scene_06 28 | rgbd-scenes-v2-scene_07 29 | rgbd-scenes-v2-scene_08 30 | rgbd-scenes-v2-scene_09 31 | rgbd-scenes-v2-scene_11 32 | rgbd-scenes-v2-scene_12 33 | rgbd-scenes-v2-scene_13 34 | rgbd-scenes-v2-scene_14 35 | bundlefusion-apt0 36 | bundlefusion-apt1 37 | bundlefusion-apt2 38 | bundlefusion-copyroom 39 | bundlefusion-office1 40 | bundlefusion-office2 41 | bundlefusion-office3 42 | analysis-by-synthesis-apt1-kitchen 43 | analysis-by-synthesis-apt1-living 44 | analysis-by-synthesis-apt2-bed 45 | analysis-by-synthesis-apt2-living 46 | analysis-by-synthesis-apt2-luke 47 | analysis-by-synthesis-office2-5a 48 | analysis-by-synthesis-office2-5b 49 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/train_kitti.txt: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | 2 4 | 3 5 | 4 6 | 5 7 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/train_scan2cad.txt: -------------------------------------------------------------------------------- 1 | full_annotations_clean_train.json 2 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/val_3dmatch.txt: -------------------------------------------------------------------------------- 1 | sun3d-brown_bm_4-brown_bm_4 2 | sun3d-harvard_c11-hv_c11_2 3 | 7-scenes-heads 4 | rgbd-scenes-v2-scene_10 5 | bundlefusion-office0 6 | analysis-by-synthesis-apt2-kitchen 7 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/val_kitti.txt: -------------------------------------------------------------------------------- 1 | 6 2 | 7 3 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/split/val_scan2cad.txt: -------------------------------------------------------------------------------- 1 | full_annotations_clean_val.json 2 | -------------------------------------------------------------------------------- /Baselines/ICP/dataloader/transforms.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import torch 8 | import numpy as np 9 | import random 10 | from scipy.linalg import expm, norm 11 | 12 | 13 | # Rotation matrix along axis with angle theta 14 | def M(axis, theta): 15 | return expm(np.cross(np.eye(3), axis / norm(axis) * theta)) 16 | 17 | 18 | def sample_random_trans(pcd, randg, rotation_range=360): 19 | T = np.eye(4) 20 | R = M(randg.rand(3) - 0.5, rotation_range * np.pi / 180.0 * (randg.rand(1) - 0.5)) 21 | T[:3, :3] = R 22 | T[:3, 3] = R.dot(-np.mean(pcd, axis=0)) 23 | return T 24 | 25 | 26 | class Compose: 27 | def __init__(self, transforms): 28 | self.transforms = transforms 29 | 30 | def __call__(self, coords, feats): 31 | for transform in self.transforms: 32 | coords, feats = transform(coords, feats) 33 | return coords, feats 34 | 35 | 36 | class Jitter: 37 | def __init__(self, mu=0, sigma=0.01): 38 | self.mu = mu 39 | self.sigma = sigma 40 | 41 | def __call__(self, coords, feats): 42 | if random.random() < 0.95: 43 | feats += self.sigma * torch.randn(feats.shape[0], feats.shape[1]) 44 | if self.mu != 0: 45 | feats += self.mu 46 | return coords, feats 47 | 48 | 49 | class ChromaticShift: 50 | def __init__(self, mu=0, sigma=0.1): 51 | self.mu = mu 52 | self.sigma = sigma 53 | 54 | def __call__(self, coords, feats): 55 | if random.random() < 0.95: 56 | feats[:, :3] += torch.randn(self.mu, self.sigma, (1, 3)) 57 | return coords, feats 58 | -------------------------------------------------------------------------------- /Baselines/ICP/demo.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import os 8 | from urllib.request import urlretrieve 9 | 10 | import open3d as o3d 11 | from core.deep_global_registration import DeepGlobalRegistration 12 | from config import get_config 13 | 14 | BASE_URL = "http://node2.chrischoy.org/data/" 15 | DOWNLOAD_LIST = [ 16 | (BASE_URL + "datasets/registration/", "redkitchen_000.ply"), 17 | (BASE_URL + "datasets/registration/", "redkitchen_010.ply"), 18 | (BASE_URL + "projects/DGR/", "ResUNetBN2C-feat32-3dmatch-v0.05.pth") 19 | ] 20 | 21 | # Check if the weights and file exist and download 22 | if not os.path.isfile('redkitchen_000.ply'): 23 | print('Downloading weights and pointcloud files...') 24 | for f in DOWNLOAD_LIST: 25 | print(f"Downloading {f}") 26 | urlretrieve(f[0] + f[1], f[1]) 27 | 28 | if __name__ == '__main__': 29 | config = get_config() 30 | if config.weights is None: 31 | config.weights = DOWNLOAD_LIST[-1][-1] 32 | 33 | # preprocessing 34 | pcd0 = o3d.io.read_point_cloud(config.pcd0) 35 | pcd0.estimate_normals() 36 | pcd1 = o3d.io.read_point_cloud(config.pcd1) 37 | pcd1.estimate_normals() 38 | 39 | # registration 40 | dgr = DeepGlobalRegistration(config) 41 | T01 = dgr.register(pcd0, pcd1) 42 | 43 | o3d.visualization.draw_geometries([pcd0, pcd1]) 44 | 45 | pcd0.transform(T01) 46 | print(T01) 47 | 48 | o3d.visualization.draw_geometries([pcd0, pcd1]) 49 | -------------------------------------------------------------------------------- /Baselines/ICP/model/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import logging 8 | import model.simpleunet as simpleunets 9 | import model.resunet as resunets 10 | import model.pyramidnet as pyramids 11 | 12 | MODELS = [] 13 | 14 | 15 | def add_models(module): 16 | MODELS.extend([getattr(module, a) for a in dir(module) if 'Net' in a or 'MLP' in a]) 17 | 18 | 19 | add_models(simpleunets) 20 | add_models(resunets) 21 | add_models(pyramids) 22 | 23 | 24 | def load_model(name): 25 | '''Creates and returns an instance of the model given its class name. 26 | ''' 27 | # Find the model class from its name 28 | all_models = MODELS 29 | mdict = {model.__name__: model for model in all_models} 30 | if name not in mdict: 31 | logging.info(f'Invalid model index. You put {name}. Options are:') 32 | # Display a list of valid model names 33 | for model in all_models: 34 | logging.info('\t* {}'.format(model.__name__)) 35 | return None 36 | NetClass = mdict[name] 37 | 38 | return NetClass 39 | -------------------------------------------------------------------------------- /Baselines/ICP/model/common.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import torch.nn as nn 8 | import MinkowskiEngine as ME 9 | 10 | 11 | def get_norm(norm_type, num_feats, bn_momentum=0.05, dimension=-1): 12 | if norm_type == 'BN': 13 | return ME.MinkowskiBatchNorm(num_feats, momentum=bn_momentum) 14 | elif norm_type == 'IN': 15 | return ME.MinkowskiInstanceNorm(num_feats) 16 | elif norm_type == 'INBN': 17 | return nn.Sequential( 18 | ME.MinkowskiInstanceNorm(num_feats), 19 | ME.MinkowskiBatchNorm(num_feats, momentum=bn_momentum)) 20 | else: 21 | raise ValueError(f'Type {norm_type}, not defined') 22 | 23 | 24 | def get_nonlinearity(non_type): 25 | if non_type == 'ReLU': 26 | return ME.MinkowskiReLU() 27 | elif non_type == 'ELU': 28 | # return ME.MinkowskiInstanceNorm(num_feats, dimension=dimension) 29 | return ME.MinkowskiELU() 30 | else: 31 | raise ValueError(f'Type {non_type}, not defined') 32 | -------------------------------------------------------------------------------- /Baselines/ICP/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | How to use it 3 | 4 | 1. run script.test_crosssource.py 5 | 6 | If you find the code is useful, please cite the following article. 7 | 8 | 9 | Huang, Xiaoshui, Jian Zhang, Qiang Wu, Lixin Fan, and Chun Yuan. "A coarse-to-fine algorithm for registration in 3D street-view cross-source point clouds." In 2016 International Conference on Digital Image Computing: Techniques and Applications (DICTA), pp. 1-6. IEEE, 2016. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Baselines/ICP/train.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import open3d as o3d # prevent loading error 8 | 9 | import sys 10 | import json 11 | import logging 12 | import torch 13 | from easydict import EasyDict as edict 14 | 15 | from config import get_config 16 | 17 | from dataloader.data_loaders import make_data_loader 18 | 19 | from core.trainer import WeightedProcrustesTrainer 20 | 21 | ch = logging.StreamHandler(sys.stdout) 22 | logging.getLogger().setLevel(logging.INFO) 23 | logging.basicConfig(format='%(asctime)s %(message)s', 24 | datefmt='%m/%d %H:%M:%S', 25 | handlers=[ch]) 26 | 27 | torch.manual_seed(0) 28 | torch.cuda.manual_seed(0) 29 | 30 | logging.basicConfig(level=logging.INFO, format="") 31 | 32 | 33 | def main(config, resume=False): 34 | train_loader = make_data_loader(config, 35 | config.train_phase, 36 | config.batch_size, 37 | num_workers=config.train_num_workers, 38 | shuffle=True) 39 | 40 | if config.test_valid: 41 | val_loader = make_data_loader(config, 42 | config.val_phase, 43 | config.val_batch_size, 44 | num_workers=config.val_num_workers, 45 | shuffle=True) 46 | else: 47 | val_loader = None 48 | 49 | trainer = WeightedProcrustesTrainer( 50 | config=config, 51 | data_loader=train_loader, 52 | val_data_loader=val_loader, 53 | ) 54 | 55 | trainer.train() 56 | 57 | 58 | if __name__ == "__main__": 59 | logger = logging.getLogger() 60 | config = get_config() 61 | 62 | dconfig = vars(config) 63 | if config.resume_dir: 64 | resume_config = json.load(open(config.resume_dir + '/config.json', 'r')) 65 | for k in dconfig: 66 | if k not in ['resume_dir'] and k in resume_config: 67 | dconfig[k] = resume_config[k] 68 | dconfig['resume'] = resume_config['out_dir'] + '/checkpoint.pth' 69 | 70 | logging.info('===> Configurations') 71 | for k in dconfig: 72 | logging.info(' {}: {}'.format(k, dconfig[k])) 73 | 74 | # Convert to dict 75 | config = edict(dconfig) 76 | main(config) 77 | -------------------------------------------------------------------------------- /Baselines/ICP/util/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | -------------------------------------------------------------------------------- /Baselines/ICP/util/file.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import os 8 | import re 9 | from os import listdir 10 | from os.path import isfile, isdir, join, splitext 11 | 12 | import numpy as np 13 | 14 | 15 | def read_txt(path): 16 | """Read txt file into lines. 17 | """ 18 | with open(path) as f: 19 | lines = f.readlines() 20 | lines = [x.strip() for x in lines] 21 | return lines 22 | 23 | 24 | def ensure_dir(path): 25 | if not os.path.exists(path): 26 | os.makedirs(path, mode=0o755) 27 | 28 | 29 | def sorted_alphanum(file_list_ordered): 30 | def convert(text): 31 | return int(text) if text.isdigit() else text 32 | 33 | def alphanum_key(key): 34 | return [convert(c) for c in re.split('([0-9]+)', key)] 35 | 36 | return sorted(file_list_ordered, key=alphanum_key) 37 | 38 | 39 | def get_file_list(path, extension=None): 40 | if extension is None: 41 | file_list = [join(path, f) for f in listdir(path) if isfile(join(path, f))] 42 | else: 43 | file_list = [ 44 | join(path, f) for f in listdir(path) 45 | if isfile(join(path, f)) and splitext(f)[1] == extension 46 | ] 47 | file_list = sorted_alphanum(file_list) 48 | return file_list 49 | 50 | 51 | def get_file_list_specific(path, color_depth, extension=None): 52 | if extension is None: 53 | file_list = [join(path, f) for f in listdir(path) if isfile(join(path, f))] 54 | else: 55 | file_list = [ 56 | join(path, f) for f in listdir(path) 57 | if isfile(join(path, f)) and color_depth in f and splitext(f)[1] == extension 58 | ] 59 | file_list = sorted_alphanum(file_list) 60 | return file_list 61 | 62 | 63 | def get_folder_list(path): 64 | folder_list = [join(path, f) for f in listdir(path) if isdir(join(path, f))] 65 | folder_list = sorted_alphanum(folder_list) 66 | return folder_list 67 | 68 | 69 | def read_trajectory(filename, dim=4): 70 | class CameraPose: 71 | def __init__(self, meta, mat): 72 | self.metadata = meta 73 | self.pose = mat 74 | 75 | def __str__(self): 76 | return 'metadata : ' + ' '.join(map(str, self.metadata)) + '\n' + \ 77 | "pose : " + "\n" + np.array_str(self.pose) 78 | 79 | traj = [] 80 | with open(filename, 'r') as f: 81 | metastr = f.readline() 82 | while metastr: 83 | metadata = list(map(int, metastr.split())) 84 | mat = np.zeros(shape=(dim, dim)) 85 | for i in range(dim): 86 | matstr = f.readline() 87 | mat[i, :] = np.fromstring(matstr, dtype=float, sep=' \t') 88 | traj.append(CameraPose(metadata, mat)) 89 | metastr = f.readline() 90 | return traj 91 | -------------------------------------------------------------------------------- /Baselines/ICP/util/timer.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu) 2 | # 3 | # Please cite the following papers if you use any part of the code. 4 | # - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020 5 | # - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolutional Geometric Features, ICCV 2019 6 | # - Christopher Choy, JunYoung Gwak, Silvio Savarese, 4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019 7 | import time 8 | import numpy as np 9 | import torch 10 | 11 | 12 | class AverageMeter(object): 13 | """Computes and stores the average and current value""" 14 | 15 | def __init__(self): 16 | self.reset() 17 | 18 | def reset(self): 19 | self.val = 0 20 | self.avg = 0 21 | self.sum = 0.0 22 | self.sq_sum = 0.0 23 | self.count = 0 24 | 25 | def update(self, val, n=1): 26 | if isinstance(val, np.ndarray): 27 | n = val.size 28 | val = val.mean() 29 | elif isinstance(val, torch.Tensor): 30 | n = val.nelement() 31 | val = val.mean().item() 32 | self.val = val 33 | self.sum += val * n 34 | self.count += n 35 | self.avg = self.sum / self.count 36 | self.sq_sum += val**2 * n 37 | self.var = self.sq_sum / self.count - self.avg ** 2 38 | 39 | 40 | class Timer(AverageMeter): 41 | """A simple timer.""" 42 | 43 | def tic(self): 44 | # using time.time instead of time.clock because time time.clock 45 | # does not normalize for multithreading 46 | self.start_time = time.time() 47 | 48 | def toc(self, average=True): 49 | self.diff = time.time() - self.start_time 50 | self.update(self.diff) 51 | if average: 52 | return self.avg 53 | else: 54 | return self.diff 55 | -------------------------------------------------------------------------------- /Baselines/JRMPC/applyPly.py: -------------------------------------------------------------------------------- 1 | import sys, os 2 | os.system("ApplyPly.exe src_sfm.ply src_kinect.ply") 3 | -------------------------------------------------------------------------------- /Baselines/JRMPC/mat2off.m: -------------------------------------------------------------------------------- 1 | function mat2off(C,filename) 2 | 3 | if size(C,1)~=6 && size(C,2)~=6 4 | error('matrix should be of size 6xK or Kx6'); 5 | end 6 | 7 | if size(C,1)==6 8 | C = C'; % N x 6 9 | end 10 | 11 | C(:,4:6) = uint8(255*C(:,4:6)); 12 | 13 | id = fopen(filename,'w'); 14 | fwrite(id,sprintf('COFF\n%d 0 0\n',size(C,1))); 15 | 16 | for i=1:size(C,1) 17 | fwrite(id,sprintf('%f %f %f %d %d %d\n',C(i,:))); 18 | end -------------------------------------------------------------------------------- /Baselines/JRMPC/read_ply.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XiaoshuiHuang/CSBaselineAlgo/0f15dd81052dcfd073a9024f65365ad16e48442e/Baselines/JRMPC/read_ply.m -------------------------------------------------------------------------------- /Baselines/JRMPC/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | This is an implementation of the registration part for the article: 4 | Huang, Xiaoshui, Jian Zhang, Qiang Wu, Lixin Fan, and Chun Yuan. "A coarse-to-fine algorithm for registration in 3D street-view cross-source point clouds." In 2016 International Conference on Digital Image Computing: Techniques and Applications (DICTA), pp. 1-6. IEEE, 2016. 5 | 6 | How to use it: 7 | 8 | 1. run runScript_cs.m 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Baselines/JRMPC/removePointsAndCenters.m: -------------------------------------------------------------------------------- 1 | %REMOVEPOINTSANDCENTERS refines THE point sets in TV using S and a. 2 | % TVrefined = removePointsAndBadCenters(TV,X,S,a) 3 | % It diregards components with high variance, and then 4 | % it applies MAP from TV to X plus outlier class using posteriors 'a' and 5 | % it finally returns in TVrefined only points classified to low-variance 6 | % components. 7 | % 8 | % [TVrefined,Xrefined] = removePointsAndCenters(TV,X,S,a) 9 | % Returns also the "good" GMM means in Xrefined. 10 | % 11 | % [TVrefined,Xrefined,Xrem] = removePointsAndCenters(TV,X,S,a) 12 | % Return also the remaining "bad" centers from X in Xrem. 13 | % 14 | % [TVrefined,Xrefined,Xrem,Irefined] = removePointsAndCenters(TV,X,S,a,I) 15 | % The 5th input argument I is a colormap for TV. The function expects as I 16 | % a cell array, same size as TV, with elements [numel(TV{j}) x 3] matrices 17 | % with normalized RGB color triplets as rows. Irefined has the same size as 18 | % TVrefined and contains the color for the points in TVrefined. 19 | % 20 | % $ 7 / 8 / 2014 2:24 PM $ 21 | function [TVrefined,Xrefined,X,Irefined] = removePointsAndCenters(TV,X,S,a,I) 22 | 23 | % compare variances to extract centers with dense distributions, i.e inliers 24 | dense_k = find(S < 2.5*median(S)); 25 | %keyboard 26 | % classify points in V to centers 1,..,K or the outiler class K+1 27 | [~,classifyV] = cellfun(@(a) max([a 1-sum(a,2)],[],2),a,'uniformoutput',false); 28 | 29 | % for each view, extract indexes of all points classified into low-variance clusters 30 | % >> find() may return multiple indexes for a specific view and k, therefore 31 | % concatenation ability of the output of arrayfun cannot be taken for granted. 32 | reliablePointsOnV = cellfun(@(classifyV) arrayfun(@(k) find(classifyV == k),dense_k,'uniformoutput',false), classifyV, 'uniformoutput',false); 33 | 34 | % multiple assignments for a center are into cells to concatenate all indexes 35 | reliablePointsOnV = cellfun(@(reliablePointsOnVj) cat(1,reliablePointsOnVj{:}), reliablePointsOnV, 'uniformoutput',false); 36 | 37 | % extract "reliablePoints" from V, or TV to not transform V again 38 | TVrefined = cellfun(@(TV,reliablePointsOnV) TV(:,reliablePointsOnV),TV,reliablePointsOnV,'uniformoutput',false); 39 | 40 | % discard centers of "flat" components 41 | Xrefined = X(:,dense_k); 42 | 43 | % if Xrem is requested compute by [] X, return X as Xrem 44 | if nargout > 2 45 | X(:,dense_k) = []; 46 | end 47 | 48 | % If color information is provided, remove colorInfo for outlier points 49 | if nargin > 4 50 | Irefined = cellfun(@(I,indexes) I(indexes,:),I,reliablePointsOnV,'uniformoutput',false); 51 | end 52 | -------------------------------------------------------------------------------- /Baselines/JRMPC/rigidICP.m: -------------------------------------------------------------------------------- 1 | function [error,Reallignedsource,transform]=rigidICP(target,source) 2 | 3 | % This function rotates, translates and scales a 3D pointcloud "source" of N*3 size (N points in N rows, 3 collumns for XYZ) 4 | % to fit a similar shaped point cloud "target" again of N by 3 size 5 | % 6 | % The output shows the minimized value of dissimilarity measure in "error", the transformed source data set and the 7 | % transformation, rotation, scaling and translation in transform.T, transform.b and transform.c such that 8 | % Reallignedsource = b*source*T + c; 9 | 10 | %EXAMPLE 11 | 12 | %load EXAMPLE 13 | % [error,Reallignedsource,transform]=ICPmanu2(target,source); 14 | % trisurf(ftarget,target(:,1),target(:,2),target(:,3),'facecolor','y','Edgecolor','none'); 15 | % hold 16 | % light 17 | % lighting phong; 18 | % set(gca, 'visible', 'off') 19 | % set(gcf,'Color',[1 1 0.88]) 20 | % view(90,90) 21 | % set(gca,'DataAspectRatio',[1 1 1],'PlotBoxAspectRatio',[1 1 1]); 22 | % trisurf(fsource,source(:,1),source(:,2),source(:,3),'facecolor','m','Edgecolor','none'); 23 | % trisurf(fsource,Reallignedsource(:,1),Reallignedsource(:,2),Reallignedsource(:,3),'facecolor','b','Edgecolor','none'); 24 | 25 | 26 | [Prealligned_source,Prealligned_target,transformtarget ]=Preall(target,source); 27 | 28 | 29 | display ('error') 30 | errortemp(1,:)=0; 31 | index=2; 32 | [errortemp(index,:),Reallignedsourcetemp]=ICPmanu_allign2(Prealligned_target,Prealligned_source); 33 | while (abs(errortemp(index-1,:)-errortemp(index,:)))>0.000001 34 | [errortemp(index+1,:),Reallignedsourcetemp]=ICPmanu_allign2(Prealligned_target,Reallignedsourcetemp); 35 | index=index+1; 36 | d=errortemp(index,:) 37 | end 38 | 39 | error=errortemp(index,:); 40 | Reallignedsource=Reallignedsourcetemp*transformtarget.T+repmat(transformtarget.c(1,1:3),length(Reallignedsourcetemp(:,1)),1); 41 | [d,Reallignedsource,transform] = procrustes(Reallignedsource,source); 42 | transform1=transform 43 | 44 | -------------------------------------------------------------------------------- /Baselines/JRMPC/runScript.m: -------------------------------------------------------------------------------- 1 | % Experimnts for TIP 2 | % create by Xiaoshui Huang 3 | % date: 2016-06-29 4 | 5 | addpath(genpath(pwd)); 6 | 7 | Experiment=2;%% Experiment: 1 T_Data, 2 Syn_CS, 3 Real_CS 8 | 9 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 10 | if Experiment==1 11 | folder='../../Data/T_data/data'; 12 | tic; 13 | % for j=1:10 14 | % name=sprintf('Data_%d_%d',40,j); 15 | % RunJPMPCT(folder,name); 16 | % end 17 | % for j=1:10 18 | % name=sprintf('Data_%d_%d',50,j); 19 | % RunJPMPCT(folder,name); 20 | % end 21 | % end 22 | % toc; 23 | %Run for T_data 24 | folder='../../Data/T_data/dataOut'; 25 | for i=1:10 26 | for j=1:10 27 | name=sprintf('Data_%d_%d',i*10,j); 28 | RunJPMPCT(folder,name); 29 | end 30 | end 31 | end 32 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 | if Experiment==10 34 | %Run for Synthetic cross-source point clouds 35 | folder='../../Data/Syn_CS/'; 36 | RunJRMPC(folder,'Twobox'); 37 | RunJRMPC(folder,'chair2part'); 38 | RunJRMPC(folder,'TM'); 39 | RunJRMPC(folder,'monitor'); 40 | end 41 | 42 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 43 | if Experiment==2 44 | %Run for Synthetic cross-source point clouds 45 | folder='../../Data/Syn_CS/CrossSyn/'; 46 | RunJRMPCS(folder,'angel'); 47 | RunJRMPCS(folder,'armadillo'); 48 | RunJRMPCS(folder,'bun_zipper'); 49 | RunJRMPCS(folder,'dragon'); 50 | RunJRMPCS(folder,'hand'); 51 | RunJRMPCS(folder,'happy'); 52 | RunJRMPCS(folder,'horse'); 53 | RunJRMPCS(folder,'lucy'); 54 | RunJRMPCS(folder,'xyzrgb_dragon'); 55 | RunJRMPCS(folder,'xyzrgb_statuette'); 56 | end 57 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 58 | if Experiment==3 59 | %Run for Real cross-source point clouds 60 | folder='../../Data/Real_CS/'; 61 | RunJRMPC(folder,'1dustbin'); 62 | RunJRMPC(folder,'2fourchair'); 63 | RunJRMPC(folder,'3LabOver'); 64 | RunJRMPC(folder,'4sofapart'); 65 | RunJRMPC(folder,'5threechair'); 66 | RunJRMPC(folder,'6TM'); 67 | 68 | end 69 | -------------------------------------------------------------------------------- /Baselines/JRMPC/runScript_cs.m: -------------------------------------------------------------------------------- 1 | % Experimnts for CVPR 2017 2 | % create by Xiaoshui Huang 3 | % date: 2016-09-28 4 | 5 | %Run for T_data 6 | folder='../cross-source-dataset/**/'; 7 | filelist = dir(fullfile(folder, '*.*')); %get list of files and folders in any subfolder 8 | filelist = filelist(~[filelist.isdir]); %remove folders from list 9 | 10 | names = struct2cell(filelist(:,1)); 11 | [col, num] = size(names); 12 | 13 | recall = 0; 14 | ave_rot = 0; 15 | ave_t = 0; 16 | ave_rot_in = 0; 17 | ave_t_in = 0; 18 | ave_time = 0; 19 | num_success = 0; 20 | rot_threashold = 15; 21 | t_threashold = 0.3; 22 | for i = 0:num/4-1 23 | tic; 24 | folder = cell2mat(names(2,i*4+1)); 25 | filename = cell2mat(names(1,i*4+1)); 26 | T0_path= sprintf('%s/%s',folder,filename); 27 | T0 = importdata(T0_path); 28 | 29 | filename = cell2mat(names(1,i*4+2)); 30 | T1_path= sprintf('%s/%s',folder,filename); 31 | T1 = importdata(T1_path); 32 | 33 | 34 | filename = cell2mat(names(1,i*4+3)); 35 | kinect_path= sprintf('%s/%s',folder,filename); 36 | 37 | filename = cell2mat(names(1,i*4+4)); 38 | lidar_sfm_path= sprintf('%s/%s',folder,filename); 39 | 40 | try 41 | [angle_mse, t_mse] = RunJPMPCT_cs(kinect_path,lidar_sfm_path,T0,T1); 42 | catch exception 43 | fprintf("error\n") 44 | angle_mse = 50; 45 | t_mse = 1.0; 46 | end 47 | 48 | timeelaps = toc; 49 | if angle_mse<=rot_threashold && t_mse <= t_threashold 50 | ave_rot_in = ave_rot_in + angle_mse; 51 | ave_t_in = ave_t_in + t_mse; 52 | num_success = num_success + 1; 53 | end 54 | 55 | ave_rot = ave_rot + angle_mse; 56 | ave_t = ave_t + t_mse; 57 | ave_time = ave_time + timeelaps; 58 | fprintf("pair%d: rot_error = %.3f, t_erro = %.3f, time=%.3f\n",i,angle_mse,t_mse, ave_time/(i+1)); 59 | end 60 | 61 | recall = num_success/202; 62 | ave_time = ave_time/202; 63 | % display the output 64 | fprintf("recall=%.5f, rot_err = %.3f, trans_err=%.3f, time=%.3f",recall,ave_rot_in/num_success, ave_t_in/num_success, ave_time); 65 | 66 | -------------------------------------------------------------------------------- /Baselines/JRMPC/write_ply.m: -------------------------------------------------------------------------------- 1 | function write_ply(fname, P,C) 2 | % Written by Chenxi cxliu@ucla.edu 3 | % Input: fname: output file name, e.g. 'data.ply' 4 | % P: 3*m matrix with the rows indicating X, Y, Z 5 | % C: 3*m matrix with the rows indicating R, G, B 6 | 7 | ifColor=0; 8 | num = size(P, 2); 9 | m=size(C,2); 10 | if(m>2) 11 | ifColor=1; 12 | end 13 | header = 'ply\n'; 14 | header = [header, 'format ascii 1.0\n']; 15 | header = [header, 'comment written by XiaoshuiHuang\n']; 16 | header = [header, 'element vertex ', num2str(num), '\n']; 17 | header = [header, 'property float x\n']; 18 | header = [header, 'property float y\n']; 19 | header = [header, 'property float z\n']; 20 | if ifColor==1 21 | header = [header, 'property uchar red\n']; 22 | header = [header, 'property uchar green\n']; 23 | header = [header, 'property uchar blue\n']; 24 | end 25 | header = [header, 'end_header\n']; 26 | 27 | data = [P', double(C')]; 28 | %data=P'; 29 | 30 | fid = fopen(fname, 'w'); 31 | fprintf(fid, header); 32 | dlmwrite(fname, data, '-append', 'delimiter', ' ', 'precision', 7); 33 | fclose(fid); -------------------------------------------------------------------------------- /Baselines/README.md: -------------------------------------------------------------------------------- 1 | # Cross-source point cloud registraiton baseline algorithms 2 | This repository contains several baseline algorithms for cross-source point cloud registration. 3 | 4 | ## Fast global registration (FGR) 5 | 6 | The implementation is FGR.py 7 | -------------------------------------------------------------------------------- /Dataloader/README.md: -------------------------------------------------------------------------------- 1 | # Data loader for cross-source point cloud registraiton benchmark 2 | 3 | Three files include in this folder: 4 | 5 | "crosssource_loader.py" includes all the functions to read cross-source point cloud datasets 6 | 7 | "FGR.py" defines an example of fast global registraiton algorithm. 8 | 9 | "example.py" shows an example of how to evalute the performance of FGR in the cross-source point cloud registraiton benchmark 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cross-source point cloud registraiton benchmark 2 | This repository contains dataloader and several baseline algorithms for cross-source point cloud registration. 3 | 4 | ## Dataloader 5 | 6 | We provide the dataloader tools for cross-source point cloud benchmark. See Dataloader folder for more details 7 | 8 | ## Baseline algorithms 9 | 10 | Some baseline algorithms have been implemented and put in baseline folder. [Updating] 11 | --------------------------------------------------------------------------------