├── .gitconfig ├── .gitignore ├── .gitmodules ├── .tmux-2.1.conf ├── .tmux.conf ├── .zshrc ├── Anki └── README.md ├── ApproxMVBB ├── CMakeLists.txt ├── README.md └── src │ └── main.cpp ├── Obj2Point ├── CMakeLists.txt ├── Obj2Points ├── README.TXT ├── eigenlib │ ├── Eigen │ │ ├── Array │ │ ├── CMakeLists.txt │ │ ├── Cholesky │ │ ├── Core │ │ ├── Dense │ │ ├── Eigen │ │ ├── Eigen2Support │ │ ├── Eigenvalues │ │ ├── Geometry │ │ ├── Householder │ │ ├── Jacobi │ │ ├── LU │ │ ├── LeastSquares │ │ ├── QR │ │ ├── QtAlignedMalloc │ │ ├── SVD │ │ ├── Sparse │ │ ├── StdDeque │ │ ├── StdList │ │ ├── StdVector │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky │ │ │ ├── CMakeLists.txt │ │ │ ├── LDLT.h │ │ │ └── LLT.h │ │ │ ├── Core │ │ │ ├── Array.h │ │ │ ├── ArrayBase.h │ │ │ ├── ArrayWrapper.h │ │ │ ├── Assign.h │ │ │ ├── BandMatrix.h │ │ │ ├── Block.h │ │ │ ├── BooleanRedux.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CommaInitializer.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 │ │ │ ├── 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 │ │ │ ├── Product.h │ │ │ ├── ProductBase.h │ │ │ ├── Random.h │ │ │ ├── Redux.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 │ │ │ │ ├── GeneralMatrixVector.h │ │ │ │ ├── Parallelizer.h │ │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ │ ├── SelfadjointMatrixVector.h │ │ │ │ ├── SelfadjointProduct.h │ │ │ │ ├── SelfadjointRank2Update.h │ │ │ │ ├── TriangularMatrixMatrix.h │ │ │ │ ├── TriangularMatrixVector.h │ │ │ │ ├── TriangularSolverMatrix.h │ │ │ │ └── TriangularSolverVector.h │ │ │ └── util │ │ │ │ ├── BlasUtil.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Constants.h │ │ │ │ ├── DisableStupidWarnings.h │ │ │ │ ├── ForwardDeclarations.h │ │ │ │ ├── Macros.h │ │ │ │ ├── Memory.h │ │ │ │ ├── Meta.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 │ │ │ ├── EigenSolver.h │ │ │ ├── EigenvaluesCommon.h │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ │ ├── HessenbergDecomposition.h │ │ │ ├── MatrixBaseEigenvalues.h │ │ │ ├── RealSchur.h │ │ │ ├── SelfAdjointEigenSolver.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 │ │ │ ├── Jacobi │ │ │ ├── CMakeLists.txt │ │ │ └── Jacobi.h │ │ │ ├── LU │ │ │ ├── CMakeLists.txt │ │ │ ├── Determinant.h │ │ │ ├── FullPivLU.h │ │ │ ├── Inverse.h │ │ │ ├── PartialPivLU.h │ │ │ └── arch │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Inverse_SSE.h │ │ │ ├── QR │ │ │ ├── CMakeLists.txt │ │ │ ├── ColPivHouseholderQR.h │ │ │ ├── FullPivHouseholderQR.h │ │ │ └── HouseholderQR.h │ │ │ ├── SVD │ │ │ ├── CMakeLists.txt │ │ │ ├── JacobiSVD.h │ │ │ └── UpperBidiagonalization.h │ │ │ ├── Sparse │ │ │ ├── AmbiVector.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CompressedStorage.h │ │ │ ├── CoreIterators.h │ │ │ ├── DynamicSparseMatrix.h │ │ │ ├── MappedSparseMatrix.h │ │ │ ├── SparseAssign.h │ │ │ ├── SparseBlock.h │ │ │ ├── SparseCwiseBinaryOp.h │ │ │ ├── SparseCwiseUnaryOp.h │ │ │ ├── SparseDenseProduct.h │ │ │ ├── SparseDiagonalProduct.h │ │ │ ├── SparseDot.h │ │ │ ├── SparseFuzzy.h │ │ │ ├── SparseMatrix.h │ │ │ ├── SparseMatrixBase.h │ │ │ ├── SparseProduct.h │ │ │ ├── SparseRedux.h │ │ │ ├── SparseSelfAdjointView.h │ │ │ ├── SparseSparseProduct.h │ │ │ ├── SparseTranspose.h │ │ │ ├── SparseTriangularView.h │ │ │ ├── SparseUtil.h │ │ │ ├── SparseVector.h │ │ │ ├── SparseView.h │ │ │ └── TriangularSolver.h │ │ │ ├── StlSupport │ │ │ ├── CMakeLists.txt │ │ │ ├── StdDeque.h │ │ │ ├── StdList.h │ │ │ ├── StdVector.h │ │ │ └── details.h │ │ │ ├── misc │ │ │ ├── CMakeLists.txt │ │ │ ├── Image.h │ │ │ ├── Kernel.h │ │ │ └── Solve.h │ │ │ └── plugins │ │ │ ├── ArrayCwiseBinaryOps.h │ │ │ ├── ArrayCwiseUnaryOps.h │ │ │ ├── BlockMethods.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ ├── CommonCwiseUnaryOps.h │ │ │ ├── MatrixCwiseBinaryOps.h │ │ │ └── MatrixCwiseUnaryOps.h │ └── unsupported │ │ ├── CMakeLists.txt │ │ ├── Eigen │ │ ├── AdolcForward │ │ ├── AlignedVector3 │ │ ├── AutoDiff │ │ ├── BVH │ │ ├── CMakeLists.txt │ │ ├── CholmodSupport │ │ ├── FFT │ │ ├── IterativeSolvers │ │ ├── MPRealSupport │ │ ├── MatrixFunctions │ │ ├── MoreVectorization │ │ ├── NonLinearOptimization │ │ ├── NumericalDiff │ │ ├── OpenGLSupport │ │ ├── Polynomials │ │ ├── Skyline │ │ ├── SparseExtra │ │ ├── SuperLUSupport │ │ ├── UmfPackSupport │ │ └── src │ │ │ ├── AutoDiff │ │ │ ├── AutoDiffJacobian.h │ │ │ ├── AutoDiffScalar.h │ │ │ ├── AutoDiffVector.h │ │ │ └── CMakeLists.txt │ │ │ ├── BVH │ │ │ ├── BVAlgorithms.h │ │ │ ├── CMakeLists.txt │ │ │ └── KdBVH.h │ │ │ ├── CMakeLists.txt │ │ │ ├── FFT │ │ │ ├── CMakeLists.txt │ │ │ ├── ei_fftw_impl.h │ │ │ └── ei_kissfft_impl.h │ │ │ ├── IterativeSolvers │ │ │ ├── CMakeLists.txt │ │ │ ├── ConstrainedConjGrad.h │ │ │ └── IterationController.h │ │ │ ├── MatrixFunctions │ │ │ ├── CMakeLists.txt │ │ │ ├── MatrixExponential.h │ │ │ ├── MatrixFunction.h │ │ │ ├── MatrixFunctionAtomic.h │ │ │ └── StemFunction.h │ │ │ ├── MoreVectorization │ │ │ ├── CMakeLists.txt │ │ │ └── MathFunctions.h │ │ │ ├── NonLinearOptimization │ │ │ ├── CMakeLists.txt │ │ │ ├── HybridNonLinearSolver.h │ │ │ ├── LevenbergMarquardt.h │ │ │ ├── chkder.h │ │ │ ├── covar.h │ │ │ ├── dogleg.h │ │ │ ├── fdjac1.h │ │ │ ├── lmpar.h │ │ │ ├── qrsolv.h │ │ │ ├── r1mpyq.h │ │ │ ├── r1updt.h │ │ │ └── rwupdt.h │ │ │ ├── NumericalDiff │ │ │ ├── CMakeLists.txt │ │ │ └── NumericalDiff.h │ │ │ ├── Polynomials │ │ │ ├── CMakeLists.txt │ │ │ ├── Companion.h │ │ │ ├── PolynomialSolver.h │ │ │ └── PolynomialUtils.h │ │ │ ├── Skyline │ │ │ ├── CMakeLists.txt │ │ │ ├── SkylineInplaceLU.h │ │ │ ├── SkylineMatrix.h │ │ │ ├── SkylineMatrixBase.h │ │ │ ├── SkylineProduct.h │ │ │ ├── SkylineStorage.h │ │ │ └── SkylineUtil.h │ │ │ └── SparseExtra │ │ │ ├── Amd.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CholmodSupport.h │ │ │ ├── CholmodSupportLegacy.h │ │ │ ├── RandomSetter.h │ │ │ ├── SimplicialCholesky.h │ │ │ ├── Solve.h │ │ │ ├── SparseLDLTLegacy.h │ │ │ ├── SparseLLT.h │ │ │ ├── SparseLU.h │ │ │ ├── SuperLUSupport.h │ │ │ └── UmfPackSupport.h │ │ ├── README.txt │ │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── Doxyfile.in │ │ ├── Overview.dox │ │ ├── examples │ │ │ ├── BVH_Example.cpp │ │ │ ├── CMakeLists.txt │ │ │ ├── FFT.cpp │ │ │ ├── MatrixExponential.cpp │ │ │ ├── MatrixFunction.cpp │ │ │ ├── MatrixSine.cpp │ │ │ ├── MatrixSinh.cpp │ │ │ ├── PolynomialSolver1.cpp │ │ │ └── PolynomialUtils1.cpp │ │ └── snippets │ │ │ └── CMakeLists.txt │ │ └── test │ │ ├── BVH.cpp │ │ ├── CMakeLists.txt │ │ ├── FFT.cpp │ │ ├── FFTW.cpp │ │ ├── NonLinearOptimization.cpp │ │ ├── NumericalDiff.cpp │ │ ├── alignedvector3.cpp │ │ ├── autodiff.cpp │ │ ├── forward_adolc.cpp │ │ ├── matrix_exponential.cpp │ │ ├── matrix_function.cpp │ │ ├── mpreal │ │ ├── dlmalloc.c │ │ ├── dlmalloc.h │ │ ├── mpreal.cpp │ │ └── mpreal.h │ │ ├── mpreal_support.cpp │ │ ├── openglsupport.cpp │ │ ├── polynomialsolver.cpp │ │ ├── polynomialutils.cpp │ │ ├── sparse_extra.cpp │ │ ├── sparse_ldlt.cpp │ │ ├── sparse_llt.cpp │ │ └── sparse_lu.cpp ├── main.cpp ├── obj_shape_loader.cpp ├── obj_shape_loader.h ├── utils_sampling.cpp ├── utils_sampling.hpp ├── vcg │ ├── complex │ │ ├── algorithms │ │ │ ├── attribute_seam.h │ │ │ ├── autoalign_4pcs.h │ │ │ ├── bitquad_creation.h │ │ │ ├── bitquad_optimization.h │ │ │ ├── bitquad_support.h │ │ │ ├── boundary.h │ │ │ ├── clean.h │ │ │ ├── clip.h │ │ │ ├── closest.h │ │ │ ├── clustering.h │ │ │ ├── crease_cut.h │ │ │ ├── create │ │ │ │ ├── advancing_front.h │ │ │ │ ├── ball_pivoting.h │ │ │ │ ├── emc_lookup_table.h │ │ │ │ ├── extended_marching_cubes.h │ │ │ │ ├── marching_cubes.h │ │ │ │ ├── mc_lookup_table.h │ │ │ │ ├── mc_trivial_walker.h │ │ │ │ ├── platonic.h │ │ │ │ ├── readme.txt │ │ │ │ └── resampler.h │ │ │ ├── edge_collapse.h │ │ │ ├── geodesic.h │ │ │ ├── halfedge_quad_clean.h │ │ │ ├── hole.h │ │ │ ├── inertia.h │ │ │ ├── inside.h │ │ │ ├── intersection.h │ │ │ ├── local_optimization.h │ │ │ ├── local_optimization │ │ │ │ ├── quad_diag_collapse.h │ │ │ │ ├── tetra_edge_collapse.h │ │ │ │ ├── tri_edge_collapse.h │ │ │ │ ├── tri_edge_collapse_quadric.h │ │ │ │ ├── tri_edge_collapse_quadric_tex.h │ │ │ │ └── tri_edge_flip.h │ │ │ ├── nring.h │ │ │ ├── overlap_estimation.h │ │ │ ├── parametrization │ │ │ │ ├── distorsion.h │ │ │ │ ├── poisson_solver.h │ │ │ │ ├── tangent_field_operators.h │ │ │ │ └── uv_utils.h │ │ │ ├── point_sampling.h │ │ │ ├── polygon_support.h │ │ │ ├── refine.h │ │ │ ├── refine_loop.h │ │ │ ├── smooth.h │ │ │ ├── stat.h │ │ │ ├── subset.h │ │ │ ├── textcoord_optimization.h │ │ │ ├── update │ │ │ │ ├── bounding.h │ │ │ │ ├── color.h │ │ │ │ ├── curvature.h │ │ │ │ ├── curvature_fitting.h │ │ │ │ ├── edges.h │ │ │ │ ├── fitmaps.h │ │ │ │ ├── flag.h │ │ │ │ ├── halfedge_indexed.h │ │ │ │ ├── halfedge_topology.h │ │ │ │ ├── normal.h │ │ │ │ ├── position.h │ │ │ │ ├── quality.h │ │ │ │ ├── selection.h │ │ │ │ ├── texture.h │ │ │ │ └── topology.h │ │ │ └── voronoi_clustering.h │ │ ├── all_types.h │ │ ├── allocate.h │ │ ├── append.h │ │ ├── complex.h │ │ ├── tetramesh │ │ │ ├── allocate.h │ │ │ ├── base.h │ │ │ ├── edge_collapse.h │ │ │ ├── edge_split.h │ │ │ ├── subset.h │ │ │ ├── update │ │ │ │ ├── bounding.h │ │ │ │ ├── normal.h │ │ │ │ ├── topology.h │ │ │ │ └── triconvert.h │ │ │ └── visit.h │ │ └── used_types.h │ ├── connectors │ │ ├── halfedge_pos.h │ │ ├── hedge.h │ │ └── hedge_component.h │ ├── container │ │ ├── container_allocation_table.h │ │ ├── derivation_chain.h │ │ ├── entries_allocation_table.h │ │ ├── simple_temporary_data.h │ │ └── vector_occ.h │ ├── math │ │ ├── base.h │ │ ├── camera.h │ │ ├── deprecated_matrix.h │ │ ├── deprecated_matrix33.h │ │ ├── deprecated_matrix44.h │ │ ├── disjoint_set.h │ │ ├── eigen.h │ │ ├── eigen_matrix_addons.h │ │ ├── eigen_matrixbase_addons.h │ │ ├── factorial.h │ │ ├── gen_normal.h │ │ ├── histogram.h │ │ ├── legendre.h │ │ ├── lin_algebra.h │ │ ├── linear.h │ │ ├── matrix.h │ │ ├── matrix33.h │ │ ├── matrix44.h │ │ ├── perlin_noise.h │ │ ├── point_matching.h │ │ ├── polar_decomposition.h │ │ ├── quadric.h │ │ ├── quadric5.h │ │ ├── quaternion.h │ │ ├── random_generator.h │ │ ├── shot.h │ │ ├── similarity.h │ │ ├── similarity2.h │ │ └── spherical_harmonics.h │ ├── simplex │ │ ├── edge │ │ │ ├── base.h │ │ │ ├── base_old.h │ │ │ ├── component.h │ │ │ ├── distance.h │ │ │ ├── edge_old.h │ │ │ ├── pos.h │ │ │ └── topology.h │ │ ├── face │ │ │ ├── base.h │ │ │ ├── base_old.h │ │ │ ├── component.h │ │ │ ├── component_occ.h │ │ │ ├── component_ocf.h │ │ │ ├── component_polygon.h │ │ │ ├── component_rt.h │ │ │ ├── distance.h │ │ │ ├── face_old.h │ │ │ ├── jumping_pos.h │ │ │ ├── pos.h │ │ │ └── topology.h │ │ ├── tetrahedron │ │ │ ├── base.h │ │ │ ├── base_old.h │ │ │ ├── component.h │ │ │ ├── pos.h │ │ │ └── tetrahedron.h │ │ └── vertex │ │ │ ├── base.h │ │ │ ├── base_old.h │ │ │ ├── component.h │ │ │ ├── component_occ.h │ │ │ ├── component_ocf.h │ │ │ ├── component_sph.h │ │ │ ├── distance.h │ │ │ └── vertex_old.h │ └── space │ │ ├── box.h │ │ ├── box2.h │ │ ├── box3.h │ │ ├── color4.h │ │ ├── colorspace.h │ │ ├── deprecated_point.h │ │ ├── deprecated_point2.h │ │ ├── deprecated_point3.h │ │ ├── deprecated_point4.h │ │ ├── distance3.h │ │ ├── fitting3.h │ │ ├── index │ │ ├── aabb_binary_tree │ │ │ ├── aabb_binary_tree.h │ │ │ ├── base.h │ │ │ ├── closest.h │ │ │ ├── frustum_cull.h │ │ │ ├── kclosest.h │ │ │ └── ray.h │ │ ├── base.h │ │ ├── grid_closest.h │ │ ├── grid_static_obj.h │ │ ├── grid_static_ptr.h │ │ ├── grid_util.h │ │ ├── kdtree │ │ │ ├── kdtree.h │ │ │ ├── mlsutils.h │ │ │ └── priorityqueue.h │ │ ├── octree.h │ │ ├── octree_template.h │ │ ├── perfect_spatial_hashing.h │ │ ├── space_iterators.h │ │ └── spatial_hashing.h │ │ ├── intersection │ │ └── triangle_triangle3.h │ │ ├── intersection2.h │ │ ├── intersection3.h │ │ ├── line2.h │ │ ├── line3.h │ │ ├── normal_extrapolation.h │ │ ├── obox3.h │ │ ├── planar_polygon_tessellation.h │ │ ├── plane3.h │ │ ├── point.h │ │ ├── point2.h │ │ ├── point3.h │ │ ├── point4.h │ │ ├── poly_packer.h │ │ ├── ray2.h │ │ ├── ray3.h │ │ ├── rect_packer.h │ │ ├── segment2.h │ │ ├── segment3.h │ │ ├── smallest_enclosing.h │ │ ├── space.h │ │ ├── sphere3.h │ │ ├── tetra3.h │ │ ├── texcoord2.h │ │ ├── triangle2.h │ │ └── triangle3.h ├── vcg_mesh.cpp ├── vcg_mesh.hpp └── wrap │ ├── callback.h │ └── utils.h ├── README.md ├── bivariate_normal.pdf ├── blender ├── README.md └── install_pip.py ├── briss ├── README.md └── briss-0.9.tar.gz ├── cffi ├── _ext.c ├── example.py ├── setup.py └── src │ ├── example.cpp │ └── ext.h ├── chrome_extension ├── README.md └── new_tab_extension │ └── 1.24_1 │ ├── LICENSE_MIT.txt │ ├── README.md │ ├── background.js │ ├── icon.svg │ ├── manifest.fingerprint │ ├── manifest.json │ ├── metadata │ ├── computed_hashes.json │ └── verified_contents.json │ ├── newtab.css │ ├── newtab.html │ ├── newtab.js │ └── privacy.md ├── color_list └── README.md ├── diff-highlight ├── doc ├── .gitkeep ├── disable_dash.png ├── minimize_window.png └── ss │ ├── client_linux_amd64 │ └── server_linux_amd64 ├── expert.html ├── expert.txt ├── export_keynote.scpt ├── git-diffall ├── git_meld.sh ├── google_drive ├── README.md └── download_gdrive.py ├── graph_neural_network.md ├── gtk.css ├── img_utils.py ├── install_3dv.md ├── install_approxmvbb.sh ├── install_arc.sh ├── install_autojump.sh ├── install_cc.sh ├── install_cmake.sh ├── install_convex_hull.md ├── install_cuda.sh ├── install_eigen.sh ├── install_ftp.sh ├── install_fzf.sh ├── install_gcc.sh ├── install_gpick.sh ├── install_meta.sh ├── install_paper_writing.md ├── install_protobuf.sh ├── install_quaternion.md ├── install_sg.sh ├── install_shutter.sh ├── install_sogou.sh ├── install_tmux.sh ├── install_vsfm.sh ├── install_wordpress.sh ├── install_zsh.sh ├── jetbrain_settings.jar ├── latex ├── README.md └── example.tex ├── letsencrypt └── renew_letsencrypt.sh ├── matplotlib └── README.md ├── meld.css ├── meow ├── MEOW ├── README.md ├── blocked ├── proxy └── rc ├── meshlab ├── README.md ├── normal.frag ├── normal.gdp └── normal.vert ├── my_pyfun ├── README.md ├── my_pyfun │ ├── __init__.py │ └── utils.py └── setup.py ├── nginx_default ├── obj_to_ply ├── README.md ├── obj_to_ply ├── obj_to_ply.c ├── ply_io.c └── ply_io.h ├── onedrive └── README.md ├── open3d_control_viewpoint.py ├── opengl ├── cat.ply ├── inout.py ├── opengl_utils.py └── run.py ├── parse_pascal3d.py ├── pip.conf ├── post_data.py ├── relation_inductive_bias.md ├── single_view_3d.md ├── ss ├── bbr.sh ├── config.json ├── fast_client.sh ├── fast_server.sh ├── haproxy.cfg ├── install_bbr.sh ├── install_ss.sh └── install_ss_server.sh ├── teaching ├── cameras.npz ├── panorama_points.npz ├── points.npz └── stereo_batch_provider.py ├── tweak_keyboard.md ├── ubuntu_dir_Engligh.sh ├── ubuntu_shortcut.md ├── vimium_options.md ├── vis_camera_frustum.py ├── viz.js └── zathurarc /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = pengsida 3 | email = pengsida@zju.edu.cn 4 | [credential] 5 | helper = cache --timeout=60480000 6 | [https] 7 | proxy = http://localhost:8118 8 | [http] 9 | proxy = http://localhost:8118 10 | [merge] 11 | tool = meld 12 | [pager] 13 | diff = diff-highlight | less 14 | log = diff-highlight | less 15 | show = diff-highlight | less 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cmake-build-debug/ 2 | .idea/ 3 | __pycache__/ 4 | *.egg-info/ 5 | build/ 6 | dist/ 7 | .ipynb_checkpoints/ 8 | 9 | *.py[cod] 10 | *.so 11 | *.pth 12 | *.DS_Store 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule ".vim"] 2 | path = .vim 3 | url = https://github.com/wwtalwtaw/.vim.git 4 | -------------------------------------------------------------------------------- /.tmux-2.1.conf: -------------------------------------------------------------------------------- 1 | unbind C-b 2 | set -g prefix C-a 3 | unbind % 4 | bind | split-window -h 5 | unbind '"' 6 | bind - split-window -v 7 | set -g mouse on 8 | set -g default-terminal "screen-256color" 9 | 10 | # 设置状态栏 11 | set-option -g status-position top 12 | set -g status-bg black 13 | set -g status-fg white 14 | 15 | # 对齐方式 16 | set-option -g status-justify centre 17 | 18 | # 左下角 19 | set-option -g status-left '#[bg=black,fg=green][#[fg=cyan,bold]#(whoami)@#H #S#[fg=green]]' 20 | set-option -g status-left-length 20 21 | 22 | # 窗口列表 23 | setw -g automatic-rename on 24 | set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]' 25 | set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]' 26 | 27 | # 右下角 28 | set -g status-right '#[fg=green][#[fg=cyan,bold]%Y-%m-%d %H:%M#[default]#[fg=green]]' 29 | 30 | setw -g mode-keys vi 31 | bind-key -t vi-copy 'v' begin-selection 32 | bind-key -t vi-copy y copy-pipe 'xclip -selection clipboard >/dev/null' 33 | 34 | bind C-c run " tmux save-buffer - | xclip -i -sel clipboard" 35 | bind C-v run " tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" 36 | 37 | set-option -g history-limit 10000 38 | bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" 39 | bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" 40 | 41 | set-option -g default-shell /bin/zsh 42 | 43 | bind-key -n C-h select-pane -L 44 | bind-key -n C-j select-pane -D 45 | bind-key -n C-k select-pane -U 46 | bind-key -n C-l select-pane -R 47 | 48 | bind a send-prefix 49 | bind l next-window 50 | unbind n 51 | bind h previous-window 52 | unbind p 53 | 54 | bind - split-window -v -c "#{pane_current_path}" 55 | bind | split-window -h -c "#{pane_current_path}" 56 | bind c new-window -c "#{pane_current_path}" 57 | -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | unbind C-b 2 | set -g prefix C-a 3 | unbind % 4 | bind | split-window -h 5 | unbind '"' 6 | bind - split-window -v 7 | set -g mouse on 8 | set -g default-terminal "screen-256color" 9 | 10 | # 设置状态栏 11 | set-option -g status-position top 12 | set -g status-bg black 13 | set -g status-fg white 14 | 15 | # 对齐方式 16 | set-option -g status-justify centre 17 | 18 | # 左下角 19 | set-option -g status-left '#[bg=black,fg=green][#[fg=cyan,bold]#(whoami)@#H #S#[fg=green]]' 20 | set-option -g status-left-length 20 21 | 22 | # 窗口列表 23 | setw -g automatic-rename on 24 | set-window-option -g window-status-format '#[dim]#I:#[default]#W#[fg=grey,dim]' 25 | set-window-option -g window-status-current-format '#[fg=cyan,bold]#I#[fg=blue]:#[fg=cyan]#W#[fg=dim]' 26 | 27 | # 右下角 28 | set -g status-right '#[fg=green][#[fg=cyan,bold]%Y-%m-%d %H:%M#[default]#[fg=green]]' 29 | 30 | setw -g mode-keys vi 31 | bind-key -T copy-mode-vi v send-keys -X begin-selection 32 | bind-key -T copy-mode-vi y send-keys -X copy-pipe 'xclip -selection clipboard >/dev/null' 33 | 34 | bind C-c run " tmux save-buffer - | xclip -i -sel clipboard" 35 | bind C-v run " tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" 36 | 37 | set-option -g history-limit 10000 38 | bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" 39 | bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" 40 | 41 | set-option -g default-shell /bin/zsh 42 | 43 | bind-key -n C-h select-pane -L 44 | bind-key -n C-j select-pane -D 45 | bind-key -n C-k select-pane -U 46 | bind-key -n C-l select-pane -R 47 | 48 | bind a send-prefix 49 | bind l next-window 50 | unbind n 51 | bind h previous-window 52 | unbind p 53 | 54 | bind - split-window -v -c "#{pane_current_path}" 55 | bind | split-window -h -c "#{pane_current_path}" 56 | bind c new-window -c "#{pane_current_path}" 57 | 58 | set -g status-interval 1 59 | set -g pane-border-status top 60 | set -g pane-border-format '#(ps --no-headers -t #{pane_tty} -o args -O-c)' 61 | -------------------------------------------------------------------------------- /Anki/README.md: -------------------------------------------------------------------------------- 1 | # Anki 2 | 3 | ## Use latex in Anki 4 | 5 | 1. Change the texmf directory according the [link](https://tex.stackexchange.com/questions/66614/change-texmfhome-per-user) 6 | 2. Install the dvipng as follows 7 | ``` 8 | tlmgr init-usertree 9 | sudo apt-get install xzdec 10 | # for texlive 2015 11 | tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final 12 | tlmgr update --self 13 | tlmgr install divpng 14 | ``` 15 | 3. Change the font size according to the [link](https://tex.stackexchange.com/questions/108418/anki-latex-math-font-size-declaremathsizes) 16 | 17 | -------------------------------------------------------------------------------- /ApproxMVBB/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project("ApproxMVBBExample-MVBB") 2 | 3 | set(CMAKE_CXX_STANDARD 11) 4 | set(CMAKE_CXX_FLAGS "-fsanitize=leak -fsanitize=address") 5 | find_package(ApproxMVBB REQUIRED COMPONENTS) 6 | 7 | add_executable(${PROJECT_NAME} src/main.cpp ) 8 | target_link_libraries(${PROJECT_NAME} "ApproxMVBB::Core") 9 | 10 | -------------------------------------------------------------------------------- /ApproxMVBB/README.md: -------------------------------------------------------------------------------- 1 | # Setup introduction 2 | 3 | Use the following script to compile the program: 4 | 5 | ```bash 6 | mkdir build 7 | cd build 8 | cmake .. 9 | make 10 | ``` 11 | 12 | -------------------------------------------------------------------------------- /ApproxMVBB/src/main.cpp: -------------------------------------------------------------------------------- 1 | // ======================================================================================== 2 | // ApproxMVBB 3 | // Copyright (C) 2014 by Gabriel Nützi 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla Public 7 | // License, v. 2.0. If a copy of the MPL was not distributed with this 8 | // file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | // ======================================================================================== 10 | 11 | #include 12 | 13 | #include "ApproxMVBB/ComputeApproxMVBB.hpp" 14 | 15 | int main(int argc, char** argv) 16 | { 17 | unsigned int nPoints = 100000; 18 | 19 | std::cout << "Sample " << nPoints << " points in unite cube (coordinates are in world coordinate system `I` ) " << std::endl; 20 | ApproxMVBB::Matrix3Dyn points(3, nPoints); 21 | points.setRandom(); 22 | 23 | ApproxMVBB::OOBB oobb = ApproxMVBB::approximateMVBB(points, 24 | 0.001, 25 | 500, 26 | 5, /*increasing the grid size decreases speed */ 27 | 0, 28 | 5); 29 | 30 | std::cout << "Computed OOBB: " << std::endl 31 | << "---> lower point in OOBB coordinate system: " << oobb.m_minPoint.transpose() << std::endl 32 | << "---> upper point in OOBB coordinate system: " << oobb.m_maxPoint.transpose() << std::endl 33 | << "---> coordinate transformation A_IK matrix from OOBB coordinate system `K` " 34 | "to world coordinate system `I` " 35 | << std::endl 36 | << oobb.m_q_KI.matrix() << std::endl 37 | << "---> this is also the rotation matrix R_KI which turns the " 38 | "world coordinate system `I` into the OOBB coordinate system `K` " 39 | << std::endl 40 | << std::endl; 41 | 42 | // To make all points inside the OOBB : 43 | ApproxMVBB::Matrix33 A_KI = oobb.m_q_KI.matrix().transpose(); // faster to store the transformation matrix first 44 | auto size = points.cols(); 45 | for(unsigned int i = 0; i < size; ++i) 46 | { 47 | oobb.unite(A_KI * points.col(i)); 48 | } 49 | 50 | // To make the box have a minimum extent of greater 0.1: 51 | // see also oobb.expandToMinExtentRelative(...) 52 | oobb.expandToMinExtentAbsolute(0.1); 53 | 54 | std::cout << "OOBB with all point included: " << std::endl 55 | << "---> lower point in OOBB coordinate system: " << oobb.m_minPoint.transpose() << std::endl 56 | << "---> upper point in OOBB coordinate system: " << oobb.m_maxPoint.transpose() << std::endl; 57 | 58 | return 0; 59 | } 60 | -------------------------------------------------------------------------------- /Obj2Point/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(Obj2Points) 3 | 4 | set(CMAKE_CXX_STANDARD 11) 5 | 6 | include_directories(${CMAKE_CURRENT_LIST_DIR}) 7 | 8 | message("CMAKE_CURRENT_LIST_DIR is ${CMAKE_CURRENT_LIST_DIR}") 9 | 10 | add_executable(Obj2Points main.cpp utils_sampling.cpp vcg_mesh.cpp obj_shape_loader.cpp) 11 | 12 | -------------------------------------------------------------------------------- /Obj2Point/Obj2Points: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pengsida/configuration/e1a6fedc56b8f384d0daf62f866892953675d0d2/Obj2Point/Obj2Points -------------------------------------------------------------------------------- /Obj2Point/README.TXT: -------------------------------------------------------------------------------- 1 | vcg/* wrap/* from VCG lib 2 | utils_sampling.cpp utils_sampling.hpp vcg_mesh.cpp vcg_mesh.hpp from http://rodolphe-vaillant.fr/?e=37 3 | // obj_shape_loader.h functions of parsing string from https://github.com/Bly7/OBJ-Loader 4 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 9 | 10 | /** \defgroup Cholesky_Module Cholesky module 11 | * 12 | * 13 | * 14 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 15 | * Those decompositions are accessible via the following MatrixBase methods: 16 | * - MatrixBase::llt(), 17 | * - MatrixBase::ldlt() 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/Cholesky/LLT.h" 26 | #include "src/Cholesky/LDLT.h" 27 | 28 | } // namespace Eigen 29 | 30 | #include "src/Core/util/ReenableStupidWarnings.h" 31 | 32 | #endif // EIGEN_CHOLESKY_MODULE_H 33 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 34 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/Eigen2Support: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN2SUPPORT_H 26 | #define EIGEN2SUPPORT_H 27 | 28 | #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) 29 | #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header 30 | #endif 31 | 32 | #include "src/Core/util/DisableStupidWarnings.h" 33 | 34 | namespace Eigen { 35 | 36 | /** \defgroup Eigen2Support_Module Eigen2 support module 37 | * This module provides a couple of deprecated functions improving the compatibility with Eigen2. 38 | * 39 | * To use it, define EIGEN2_SUPPORT before including any Eigen header 40 | * \code 41 | * #define EIGEN2_SUPPORT 42 | * \endcode 43 | * 44 | */ 45 | 46 | #include "src/Eigen2Support/Macros.h" 47 | #include "src/Eigen2Support/Memory.h" 48 | #include "src/Eigen2Support/Meta.h" 49 | #include "src/Eigen2Support/Lazy.h" 50 | #include "src/Eigen2Support/Cwise.h" 51 | #include "src/Eigen2Support/CwiseOperators.h" 52 | #include "src/Eigen2Support/TriangularSolver.h" 53 | #include "src/Eigen2Support/Block.h" 54 | #include "src/Eigen2Support/VectorBlock.h" 55 | #include "src/Eigen2Support/Minor.h" 56 | #include "src/Eigen2Support/MathFunctions.h" 57 | 58 | 59 | } // namespace Eigen 60 | 61 | #include "src/Core/util/ReenableStupidWarnings.h" 62 | 63 | // Eigen2 used to include iostream 64 | #include 65 | 66 | #define USING_PART_OF_NAMESPACE_EIGEN \ 67 | EIGEN_USING_MATRIX_TYPEDEFS \ 68 | using Eigen::Matrix; \ 69 | using Eigen::MatrixBase; \ 70 | using Eigen::ei_random; \ 71 | using Eigen::ei_real; \ 72 | using Eigen::ei_imag; \ 73 | using Eigen::ei_conj; \ 74 | using Eigen::ei_abs; \ 75 | using Eigen::ei_abs2; \ 76 | using Eigen::ei_sqrt; \ 77 | using Eigen::ei_exp; \ 78 | using Eigen::ei_log; \ 79 | using Eigen::ei_sin; \ 80 | using Eigen::ei_cos; 81 | 82 | #endif // EIGEN2SUPPORT_H 83 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | 13 | namespace Eigen { 14 | 15 | /** \defgroup Eigenvalues_Module Eigenvalues module 16 | * 17 | * 18 | * 19 | * This module mainly provides various eigenvalue solvers. 20 | * This module also provides some MatrixBase methods, including: 21 | * - MatrixBase::eigenvalues(), 22 | * - MatrixBase::operatorNorm() 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/Eigenvalues/Tridiagonalization.h" 30 | #include "src/Eigenvalues/RealSchur.h" 31 | #include "src/Eigenvalues/EigenSolver.h" 32 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 34 | #include "src/Eigenvalues/HessenbergDecomposition.h" 35 | #include "src/Eigenvalues/ComplexSchur.h" 36 | #include "src/Eigenvalues/ComplexEigenSolver.h" 37 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 38 | 39 | } // namespace Eigen 40 | 41 | #include "src/Core/util/ReenableStupidWarnings.h" 42 | 43 | #endif // EIGEN_EIGENVALUES_MODULE_H 44 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 45 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 17 | 18 | /** \defgroup Geometry_Module Geometry module 19 | * 20 | * 21 | * 22 | * This module provides support for: 23 | * - fixed-size homogeneous transformations 24 | * - translation, scaling, 2D and 3D rotations 25 | * - quaternions 26 | * - \ref MatrixBase::cross() "cross product" 27 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 28 | * - some linear components: parametrized-lines and hyperplanes 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | #include "src/Geometry/OrthoMethods.h" 36 | #include "src/Geometry/EulerAngles.h" 37 | 38 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS 39 | #include "src/Geometry/Homogeneous.h" 40 | #include "src/Geometry/RotationBase.h" 41 | #include "src/Geometry/Rotation2D.h" 42 | #include "src/Geometry/Quaternion.h" 43 | #include "src/Geometry/AngleAxis.h" 44 | #include "src/Geometry/Transform.h" 45 | #include "src/Geometry/Translation.h" 46 | #include "src/Geometry/Scaling.h" 47 | #include "src/Geometry/Hyperplane.h" 48 | #include "src/Geometry/ParametrizedLine.h" 49 | #include "src/Geometry/AlignedBox.h" 50 | #include "src/Geometry/Umeyama.h" 51 | 52 | #if defined EIGEN_VECTORIZE_SSE 53 | #include "src/Geometry/arch/Geometry_SSE.h" 54 | #endif 55 | #endif 56 | 57 | #ifdef EIGEN2_SUPPORT 58 | #include "src/Eigen2Support/Geometry/All.h" 59 | #endif 60 | 61 | } // namespace Eigen 62 | 63 | #include "src/Core/util/ReenableStupidWarnings.h" 64 | 65 | #endif // EIGEN_GEOMETRY_MODULE_H 66 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 67 | 68 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 9 | 10 | /** \defgroup Householder_Module Householder module 11 | * This module provides Householder transformations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | */ 17 | 18 | #include "src/Householder/Householder.h" 19 | #include "src/Householder/HouseholderSequence.h" 20 | #include "src/Householder/BlockHouseholder.h" 21 | 22 | } // namespace Eigen 23 | 24 | #include "src/Core/util/ReenableStupidWarnings.h" 25 | 26 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 27 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 28 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 9 | 10 | /** \defgroup Jacobi_Module Jacobi module 11 | * This module provides Jacobi and Givens rotations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | * 17 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 18 | * - MatrixBase::applyOnTheLeft() 19 | * - MatrixBase::applyOnTheRight(). 20 | */ 21 | 22 | #include "src/Jacobi/Jacobi.h" 23 | 24 | } // namespace Eigen 25 | 26 | #include "src/Core/util/ReenableStupidWarnings.h" 27 | 28 | #endif // EIGEN_JACOBI_MODULE_H 29 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 30 | 31 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 9 | 10 | /** \defgroup LU_Module LU module 11 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 12 | * This module defines the following MatrixBase methods: 13 | * - MatrixBase::inverse() 14 | * - MatrixBase::determinant() 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | */ 20 | 21 | #include "src/misc/Solve.h" 22 | #include "src/misc/Kernel.h" 23 | #include "src/misc/Image.h" 24 | #include "src/LU/FullPivLU.h" 25 | #include "src/LU/PartialPivLU.h" 26 | #include "src/LU/Determinant.h" 27 | #include "src/LU/Inverse.h" 28 | 29 | #if defined EIGEN_VECTORIZE_SSE 30 | #include "src/LU/arch/Inverse_SSE.h" 31 | #endif 32 | 33 | #ifdef EIGEN2_SUPPORT 34 | #include "src/Eigen2Support/LU.h" 35 | #endif 36 | 37 | } // namespace Eigen 38 | 39 | #include "src/Core/util/ReenableStupidWarnings.h" 40 | 41 | #endif // EIGEN_LU_MODULE_H 42 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 43 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 19 | 20 | /** \defgroup LeastSquares_Module LeastSquares module 21 | * This module provides linear regression and related features. 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | */ 27 | 28 | #include "src/Eigen2Support/LeastSquares.h" 29 | 30 | } // namespace Eigen 31 | 32 | #include "src/Core/util/ReenableStupidWarnings.h" 33 | 34 | #endif // EIGEN2_SUPPORT 35 | 36 | #endif // EIGEN_REGRESSION_MODULE_H 37 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 13 | 14 | /** \defgroup QR_Module QR module 15 | * 16 | * 17 | * 18 | * This module provides various QR decompositions 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::qr(), 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | #include "src/misc/Solve.h" 28 | #include "src/QR/HouseholderQR.h" 29 | #include "src/QR/FullPivHouseholderQR.h" 30 | #include "src/QR/ColPivHouseholderQR.h" 31 | 32 | #ifdef EIGEN2_SUPPORT 33 | #include "src/Eigen2Support/QR.h" 34 | #endif 35 | 36 | } // namespace Eigen 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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | namespace Eigen { 11 | 12 | /** \defgroup SVD_Module SVD module 13 | * 14 | * 15 | * 16 | * This module provides SVD decomposition for (currently) real matrices. 17 | * This decomposition is accessible via the following MatrixBase method: 18 | * - MatrixBase::svd() 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/SVD/JacobiSVD.h" 27 | #include "src/SVD/UpperBidiagonalization.h" 28 | 29 | #ifdef EIGEN2_SUPPORT 30 | #include "src/Eigen2Support/SVD.h" 31 | #endif 32 | 33 | } // namespace Eigen 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif // EIGEN_SVD_MODULE_H 38 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 39 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_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 | #ifdef EIGEN2_SUPPORT 15 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 16 | #endif 17 | 18 | #ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 19 | #error The sparse module API is not stable yet. To use it anyway, please define the EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET preprocessor token. 20 | #endif 21 | 22 | namespace Eigen { 23 | 24 | /** \defgroup Sparse_Module Sparse module 25 | * 26 | * 27 | * 28 | * See the \ref TutorialSparse "Sparse tutorial" 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | /** The type used to identify a general sparse storage. */ 36 | struct Sparse {}; 37 | 38 | #include "src/Sparse/SparseUtil.h" 39 | #include "src/Sparse/SparseMatrixBase.h" 40 | #include "src/Sparse/CompressedStorage.h" 41 | #include "src/Sparse/AmbiVector.h" 42 | #include "src/Sparse/SparseMatrix.h" 43 | #include "src/Sparse/DynamicSparseMatrix.h" 44 | #include "src/Sparse/MappedSparseMatrix.h" 45 | #include "src/Sparse/SparseVector.h" 46 | #include "src/Sparse/CoreIterators.h" 47 | #include "src/Sparse/SparseBlock.h" 48 | #include "src/Sparse/SparseTranspose.h" 49 | #include "src/Sparse/SparseCwiseUnaryOp.h" 50 | #include "src/Sparse/SparseCwiseBinaryOp.h" 51 | #include "src/Sparse/SparseDot.h" 52 | #include "src/Sparse/SparseAssign.h" 53 | #include "src/Sparse/SparseRedux.h" 54 | #include "src/Sparse/SparseFuzzy.h" 55 | #include "src/Sparse/SparseProduct.h" 56 | #include "src/Sparse/SparseSparseProduct.h" 57 | #include "src/Sparse/SparseDenseProduct.h" 58 | #include "src/Sparse/SparseDiagonalProduct.h" 59 | #include "src/Sparse/SparseTriangularView.h" 60 | #include "src/Sparse/SparseSelfAdjointView.h" 61 | #include "src/Sparse/TriangularSolver.h" 62 | #include "src/Sparse/SparseView.h" 63 | 64 | } // namespace Eigen 65 | 66 | #include "src/Core/util/ReenableStupidWarnings.h" 67 | 68 | #endif // EIGEN_SPARSE_MODULE_H 69 | 70 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen 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 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDDEQUE_MODULE_H 27 | #define EIGEN_STDDEQUE_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdDeque.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDDEQUE_MODULE_H 43 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_STDLIST_MODULE_H 26 | #define EIGEN_STDLIST_MODULE_H 27 | 28 | #include "Core" 29 | #include 30 | 31 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 32 | 33 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 34 | 35 | #else 36 | 37 | #include "src/StlSupport/StdList.h" 38 | 39 | #endif 40 | 41 | #endif // EIGEN_STDLIST_MODULE_H 42 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen 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 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDVECTOR_MODULE_H 27 | #define EIGEN_STDVECTOR_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdVector.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDVECTOR_MODULE_H 43 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen 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 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | 27 | /* All the parameters defined in this file can be specialized in the 28 | * architecture specific files, and/or by the user. 29 | * More to come... */ 30 | 31 | #ifndef EIGEN_DEFAULT_SETTINGS_H 32 | #define EIGEN_DEFAULT_SETTINGS_H 33 | 34 | /** Defines the maximal loop size to enable meta unrolling of loops. 35 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 36 | * it does not correspond to the number of iterations or the number of instructions 37 | */ 38 | #ifndef EIGEN_UNROLLING_LIMIT 39 | #define EIGEN_UNROLLING_LIMIT 100 40 | #endif 41 | 42 | /** Defines the threshold between a "small" and a "large" matrix. 43 | * This threshold is mainly used to select the proper product implementation. 44 | */ 45 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 46 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 47 | #endif 48 | 49 | /** Defines the maximal width of the blocks used in the triangular product and solver 50 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 51 | */ 52 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 53 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 54 | #endif 55 | 56 | 57 | /** Defines the default number of registers available for that architecture. 58 | * Currently it must be 8 or 16. Other values will fail. 59 | */ 60 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 61 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 62 | #endif 63 | 64 | #endif // EIGEN_DEFAULT_SETTINGS_H 65 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // 2536 - type qualifiers are meaningless here 25 | // ICC 12 generates this warning when a function return type is const qualified, even if that type is a template-parameter-dependent 26 | // typedef that may be a reference type. 27 | // 279 - controlling expression is constant 28 | // ICC 12 generates this warning on assert(constant_expression_depending_on_template_params) and frankly this is a legitimate use case. 29 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 30 | #pragma warning push 31 | #endif 32 | #pragma warning disable 2196 2536 279 33 | #elif defined __clang__ 34 | // -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant 35 | // this is really a stupid warning as it warns on compile-time expressions involving enums 36 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 37 | #pragma clang diagnostic push 38 | #endif 39 | #pragma clang diagnostic ignored "-Wconstant-logical-operand" 40 | #endif 41 | 42 | #endif // not EIGEN_WARNINGS_DISABLED 43 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | #endif 12 | #endif 13 | 14 | #endif // EIGEN_WARNINGS_DISABLED 15 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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) -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN2_MACROS_H 26 | #define EIGEN2_MACROS_H 27 | 28 | #define ei_assert eigen_assert 29 | #define ei_internal_assert eigen_internal_assert 30 | 31 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16 32 | 33 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY 34 | 35 | #endif // EIGEN2_MACROS_H 36 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN2_MEMORY_H 26 | #define EIGEN2_MEMORY_H 27 | 28 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); } 29 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); } 30 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); } 31 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); } 32 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); } 33 | 34 | template inline void* ei_conditional_aligned_malloc(size_t size) 35 | { 36 | return internal::conditional_aligned_malloc(size); 37 | } 38 | template inline void ei_conditional_aligned_free(void *ptr) 39 | { 40 | internal::conditional_aligned_free(ptr); 41 | } 42 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size) 43 | { 44 | return internal::conditional_aligned_realloc(ptr, new_size, old_size); 45 | } 46 | 47 | template inline T* ei_aligned_new(size_t size) 48 | { 49 | return internal::aligned_new(size); 50 | } 51 | template inline void ei_aligned_delete(T *ptr, size_t size) 52 | { 53 | return internal::aligned_delete(ptr, size); 54 | } 55 | 56 | 57 | 58 | #endif // EIGEN2_MACROS_H 59 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen 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 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN2_QR_H 27 | #define EIGEN2_QR_H 28 | 29 | template 30 | class QR : public HouseholderQR 31 | { 32 | public: 33 | 34 | typedef HouseholderQR Base; 35 | typedef Block MatrixRBlockType; 36 | 37 | QR() : Base() {} 38 | 39 | template 40 | explicit QR(const T& t) : Base(t) {} 41 | 42 | template 43 | bool solve(const MatrixBase& b, ResultType *result) const 44 | { 45 | *result = static_cast(this)->solve(b); 46 | return true; 47 | } 48 | 49 | MatrixType matrixQ(void) const { 50 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols()); 51 | ret = this->householderQ() * ret; 52 | return ret; 53 | } 54 | 55 | bool isFullRank() const { 56 | return true; 57 | } 58 | 59 | const TriangularView 60 | matrixR(void) const 61 | { 62 | int cols = this->cols(); 63 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView(); 64 | } 65 | }; 66 | 67 | /** \return the QR decomposition of \c *this. 68 | * 69 | * \sa class QR 70 | */ 71 | template 72 | const QR::PlainObject> 73 | MatrixBase::qr() const 74 | { 75 | return QR(eval()); 76 | } 77 | 78 | 79 | #endif // EIGEN2_QR_H 80 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 26 | #define EIGEN_TRIANGULAR_SOLVER2_H 27 | 28 | const unsigned int UnitDiagBit = UnitDiag; 29 | const unsigned int SelfAdjointBit = SelfAdjoint; 30 | const unsigned int UpperTriangularBit = Upper; 31 | const unsigned int LowerTriangularBit = Lower; 32 | 33 | const unsigned int UpperTriangular = Upper; 34 | const unsigned int LowerTriangular = Lower; 35 | const unsigned int UnitUpperTriangular = UnitUpper; 36 | const unsigned int UnitLowerTriangular = UnitLower; 37 | 38 | template 39 | template 40 | typename ExpressionType::PlainObject 41 | Flagged::solveTriangular(const MatrixBase& other) const 42 | { 43 | return m_matrix.template triangularView().solve(other.derived()); 44 | } 45 | 46 | template 47 | template 48 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 49 | { 50 | m_matrix.template triangularView().solveInPlace(other.derived()); 51 | } 52 | 53 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 54 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Eigenvalues/EigenvaluesCommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Jitse Niesen 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_EIGENVALUES_COMMON_H 26 | #define EIGEN_EIGENVALUES_COMMON_H 27 | 28 | 29 | 30 | #endif // EIGEN_EIGENVALUES_COMMON_H 31 | 32 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Sparse_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Sparse_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Sparse COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_COREITERATORS_H 26 | #define EIGEN_COREITERATORS_H 27 | 28 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 29 | */ 30 | 31 | /** \class InnerIterator 32 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 33 | * 34 | * todo 35 | */ 36 | 37 | // generic version for dense matrix and expressions 38 | template class DenseBase::InnerIterator 39 | { 40 | protected: 41 | typedef typename Derived::Scalar Scalar; 42 | typedef typename Derived::Index Index; 43 | 44 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 45 | public: 46 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 47 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 48 | {} 49 | 50 | EIGEN_STRONG_INLINE Scalar value() const 51 | { 52 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 53 | : m_expression.coeff(m_inner, m_outer); 54 | } 55 | 56 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 57 | 58 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 59 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 60 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 61 | 62 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 63 | 64 | protected: 65 | const Derived& m_expression; 66 | Index m_inner; 67 | const Index m_outer; 68 | const Index m_end; 69 | }; 70 | 71 | #endif // EIGEN_COREITERATORS_H 72 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/SparseAssign.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pengsida/configuration/e1a6fedc56b8f384d0daf62f866892953675d0d2/Obj2Point/eigenlib/Eigen/src/Sparse/SparseAssign.h -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSE_FUZZY_H 26 | #define EIGEN_SPARSE_FUZZY_H 27 | 28 | // template 29 | // template 30 | // bool SparseMatrixBase::isApprox( 31 | // const OtherDerived& other, 32 | // typename NumTraits::Real prec 33 | // ) const 34 | // { 35 | // const typename internal::nested::type nested(derived()); 36 | // const typename internal::nested::type otherNested(other.derived()); 37 | // return (nested - otherNested).cwise().abs2().sum() 38 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 39 | // } 40 | 41 | #endif // EIGEN_SPARSE_FUZZY_H 42 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSEREDUX_H 26 | #define EIGEN_SPARSEREDUX_H 27 | 28 | template 29 | typename internal::traits::Scalar 30 | SparseMatrixBase::sum() const 31 | { 32 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 33 | Scalar res = 0; 34 | for (Index j=0; j 41 | typename internal::traits >::Scalar 42 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 43 | { 44 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 45 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 46 | } 47 | 48 | template 49 | typename internal::traits >::Scalar 50 | SparseVector<_Scalar,_Options,_Index>::sum() const 51 | { 52 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 53 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 54 | } 55 | 56 | #endif // EIGEN_SPARSEREDUX_H 57 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/Eigen/src/Sparse/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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSETRANSPOSE_H 26 | #define EIGEN_SPARSETRANSPOSE_H 27 | 28 | template class TransposeImpl 29 | : public SparseMatrixBase > 30 | { 31 | typedef typename internal::remove_all::type _MatrixTypeNested; 32 | public: 33 | 34 | EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose) 35 | 36 | class InnerIterator; 37 | class ReverseInnerIterator; 38 | 39 | inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); } 40 | }; 41 | 42 | template class TransposeImpl::InnerIterator 43 | : public _MatrixTypeNested::InnerIterator 44 | { 45 | typedef typename _MatrixTypeNested::InnerIterator Base; 46 | public: 47 | 48 | EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, Index outer) 49 | : Base(trans.derived().nestedExpression(), outer) 50 | {} 51 | inline Index row() const { return Base::col(); } 52 | inline Index col() const { return Base::row(); } 53 | }; 54 | 55 | template class TransposeImpl::ReverseInnerIterator 56 | : public _MatrixTypeNested::ReverseInnerIterator 57 | { 58 | typedef typename _MatrixTypeNested::ReverseInnerIterator Base; 59 | public: 60 | 61 | EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, Index outer) 62 | : Base(xpr.derived().nestedExpression(), outer) 63 | {} 64 | inline Index row() const { return Base::col(); } 65 | inline Index col() const { return Base::row(); } 66 | }; 67 | 68 | #endif // EIGEN_SPARSETRANSPOSE_H 69 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/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 | // Eigen 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 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | // This file is a base class plugin containing common coefficient wise functions. 27 | 28 | /** \returns an expression of the difference of \c *this and \a other 29 | * 30 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 31 | * 32 | * \sa class CwiseBinaryOp, operator-=() 33 | */ 34 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,internal::scalar_difference_op) 35 | 36 | /** \returns an expression of the sum of \c *this and \a other 37 | * 38 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 39 | * 40 | * \sa class CwiseBinaryOp, operator+=() 41 | */ 42 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op) 43 | 44 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 45 | * 46 | * The template parameter \a CustomBinaryOp is the type of the functor 47 | * of the custom operator (see class CwiseBinaryOp for an example) 48 | * 49 | * Here is an example illustrating the use of custom functors: 50 | * \include class_CwiseBinaryOp.cpp 51 | * Output: \verbinclude class_CwiseBinaryOp.out 52 | * 53 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 54 | */ 55 | template 56 | EIGEN_STRONG_INLINE const CwiseBinaryOp 57 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 58 | { 59 | return CwiseBinaryOp(derived(), other.derived(), func); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Eigen) 2 | add_subdirectory(doc EXCLUDE_FROM_ALL) 3 | if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) 4 | add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest 5 | else() 6 | add_subdirectory(test EXCLUDE_FROM_ALL) 7 | endif() 8 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/AutoDiff: -------------------------------------------------------------------------------- 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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_AUTODIFF_MODULE 26 | #define EIGEN_AUTODIFF_MODULE 27 | 28 | namespace Eigen { 29 | 30 | /** \ingroup Unsupported_modules 31 | * \defgroup AutoDiff_Module Auto Diff module 32 | * 33 | * This module features forward automatic differentation via a simple 34 | * templated scalar type wrapper AutoDiffScalar. 35 | * 36 | * Warning : this should NOT be confused with numerical differentiation, which 37 | * is a different method and has its own module in Eigen : \ref NumericalDiff_Module. 38 | * 39 | * \code 40 | * #include 41 | * \endcode 42 | */ 43 | //@{ 44 | 45 | } 46 | 47 | #include "src/AutoDiff/AutoDiffScalar.h" 48 | // #include "src/AutoDiff/AutoDiffVector.h" 49 | #include "src/AutoDiff/AutoDiffJacobian.h" 50 | 51 | namespace Eigen { 52 | //@} 53 | } 54 | 55 | #endif // EIGEN_AUTODIFF_MODULE 56 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(Eigen_HEADERS AdolcForward BVH IterativeSolvers MatrixFunctions MoreVectorization AutoDiff AlignedVector3 Polynomials 2 | CholmodSupport FFT NonLinearOptimization SparseExtra SuperLUSupport UmfPackSupport IterativeSolvers 3 | NumericalDiff Skyline MPRealSupport OpenGLSupport 4 | ) 5 | 6 | install(FILES 7 | ${Eigen_HEADERS} 8 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen COMPONENT Devel 9 | ) 10 | 11 | add_subdirectory(src) 12 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 3 | 4 | #include "SparseExtra" 5 | 6 | #include "../../Eigen/src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | namespace Eigen { 13 | 14 | /** \ingroup Unsupported_modules 15 | * \defgroup CholmodSupport_Module Cholmod Support module 16 | * 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | struct Cholmod {}; 24 | #include "src/SparseExtra/CholmodSupportLegacy.h" 25 | #include "src/SparseExtra/CholmodSupport.h" 26 | 27 | 28 | } // namespace Eigen 29 | 30 | #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" 31 | 32 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 33 | 34 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/IterativeSolvers: -------------------------------------------------------------------------------- 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 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_ITERATIVE_SOLVERS_MODULE_H 26 | #define EIGEN_ITERATIVE_SOLVERS_MODULE_H 27 | 28 | #include 29 | 30 | namespace Eigen { 31 | 32 | /** \ingroup Unsupported_modules 33 | * \defgroup IterativeSolvers_Module Iterative solvers module 34 | * This module aims to provide various iterative linear and non linear solver algorithms. 35 | * It currently provides: 36 | * - a constrained conjugate gradient 37 | * 38 | * \code 39 | * #include 40 | * \endcode 41 | */ 42 | //@{ 43 | 44 | #include "src/IterativeSolvers/IterationController.h" 45 | #include "src/IterativeSolvers/ConstrainedConjGrad.h" 46 | 47 | //@} 48 | 49 | } 50 | 51 | #endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H 52 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/MoreVectorization: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_MOREVECTORIZATION_MODULE_H 2 | #define EIGEN_MOREVECTORIZATION_MODULE_H 3 | 4 | #include 5 | 6 | namespace Eigen { 7 | 8 | /** \ingroup Unsupported_modules 9 | * \defgroup MoreVectorization More vectorization module 10 | */ 11 | 12 | #include "src/MoreVectorization/MathFunctions.h" 13 | 14 | } 15 | 16 | #endif // EIGEN_MOREVECTORIZATION_MODULE_H 17 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/NumericalDiff: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Thomas Capricelli 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_NUMERICALDIFF_MODULE 26 | #define EIGEN_NUMERICALDIFF_MODULE 27 | 28 | #include 29 | 30 | namespace Eigen { 31 | 32 | /** \ingroup Unsupported_modules 33 | * \defgroup NumericalDiff_Module Numerical differentiation module 34 | * 35 | * \code 36 | * #include 37 | * \endcode 38 | * 39 | * See http://en.wikipedia.org/wiki/Numerical_differentiation 40 | * 41 | * Warning : this should NOT be confused with automatic differentiation, which 42 | * is a different method and has its own module in Eigen : \ref 43 | * AutoDiff_Module. 44 | * 45 | * Currently only "Forward" and "Central" schemes are implemented. Those 46 | * are basic methods, and there exist some more elaborated way of 47 | * computing such approximates. They are implemented using both 48 | * proprietary and free software, and usually requires linking to an 49 | * external library. It is very easy for you to write a functor 50 | * using such software, and the purpose is quite orthogonal to what we 51 | * want to achieve with Eigen. 52 | * 53 | * This is why we will not provide wrappers for every great numerical 54 | * differentiation software that exist, but should rather stick with those 55 | * basic ones, that still are useful for testing. 56 | * 57 | * Also, the \ref NonLinearOptimization_Module needs this in order to 58 | * provide full features compatibility with the original (c)minpack 59 | * package. 60 | * 61 | */ 62 | //@{ 63 | 64 | #include "src/NumericalDiff/NumericalDiff.h" 65 | 66 | //@} 67 | } 68 | 69 | 70 | #endif // EIGEN_NUMERICALDIFF_MODULE 71 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/Skyline: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SKYLINE_MODULE_H 2 | #define EIGEN_SKYLINE_MODULE_H 3 | 4 | 5 | #include "Eigen/Core" 6 | 7 | #include "Eigen/src/Core/util/DisableStupidWarnings.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace Eigen { 15 | 16 | /** \ingroup Unsupported_modules 17 | * \defgroup Skyline_Module Skyline module 18 | * 19 | * 20 | * 21 | * 22 | */ 23 | 24 | #include "src/Skyline/SkylineUtil.h" 25 | #include "src/Skyline/SkylineMatrixBase.h" 26 | #include "src/Skyline/SkylineStorage.h" 27 | #include "src/Skyline/SkylineMatrix.h" 28 | #include "src/Skyline/SkylineInplaceLU.h" 29 | #include "src/Skyline/SkylineProduct.h" 30 | 31 | } // namespace Eigen 32 | 33 | #include "Eigen/src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_SKYLINE_MODULE_H 36 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/SparseExtra: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_EXTRA_MODULE_H 2 | #define EIGEN_SPARSE_EXTRA_MODULE_H 3 | 4 | #include "../../Eigen/Sparse" 5 | 6 | #include "../../Eigen/src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef EIGEN_GOOGLEHASH_SUPPORT 15 | #include 16 | #endif 17 | 18 | namespace Eigen { 19 | 20 | /** \ingroup Unsupported_modules 21 | * \defgroup SparseExtra_Module SparseExtra module 22 | * 23 | * This module contains some experimental features extending the sparse module. 24 | * 25 | * \code 26 | * #include 27 | * \endcode 28 | */ 29 | 30 | struct DefaultBackend {}; 31 | 32 | 33 | // solver flags 34 | enum { 35 | CompleteFactorization = 0x0000, // the default 36 | IncompleteFactorization = 0x0001, 37 | MemoryEfficient = 0x0002, 38 | 39 | // For LLT Cholesky: 40 | SupernodalMultifrontal = 0x0010, 41 | SupernodalLeftLooking = 0x0020, 42 | 43 | // Ordering methods: 44 | NaturalOrdering = 0x0100, // the default 45 | MinimumDegree_AT_PLUS_A = 0x0200, 46 | MinimumDegree_ATA = 0x0300, 47 | ColApproxMinimumDegree = 0x0400, 48 | Metis = 0x0500, 49 | Scotch = 0x0600, 50 | Chaco = 0x0700, 51 | OrderingMask = 0x0f00 52 | }; 53 | 54 | #include "../../Eigen/src/misc/Solve.h" 55 | 56 | #include "src/SparseExtra/RandomSetter.h" 57 | #include "src/SparseExtra/Solve.h" 58 | #include "src/SparseExtra/Amd.h" 59 | #include "src/SparseExtra/SimplicialCholesky.h" 60 | 61 | #include "src/SparseExtra/SparseLLT.h" 62 | #include "src/SparseExtra/SparseLDLTLegacy.h" 63 | #include "src/SparseExtra/SparseLU.h" 64 | 65 | } // namespace Eigen 66 | 67 | #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" 68 | 69 | #endif // EIGEN_SPARSE_EXTRA_MODULE_H 70 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 2 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 3 | 4 | #include "SparseExtra" 5 | 6 | #include "../../Eigen/src/Core/util/DisableStupidWarnings.h" 7 | 8 | typedef int int_t; 9 | #include 10 | #include 11 | #include 12 | 13 | namespace Eigen { struct SluMatrix; } 14 | 15 | namespace Eigen { 16 | 17 | /** \ingroup Unsupported_modules 18 | * \defgroup SuperLUSupport_Module Super LU support 19 | * 20 | * 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | struct SuperLU {}; 28 | 29 | #include "src/SparseExtra/SuperLUSupport.h" 30 | 31 | } // namespace Eigen 32 | 33 | #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 3 | 4 | #include "SparseExtra" 5 | 6 | #include "../../Eigen/src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | namespace Eigen { 13 | 14 | /** \ingroup Unsupported_modules 15 | * \defgroup UmfPackSupport_Module UmfPack support module 16 | * 17 | * 18 | * 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | struct UmfPack {}; 26 | 27 | #include "src/SparseExtra/UmfPackSupport.h" 28 | 29 | } // namespace Eigen 30 | 31 | #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" 32 | 33 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 34 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/AutoDiff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_AutoDiff_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_AutoDiff_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/AutoDiff COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/BVH/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_BVH_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_BVH_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/BVH COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(AutoDiff) 2 | ADD_SUBDIRECTORY(BVH) 3 | ADD_SUBDIRECTORY(FFT) 4 | ADD_SUBDIRECTORY(IterativeSolvers) 5 | ADD_SUBDIRECTORY(MatrixFunctions) 6 | ADD_SUBDIRECTORY(MoreVectorization) 7 | ADD_SUBDIRECTORY(NonLinearOptimization) 8 | ADD_SUBDIRECTORY(NumericalDiff) 9 | ADD_SUBDIRECTORY(Polynomials) 10 | ADD_SUBDIRECTORY(Skyline) 11 | ADD_SUBDIRECTORY(SparseExtra) 12 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/FFT/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_FFT_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_FFT_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/FFT COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/IterativeSolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_IterativeSolvers_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_IterativeSolvers_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/IterativeSolvers COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/MatrixFunctions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MatrixFunctions_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MatrixFunctions_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/MatrixFunctions COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/MoreVectorization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MoreVectorization_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MoreVectorization_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/MoreVectorization COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NonLinearOptimization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_NonLinearOptimization_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_NonLinearOptimization_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/NonLinearOptimization COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NonLinearOptimization/chkder.h: -------------------------------------------------------------------------------- 1 | 2 | #define chkder_log10e 0.43429448190325182765 3 | #define chkder_factor 100. 4 | 5 | namespace internal { 6 | 7 | template 8 | void chkder( 9 | const Matrix< Scalar, Dynamic, 1 > &x, 10 | const Matrix< Scalar, Dynamic, 1 > &fvec, 11 | const Matrix< Scalar, Dynamic, Dynamic > &fjac, 12 | Matrix< Scalar, Dynamic, 1 > &xp, 13 | const Matrix< Scalar, Dynamic, 1 > &fvecp, 14 | int mode, 15 | Matrix< Scalar, Dynamic, 1 > &err 16 | ) 17 | { 18 | typedef DenseIndex Index; 19 | 20 | const Scalar eps = sqrt(NumTraits::epsilon()); 21 | const Scalar epsf = chkder_factor * NumTraits::epsilon(); 22 | const Scalar epslog = chkder_log10e * log(eps); 23 | Scalar temp; 24 | 25 | const Index m = fvec.size(), n = x.size(); 26 | 27 | if (mode != 2) { 28 | /* mode = 1. */ 29 | xp.resize(n); 30 | for (Index j = 0; j < n; ++j) { 31 | temp = eps * abs(x[j]); 32 | if (temp == 0.) 33 | temp = eps; 34 | xp[j] = x[j] + temp; 35 | } 36 | } 37 | else { 38 | /* mode = 2. */ 39 | err.setZero(m); 40 | for (Index j = 0; j < n; ++j) { 41 | temp = abs(x[j]); 42 | if (temp == 0.) 43 | temp = 1.; 44 | err += temp * fjac.col(j); 45 | } 46 | for (Index i = 0; i < m; ++i) { 47 | temp = 1.; 48 | if (fvec[i] != 0. && fvecp[i] != 0. && abs(fvecp[i] - fvec[i]) >= epsf * abs(fvec[i])) 49 | temp = eps * abs((fvecp[i] - fvec[i]) / eps - err[i]) / (abs(fvec[i]) + abs(fvecp[i])); 50 | err[i] = 1.; 51 | if (temp > NumTraits::epsilon() && temp < eps) 52 | err[i] = (chkder_log10e * log(temp) - epslog) / epslog; 53 | if (temp >= eps) 54 | err[i] = 0.; 55 | } 56 | } 57 | } 58 | 59 | } // end namespace internal 60 | 61 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NonLinearOptimization/covar.h: -------------------------------------------------------------------------------- 1 | namespace internal { 2 | 3 | template 4 | void covar( 5 | Matrix< Scalar, Dynamic, Dynamic > &r, 6 | const VectorXi &ipvt, 7 | Scalar tol = sqrt(NumTraits::epsilon()) ) 8 | { 9 | typedef DenseIndex Index; 10 | 11 | /* Local variables */ 12 | Index i, j, k, l, ii, jj; 13 | bool sing; 14 | Scalar temp; 15 | 16 | /* Function Body */ 17 | const Index n = r.cols(); 18 | const Scalar tolr = tol * abs(r(0,0)); 19 | Matrix< Scalar, Dynamic, 1 > wa(n); 20 | assert(ipvt.size()==n); 21 | 22 | /* form the inverse of r in the full upper triangle of r. */ 23 | l = -1; 24 | for (k = 0; k < n; ++k) 25 | if (abs(r(k,k)) > tolr) { 26 | r(k,k) = 1. / r(k,k); 27 | for (j = 0; j <= k-1; ++j) { 28 | temp = r(k,k) * r(j,k); 29 | r(j,k) = 0.; 30 | r.col(k).head(j+1) -= r.col(j).head(j+1) * temp; 31 | } 32 | l = k; 33 | } 34 | 35 | /* form the full upper triangle of the inverse of (r transpose)*r */ 36 | /* in the full upper triangle of r. */ 37 | for (k = 0; k <= l; ++k) { 38 | for (j = 0; j <= k-1; ++j) 39 | r.col(j).head(j+1) += r.col(k).head(j+1) * r(j,k); 40 | r.col(k).head(k+1) *= r(k,k); 41 | } 42 | 43 | /* form the full lower triangle of the covariance matrix */ 44 | /* in the strict lower triangle of r and in wa. */ 45 | for (j = 0; j < n; ++j) { 46 | jj = ipvt[j]; 47 | sing = j > l; 48 | for (i = 0; i <= j; ++i) { 49 | if (sing) 50 | r(i,j) = 0.; 51 | ii = ipvt[i]; 52 | if (ii > jj) 53 | r(ii,jj) = r(i,j); 54 | if (ii < jj) 55 | r(jj,ii) = r(i,j); 56 | } 57 | wa[jj] = r(j,j); 58 | } 59 | 60 | /* symmetrize the covariance matrix in r. */ 61 | r.topLeftCorner(n,n).template triangularView() = r.topLeftCorner(n,n).transpose(); 62 | r.diagonal() = wa; 63 | } 64 | 65 | } // end namespace internal 66 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NonLinearOptimization/fdjac1.h: -------------------------------------------------------------------------------- 1 | namespace internal { 2 | 3 | template 4 | DenseIndex fdjac1( 5 | const FunctorType &Functor, 6 | Matrix< Scalar, Dynamic, 1 > &x, 7 | Matrix< Scalar, Dynamic, 1 > &fvec, 8 | Matrix< Scalar, Dynamic, Dynamic > &fjac, 9 | DenseIndex ml, DenseIndex mu, 10 | Scalar epsfcn) 11 | { 12 | typedef DenseIndex Index; 13 | 14 | /* Local variables */ 15 | Scalar h; 16 | Index j, k; 17 | Scalar eps, temp; 18 | Index msum; 19 | int iflag; 20 | Index start, length; 21 | 22 | /* Function Body */ 23 | const Scalar epsmch = NumTraits::epsilon(); 24 | const Index n = x.size(); 25 | assert(fvec.size()==n); 26 | Matrix< Scalar, Dynamic, 1 > wa1(n); 27 | Matrix< Scalar, Dynamic, 1 > wa2(n); 28 | 29 | eps = sqrt((std::max)(epsfcn,epsmch)); 30 | msum = ml + mu + 1; 31 | if (msum >= n) { 32 | /* computation of dense approximate jacobian. */ 33 | for (j = 0; j < n; ++j) { 34 | temp = x[j]; 35 | h = eps * abs(temp); 36 | if (h == 0.) 37 | h = eps; 38 | x[j] = temp + h; 39 | iflag = Functor(x, wa1); 40 | if (iflag < 0) 41 | return iflag; 42 | x[j] = temp; 43 | fjac.col(j) = (wa1-fvec)/h; 44 | } 45 | 46 | }else { 47 | /* computation of banded approximate jacobian. */ 48 | for (k = 0; k < msum; ++k) { 49 | for (j = k; (msum<0) ? (j>n): (jn): (j(0,j-mu); 64 | length = (std::min)(n-1, j+ml) - start + 1; 65 | fjac.col(j).segment(start, length) = ( wa1.segment(start, length)-fvec.segment(start, length))/h; 66 | } 67 | } 68 | } 69 | return 0; 70 | } 71 | 72 | } // end namespace internal 73 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NonLinearOptimization/r1mpyq.h: -------------------------------------------------------------------------------- 1 | namespace internal { 2 | 3 | // TODO : move this to GivensQR once there's such a thing in Eigen 4 | 5 | template 6 | void r1mpyq(DenseIndex m, DenseIndex n, Scalar *a, const std::vector > &v_givens, const std::vector > &w_givens) 7 | { 8 | typedef DenseIndex Index; 9 | 10 | /* apply the first set of givens rotations to a. */ 11 | for (Index j = n-2; j>=0; --j) 12 | for (Index i = 0; i 4 | void rwupdt( 5 | Matrix< Scalar, Dynamic, Dynamic > &r, 6 | const Matrix< Scalar, Dynamic, 1> &w, 7 | Matrix< Scalar, Dynamic, 1> &b, 8 | Scalar alpha) 9 | { 10 | typedef DenseIndex Index; 11 | 12 | const Index n = r.cols(); 13 | assert(r.rows()>=n); 14 | std::vector > givens(n); 15 | 16 | /* Local variables */ 17 | Scalar temp, rowj; 18 | 19 | /* Function Body */ 20 | for (Index j = 0; j < n; ++j) { 21 | rowj = w[j]; 22 | 23 | /* apply the previous transformations to */ 24 | /* r(i,j), i=0,1,...,j-1, and to w(j). */ 25 | for (Index i = 0; i < j; ++i) { 26 | temp = givens[i].c() * r(i,j) + givens[i].s() * rowj; 27 | rowj = -givens[i].s() * r(i,j) + givens[i].c() * rowj; 28 | r(i,j) = temp; 29 | } 30 | 31 | /* determine a givens rotation which eliminates w(j). */ 32 | givens[j].makeGivens(-r(j,j), rowj); 33 | 34 | if (rowj == 0.) 35 | continue; // givens[j] is identity 36 | 37 | /* apply the current transformation to r(j,j), b(j), and alpha. */ 38 | r(j,j) = givens[j].c() * r(j,j) + givens[j].s() * rowj; 39 | temp = givens[j].c() * b[j] + givens[j].s() * alpha; 40 | alpha = -givens[j].s() * b[j] + givens[j].c() * alpha; 41 | b[j] = temp; 42 | } 43 | } 44 | 45 | } // end namespace internal 46 | 47 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/NumericalDiff/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_NumericalDiff_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_NumericalDiff_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/NumericalDiff COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/Polynomials/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Polynomials_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Polynomials_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/Polynomials COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/Skyline/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Skyline_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Skyline_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/Skyline COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/Eigen/src/SparseExtra/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseExtra_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseExtra_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/SparseExtra COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains contributions from various users. 2 | They are provided "as is", without any support. Nevertheless, 3 | most of them are subject to be included in Eigen in the future. 4 | 5 | In order to use an unsupported module you have to do either: 6 | 7 | - add the path_to_eigen/unsupported directory to your include path and do: 8 | #include 9 | 10 | - or directly do: 11 | #include 12 | 13 | 14 | If you are interested in contributing to one of them, or have other stuff 15 | you would like to share, feel free to contact us: 16 | http://eigen.tuxfamily.org/index.php?title=Main_Page#Mailing_list 17 | 18 | Any kind of contributions are much appreciated, even very preliminary ones. 19 | However, it: 20 | - must rely on Eigen, 21 | - must be highly related to math, 22 | - should have some general purpose in the sense that it could 23 | potentially become an offical Eigen module (or be merged into another one). 24 | 25 | In doubt feel free to contact us. For instance, if your addons is very too specific 26 | but it shows an interesting way of using Eigen, then it could be a nice demo. 27 | 28 | 29 | This directory is organized as follow: 30 | 31 | unsupported/Eigen/ModuleHeader1 32 | unsupported/Eigen/ModuleHeader2 33 | unsupported/Eigen/... 34 | unsupported/Eigen/src/Module1/SourceFile1.h 35 | unsupported/Eigen/src/Module1/SourceFile2.h 36 | unsupported/Eigen/src/Module1/... 37 | unsupported/Eigen/src/Module2/SourceFile1.h 38 | unsupported/Eigen/src/Module2/SourceFile2.h 39 | unsupported/Eigen/src/Module2/... 40 | unsupported/Eigen/src/... 41 | unsupported/doc/snippets/.cpp <- code snippets for the doc 42 | unsupported/doc/examples/.cpp <- examples for the doc 43 | unsupported/doc/TutorialModule1.dox 44 | unsupported/doc/TutorialModule2.dox 45 | unsupported/doc/... 46 | unsupported/test/.cpp <- unit test files 47 | 48 | The documentation is generated at the same time than the main Eigen documentation. 49 | The .html files are generated in: build_dir/doc/html/unsupported/ 50 | 51 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE) 2 | 3 | add_subdirectory(examples) 4 | add_subdirectory(snippets) 5 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/Overview.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | o /** \mainpage Eigen's unsupported modules 4 | 5 | This is the API documentation for Eigen's unsupported modules. 6 | 7 | These modules are contributions from various users. They are provided "as is", without any support. 8 | 9 | Don't miss the official Eigen documentation. 10 | 11 | */ 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/BVH_Example.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace Eigen; 6 | typedef AlignedBox Box2d; 7 | 8 | namespace Eigen { 9 | namespace internal { 10 | Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point 11 | } 12 | } 13 | 14 | struct PointPointMinimizer //how to compute squared distances between points and rectangles 15 | { 16 | PointPointMinimizer() : calls(0) {} 17 | typedef double Scalar; 18 | 19 | double minimumOnVolumeVolume(const Box2d &r1, const Box2d &r2) { ++calls; return r1.squaredExteriorDistance(r2); } 20 | double minimumOnVolumeObject(const Box2d &r, const Vector2d &v) { ++calls; return r.squaredExteriorDistance(v); } 21 | double minimumOnObjectVolume(const Vector2d &v, const Box2d &r) { ++calls; return r.squaredExteriorDistance(v); } 22 | double minimumOnObjectObject(const Vector2d &v1, const Vector2d &v2) { ++calls; return (v1 - v2).squaredNorm(); } 23 | 24 | int calls; 25 | }; 26 | 27 | int main() 28 | { 29 | typedef std::vector > StdVectorOfVector2d; 30 | StdVectorOfVector2d redPoints, bluePoints; 31 | for(int i = 0; i < 100; ++i) { //initialize random set of red points and blue points 32 | redPoints.push_back(Vector2d::Random()); 33 | bluePoints.push_back(Vector2d::Random()); 34 | } 35 | 36 | PointPointMinimizer minimizer; 37 | double minDistSq = std::numeric_limits::max(); 38 | 39 | //brute force to find closest red-blue pair 40 | for(int i = 0; i < (int)redPoints.size(); ++i) 41 | for(int j = 0; j < (int)bluePoints.size(); ++j) 42 | minDistSq = std::min(minDistSq, minimizer.minimumOnObjectObject(redPoints[i], bluePoints[j])); 43 | std::cout << "Brute force distance = " << sqrt(minDistSq) << ", calls = " << minimizer.calls << std::endl; 44 | 45 | //using BVH to find closest red-blue pair 46 | minimizer.calls = 0; 47 | KdBVH redTree(redPoints.begin(), redPoints.end()), blueTree(bluePoints.begin(), bluePoints.end()); //construct the trees 48 | minDistSq = BVMinimize(redTree, blueTree, minimizer); //actual BVH minimization call 49 | std::cout << "BVH distance = " << sqrt(minDistSq) << ", calls = " << minimizer.calls << std::endl; 50 | 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB examples_SRCS "*.cpp") 2 | 3 | ADD_CUSTOM_TARGET(unsupported_examples) 4 | 5 | INCLUDE_DIRECTORIES(../../../unsupported ../../../unsupported/test) 6 | 7 | FOREACH(example_src ${examples_SRCS}) 8 | GET_FILENAME_COMPONENT(example ${example_src} NAME_WE) 9 | ADD_EXECUTABLE(example_${example} ${example_src}) 10 | if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO) 11 | target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}) 12 | endif() 13 | GET_TARGET_PROPERTY(example_executable 14 | example_${example} LOCATION) 15 | ADD_CUSTOM_COMMAND( 16 | TARGET example_${example} 17 | POST_BUILD 18 | COMMAND ${example_executable} 19 | ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out 20 | ) 21 | ADD_DEPENDENCIES(unsupported_examples example_${example}) 22 | ENDFOREACH(example_src) 23 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/FFT.cpp: -------------------------------------------------------------------------------- 1 | // To use the simple FFT implementation 2 | // g++ -o demofft -I.. -Wall -O3 FFT.cpp 3 | 4 | // To use the FFTW implementation 5 | // g++ -o demofft -I.. -DUSE_FFTW -Wall -O3 FFT.cpp -lfftw3 -lfftw3f -lfftw3l 6 | 7 | #ifdef USE_FFTW 8 | #include 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | using namespace std; 20 | using namespace Eigen; 21 | 22 | template 23 | T mag2(T a) 24 | { 25 | return a*a; 26 | } 27 | template 28 | T mag2(std::complex a) 29 | { 30 | return norm(a); 31 | } 32 | 33 | template 34 | T mag2(const std::vector & vec) 35 | { 36 | T out=0; 37 | for (size_t k=0;k 43 | T mag2(const std::vector > & vec) 44 | { 45 | T out=0; 46 | for (size_t k=0;k 52 | vector operator-(const vector & a,const vector & b ) 53 | { 54 | vector c(a); 55 | for (size_t k=0;k 61 | void RandomFill(std::vector & vec) 62 | { 63 | for (size_t k=0;k 68 | void RandomFill(std::vector > & vec) 69 | { 70 | for (size_t k=0;k ( T( rand() )/T(RAND_MAX) - .5, T( rand() )/T(RAND_MAX) - .5); 72 | } 73 | 74 | template 75 | void fwd_inv(size_t nfft) 76 | { 77 | typedef typename NumTraits::Real Scalar; 78 | vector timebuf(nfft); 79 | RandomFill(timebuf); 80 | 81 | vector freqbuf; 82 | static FFT fft; 83 | fft.fwd(freqbuf,timebuf); 84 | 85 | vector timebuf2; 86 | fft.inv(timebuf2,freqbuf); 87 | 88 | long double rmse = mag2(timebuf - timebuf2) / mag2(timebuf); 89 | cout << "roundtrip rmse: " << rmse << endl; 90 | } 91 | 92 | template 93 | void two_demos(int nfft) 94 | { 95 | cout << " scalar "; 96 | fwd_inv >(nfft); 97 | cout << " complex "; 98 | fwd_inv,std::complex >(nfft); 99 | } 100 | 101 | void demo_all_types(int nfft) 102 | { 103 | cout << "nfft=" << nfft << endl; 104 | cout << " float" << endl; 105 | two_demos(nfft); 106 | cout << " double" << endl; 107 | two_demos(nfft); 108 | cout << " long double" << endl; 109 | two_demos(nfft); 110 | } 111 | 112 | int main() 113 | { 114 | demo_all_types( 2*3*4*5*7 ); 115 | demo_all_types( 2*9*16*25 ); 116 | demo_all_types( 1024 ); 117 | return 0; 118 | } 119 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/MatrixExponential.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | const double pi = std::acos(-1.0); 9 | 10 | MatrixXd A(3,3); 11 | A << 0, -pi/4, 0, 12 | pi/4, 0, 0, 13 | 0, 0, 0; 14 | std::cout << "The matrix A is:\n" << A << "\n\n"; 15 | std::cout << "The matrix exponential of A is:\n" << A.exp() << "\n\n"; 16 | } 17 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/MatrixFunction.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | std::complex expfn(std::complex x, int) 7 | { 8 | return std::exp(x); 9 | } 10 | 11 | int main() 12 | { 13 | const double pi = std::acos(-1.0); 14 | 15 | MatrixXd A(3,3); 16 | A << 0, -pi/4, 0, 17 | pi/4, 0, 0, 18 | 0, 0, 0; 19 | 20 | std::cout << "The matrix A is:\n" << A << "\n\n"; 21 | std::cout << "The matrix exponential of A is:\n" 22 | << A.matrixFunction(expfn) << "\n\n"; 23 | } 24 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/MatrixSine.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | MatrixXd A = MatrixXd::Random(3,3); 9 | std::cout << "A = \n" << A << "\n\n"; 10 | 11 | MatrixXd sinA = A.sin(); 12 | std::cout << "sin(A) = \n" << sinA << "\n\n"; 13 | 14 | MatrixXd cosA = A.cos(); 15 | std::cout << "cos(A) = \n" << cosA << "\n\n"; 16 | 17 | // The matrix functions satisfy sin^2(A) + cos^2(A) = I, 18 | // like the scalar functions. 19 | std::cout << "sin^2(A) + cos^2(A) = \n" << sinA*sinA + cosA*cosA << "\n\n"; 20 | } 21 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/MatrixSinh.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | MatrixXf A = MatrixXf::Random(3,3); 9 | std::cout << "A = \n" << A << "\n\n"; 10 | 11 | MatrixXf sinhA = A.sinh(); 12 | std::cout << "sinh(A) = \n" << sinhA << "\n\n"; 13 | 14 | MatrixXf coshA = A.cosh(); 15 | std::cout << "cosh(A) = \n" << coshA << "\n\n"; 16 | 17 | // The matrix functions satisfy cosh^2(A) - sinh^2(A) = I, 18 | // like the scalar functions. 19 | std::cout << "cosh^2(A) - sinh^2(A) = \n" << coshA*coshA - sinhA*sinhA << "\n\n"; 20 | } 21 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/PolynomialSolver1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace Eigen; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | typedef Matrix Vector5d; 11 | 12 | Vector5d roots = Vector5d::Random(); 13 | cout << "Roots: " << roots.transpose() << endl; 14 | Eigen::Matrix polynomial; 15 | roots_to_monicPolynomial( roots, polynomial ); 16 | 17 | PolynomialSolver psolve( polynomial ); 18 | cout << "Complex roots: " << psolve.roots().transpose() << endl; 19 | 20 | std::vector realRoots; 21 | psolve.realRoots( realRoots ); 22 | Map mapRR( &realRoots[0] ); 23 | cout << "Real roots: " << mapRR.transpose() << endl; 24 | 25 | cout << endl; 26 | cout << "Illustration of the convergence problem with the QR algorithm: " << endl; 27 | cout << "---------------------------------------------------------------" << endl; 28 | Eigen::Matrix hardCase_polynomial; 29 | hardCase_polynomial << 30 | -0.957, 0.9219, 0.3516, 0.9453, -0.4023, -0.5508, -0.03125; 31 | cout << "Hard case polynomial defined by floats: " << hardCase_polynomial.transpose() << endl; 32 | PolynomialSolver psolvef( hardCase_polynomial ); 33 | cout << "Complex roots: " << psolvef.roots().transpose() << endl; 34 | Eigen::Matrix evals; 35 | for( int i=0; i<6; ++i ){ evals[i] = std::abs( poly_eval( hardCase_polynomial, psolvef.roots()[i] ) ); } 36 | cout << "Norms of the evaluations of the polynomial at the roots: " << evals.transpose() << endl << endl; 37 | 38 | cout << "Using double's almost always solves the problem for small degrees: " << endl; 39 | cout << "-------------------------------------------------------------------" << endl; 40 | PolynomialSolver psolve6d( hardCase_polynomial.cast() ); 41 | cout << "Complex roots: " << psolve6d.roots().transpose() << endl; 42 | for( int i=0; i<6; ++i ) 43 | { 44 | std::complex castedRoot( psolve6d.roots()[i].real(), psolve6d.roots()[i].imag() ); 45 | evals[i] = std::abs( poly_eval( hardCase_polynomial, castedRoot ) ); 46 | } 47 | cout << "Norms of the evaluations of the polynomial at the roots: " << evals.transpose() << endl << endl; 48 | 49 | cout.precision(10); 50 | cout << "The last root in float then in double: " << psolvef.roots()[5] << "\t" << psolve6d.roots()[5] << endl; 51 | std::complex castedRoot( psolve6d.roots()[5].real(), psolve6d.roots()[5].imag() ); 52 | cout << "Norm of the difference: " << internal::abs( psolvef.roots()[5] - castedRoot ) << endl; 53 | } 54 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/examples/PolynomialUtils1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | Vector4d roots = Vector4d::Random(); 10 | cout << "Roots: " << roots.transpose() << endl; 11 | Eigen::Matrix polynomial; 12 | roots_to_monicPolynomial( roots, polynomial ); 13 | cout << "Polynomial: "; 14 | for( int i=0; i<4; ++i ){ cout << polynomial[i] << ".x^" << i << "+ "; } 15 | cout << polynomial[4] << ".x^4" << endl; 16 | Vector4d evaluation; 17 | for( int i=0; i<4; ++i ){ 18 | evaluation[i] = poly_eval( polynomial, roots[i] ); } 19 | cout << "Evaluation of the polynomial at the roots: " << evaluation.transpose(); 20 | } 21 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/doc/snippets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB snippets_SRCS "*.cpp") 2 | 3 | ADD_CUSTOM_TARGET(unsupported_snippets) 4 | 5 | FOREACH(snippet_src ${snippets_SRCS}) 6 | GET_FILENAME_COMPONENT(snippet ${snippet_src} NAME_WE) 7 | SET(compile_snippet_target compile_${snippet}) 8 | SET(compile_snippet_src ${compile_snippet_target}.cpp) 9 | FILE(READ ${snippet_src} snippet_source_code) 10 | CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/snippets/compile_snippet.cpp.in 11 | ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}) 12 | ADD_EXECUTABLE(${compile_snippet_target} 13 | ${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}) 14 | if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO) 15 | target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}) 16 | endif() 17 | GET_TARGET_PROPERTY(compile_snippet_executable 18 | ${compile_snippet_target} LOCATION) 19 | ADD_CUSTOM_COMMAND( 20 | TARGET ${compile_snippet_target} 21 | POST_BUILD 22 | COMMAND ${compile_snippet_executable} 23 | ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out 24 | ) 25 | ADD_DEPENDENCIES(unsupported_snippets ${compile_snippet_target}) 26 | set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src} 27 | PROPERTIES OBJECT_DEPENDS ${snippet_src}) 28 | ENDFOREACH(snippet_src) 29 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/test/FFT.cpp: -------------------------------------------------------------------------------- 1 | #define test_FFTW test_FFT 2 | #include "FFTW.cpp" 3 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/test/alignedvector3.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #include "main.h" 26 | #include 27 | 28 | template 29 | void alignedvector3() 30 | { 31 | Scalar s1 = internal::random(); 32 | Scalar s2 = internal::random(); 33 | typedef Matrix RefType; 34 | typedef Matrix Mat33; 35 | typedef AlignedVector3 FastType; 36 | RefType r1(RefType::Random()), r2(RefType::Random()), r3(RefType::Random()), 37 | r4(RefType::Random()), r5(RefType::Random()), r6(RefType::Random()); 38 | FastType f1(r1), f2(r2), f3(r3), f4(r4), f5(r5), f6(r6); 39 | Mat33 m1(Mat33::Random()); 40 | 41 | VERIFY_IS_APPROX(f1,r1); 42 | VERIFY_IS_APPROX(f4,r4); 43 | 44 | VERIFY_IS_APPROX(f4+f1,r4+r1); 45 | VERIFY_IS_APPROX(f4-f1,r4-r1); 46 | VERIFY_IS_APPROX(f4+f1-f2,r4+r1-r2); 47 | VERIFY_IS_APPROX(f4+=f3,r4+=r3); 48 | VERIFY_IS_APPROX(f4-=f5,r4-=r5); 49 | VERIFY_IS_APPROX(f4-=f5+f1,r4-=r5+r1); 50 | VERIFY_IS_APPROX(f5+f1-s1*f2,r5+r1-s1*r2); 51 | VERIFY_IS_APPROX(f5+f1/s2-s1*f2,r5+r1/s2-s1*r2); 52 | 53 | VERIFY_IS_APPROX(m1*f4,m1*r4); 54 | VERIFY_IS_APPROX(f4.transpose()*m1,r4.transpose()*m1); 55 | 56 | VERIFY_IS_APPROX(f2.dot(f3),r2.dot(r3)); 57 | VERIFY_IS_APPROX(f2.cross(f3),r2.cross(r3)); 58 | VERIFY_IS_APPROX(f2.norm(),r2.norm()); 59 | 60 | VERIFY_IS_APPROX(f2.normalized(),r2.normalized()); 61 | 62 | VERIFY_IS_APPROX((f2+f1).normalized(),(r2+r1).normalized()); 63 | 64 | f2.normalize(); 65 | r2.normalize(); 66 | VERIFY_IS_APPROX(f2,r2); 67 | } 68 | 69 | void test_alignedvector3() 70 | { 71 | for(int i = 0; i < g_repeat; i++) { 72 | CALL_SUBTEST( alignedvector3() ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Obj2Point/eigenlib/unsupported/test/mpreal_support.cpp: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace mpfr; 7 | using namespace std; 8 | using namespace Eigen; 9 | 10 | void test_mpreal_support() 11 | { 12 | // set precision to 256 bits (double has only 53 bits) 13 | mpreal::set_default_prec(256); 14 | typedef Matrix MatrixXmp; 15 | 16 | std::cerr << "epsilon = " << NumTraits::epsilon() << "\n"; 17 | std::cerr << "dummy_precision = " << NumTraits::dummy_precision() << "\n"; 18 | std::cerr << "highest = " << NumTraits::highest() << "\n"; 19 | std::cerr << "lowest = " << NumTraits::lowest() << "\n"; 20 | 21 | for(int i = 0; i < g_repeat; i++) { 22 | int s = Eigen::internal::random(1,100); 23 | MatrixXmp A = MatrixXmp::Random(s,s); 24 | MatrixXmp B = MatrixXmp::Random(s,s); 25 | MatrixXmp S = A.adjoint() * A; 26 | MatrixXmp X; 27 | 28 | // Cholesky 29 | X = S.selfadjointView().llt().solve(B); 30 | VERIFY_IS_APPROX((S.selfadjointView()*X).eval(),B); 31 | 32 | // partial LU 33 | X = A.lu().solve(B); 34 | VERIFY_IS_APPROX((A*X).eval(),B); 35 | 36 | // symmetric eigenvalues 37 | SelfAdjointEigenSolver eig(S); 38 | VERIFY_IS_EQUAL(eig.info(), Success); 39 | VERIFY_IS_APPROX((S.selfadjointView() * eig.eigenvectors()), 40 | eig.eigenvectors() * eig.eigenvalues().asDiagonal()); 41 | } 42 | } 43 | 44 | extern "C" { 45 | #include "mpreal/dlmalloc.c" 46 | } 47 | #include "mpreal/mpreal.cpp" 48 | -------------------------------------------------------------------------------- /Obj2Point/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "obj_shape_loader.h" 3 | #include "utils_sampling.hpp" 4 | 5 | inline void write_point_cloud( 6 | const std::string& fn, 7 | const std::vector& pts, 8 | const std::vector& nrs 9 | ) 10 | { 11 | std::ofstream ofs(fn); 12 | for(int i=0;i verts,norms; 22 | std::vector verts_idxs,norms_idxs; 23 | get_mesh("/home/liuyuan/data/ShapeNetCore.v2/02691156/1a6ad7a24bb89733f412783097373bdc/models/model_normalized.obj", 24 | verts,norms,verts_idxs,norms_idxs); 25 | std::cout<<"num verts: "< sample_verts,sample_norms; 31 | poisson_disk(0.005f,4096,verts,norms,verts_idxs,sample_verts,sample_norms); 32 | 33 | write_point_cloud("/home/liuyuan/code/Obj2Points/test.txt",sample_verts); 34 | return 0; 35 | #else 36 | if(argc<3||argc>4){ 37 | std::cout<<"invalid parameters:\n program path-to-obj-file path-to-output-txt-file " 38 | "[sample-radius=0.005]\n"; 39 | return 0; 40 | } 41 | float radius=0.005; 42 | if(argc==4) radius=std::stof(argv[3]); 43 | 44 | std::vector verts,norms; 45 | std::vector verts_idxs,norms_idxs; 46 | read_mesh(argv[1],verts,norms,verts_idxs,norms_idxs); 47 | calculate_norm(verts,verts_idxs,norms); 48 | std::vector sample_verts,sample_norms; 49 | poisson_disk(radius,4096,verts,norms,verts_idxs,sample_verts,sample_norms); 50 | 51 | write_point_cloud(argv[2],sample_verts,sample_norms); 52 | std::cout<<"\n"; 53 | return 0; 54 | #endif 55 | 56 | } -------------------------------------------------------------------------------- /Obj2Point/utils_sampling.cpp: -------------------------------------------------------------------------------- 1 | #include "utils_sampling.hpp" 2 | 3 | #include "vcg_mesh.hpp" 4 | 5 | // ============================================================================= 6 | namespace Utils_sampling { 7 | // ============================================================================= 8 | 9 | void poisson_disk(float radius, 10 | int nb_samples, 11 | const std::vector& verts, 12 | const std::vector& nors, 13 | const std::vector& tris, 14 | std::vector& samples_pos, 15 | std::vector& samples_nor) 16 | { 17 | assert(verts.size() == nors.size()); 18 | assert(verts.size() > 0); 19 | assert(tris.size() > 0); 20 | 21 | vcg::MyMesh vcg_mesh, sampler; 22 | vcg_mesh.concat((float*)&(verts[0]), (int*)&(tris[0]), verts.size(), tris.size()/3); 23 | vcg_mesh.set_normals( (float*)&(nors[0]) ); 24 | vcg_mesh.update_bb(); 25 | 26 | vcg::MyAlgorithms::Poison_setup pp; 27 | pp._radius = radius; 28 | pp._nb_samples = nb_samples; 29 | pp._approx_geodesic_dist = true; 30 | vcg::MyAlgorithms::poison_disk_sampling(vcg_mesh, pp, sampler); 31 | 32 | const int nb_vert = sampler.vert.size(); 33 | samples_pos.clear(); 34 | samples_nor.clear(); 35 | samples_pos.resize( nb_vert ); 36 | samples_nor.resize( nb_vert ); 37 | vcg::MyMesh::VertexIterator vi = sampler.vert.begin(); 38 | for(int i = 0; i < nb_vert; ++i, ++vi) 39 | { 40 | vcg::MyMesh::CoordType p = (*vi).P(); 41 | vcg::MyMesh::NormalType n = (*vi).N(); 42 | samples_pos[i] = Vec3(p.X(), p.Y(), p.Z()); 43 | samples_nor[i] = Vec3(n.X(), n.Y(), n.Z()); 44 | } 45 | 46 | // sampler.get_vertices( samples_pos ); 47 | 48 | } 49 | 50 | }// END UTILS_SAMPLING NAMESPACE =============================================== 51 | -------------------------------------------------------------------------------- /Obj2Point/utils_sampling.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_SAMPLING_HPP 2 | #define UTILS_SAMPLING_HPP 3 | #include 4 | 5 | // ============================================================================= 6 | namespace Utils_sampling { 7 | // ============================================================================= 8 | 9 | struct Vec3 { 10 | Vec3() { x = y = z = 0; } 11 | Vec3(float x_, float y_, float z_) : x(x_), y(y_), z(z_) { } 12 | float x,y,z; 13 | Vec3 operator-(const Vec3& b) const {return {this->x-b.x,this->y-b.y,this->z-b.z};} 14 | Vec3 operator*(float val) const {return {this->x*val,this->y*val,this->z*val};} 15 | Vec3 operator/(float val) const {return (*this)*(1.f/val);} 16 | float operator*(const Vec3& b) {return this->x*b.x+this->y*b.y+this->z*b.z;} 17 | Vec3 operator-() {return {-this->x,-this->y,-this->z};} 18 | void operator+=(const Vec3& b) {this->x+=b.x;this->y+=b.y;this->z+=b.z;} 19 | }; 20 | 21 | /// @param radius : minimal radius between every samples. If radius <= 0 22 | /// a new radius is approximated given the targeted number of samples 23 | /// 'nb_samples' 24 | /// @param nb_samples : ignored if radius > 0 otherwise will try to match 25 | /// and find nb_samples by finding an appropriate radius. 26 | /// @param verts : list of vertices 27 | /// @param nors : list of normlas coresponding to each verts[]. 28 | /// @param tris : triangle indices in verts[] array. 29 | /// @code 30 | /// tri(v0;v1;v3) = { verts[ tris[ith_tri*3 + 0] ], 31 | /// verts[ tris[ith_tri*3 + 1] ], 32 | /// verts[ tris[ith_tri*3 + 2] ] } 33 | /// @endcode 34 | /// @param [out] samples_pos : resulting samples positions 35 | /// @param [out] samples_nors : resulting samples normals associated to samples_pos[] 36 | /// @warning undefined behavior if (radius <= 0 && nb_samples == 0) == true 37 | void poisson_disk(float radius, 38 | int nb_samples, 39 | const std::vector& verts, 40 | const std::vector& nors, 41 | const std::vector& tris, 42 | std::vector& samples_pos, 43 | std::vector& samples_nor); 44 | 45 | }// END UTILS_SAMPLING NAMESPACE =============================================== 46 | #endif -------------------------------------------------------------------------------- /Obj2Point/vcg/complex/algorithms/create/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pengsida/configuration/e1a6fedc56b8f384d0daf62f866892953675d0d2/Obj2Point/vcg/complex/algorithms/create/readme.txt -------------------------------------------------------------------------------- /Obj2Point/vcg/complex/algorithms/textcoord_optimization.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pengsida/configuration/e1a6fedc56b8f384d0daf62f866892953675d0d2/Obj2Point/vcg/complex/algorithms/textcoord_optimization.h -------------------------------------------------------------------------------- /Obj2Point/vcg/complex/all_types.h: -------------------------------------------------------------------------------- 1 | #ifndef VCG_ALL_TYPES_H 2 | #define VCG_ALL_TYPES_H 3 | 4 | namespace vcg{ 5 | 6 | struct AllTypes{ 7 | struct AVertexType {}; 8 | struct AEdgeType {}; 9 | struct AFaceType {}; 10 | struct AHEdgeType {}; 11 | }; 12 | 13 | 14 | }; 15 | 16 | #endif // USED_TYPES_H 17 | -------------------------------------------------------------------------------- /Obj2Point/vcg/complex/used_types.h: -------------------------------------------------------------------------------- 1 | #ifndef VCG_USED_TYPES_H 2 | #define VCG_USED_TYPES_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace vcg{ 14 | 15 | // dummy mesh 16 | 17 | struct _Vertex; 18 | struct _Edge ; 19 | struct _Face ; 20 | struct _HEdge ; 21 | 22 | struct DummyTypes{ 23 | typedef _Vertex VertexType; // simplex types 24 | typedef _Edge EdgeType; 25 | typedef _Face FaceType; 26 | typedef char TetraType; 27 | typedef _HEdge HEdgeType; // connector types 28 | 29 | typedef vcg::Point3 CoordType; 30 | typedef char ScalarType; 31 | 32 | typedef VertexType * VertexPointer; 33 | typedef EdgeType * EdgePointer ; 34 | typedef FaceType * FacePointer ; 35 | typedef TetraType * TetraPointer ; 36 | typedef HEdgeType * HEdgePointer ; 37 | 38 | static void Name(std::vector & /*name*/){} 39 | template < class LeftV> 40 | void ImportData(const LeftV & /*left*/ ) {} 41 | }; 42 | 43 | template 44 | struct Use{ 45 | template struct AsVertexType: public T{typedef A VertexType; typedef VertexType * VertexPointer ;}; 46 | template struct AsEdgeType: public T{typedef A EdgeType; typedef EdgeType * EdgePointer ;}; 47 | template struct AsFaceType: public T{typedef A FaceType; typedef FaceType * FacePointer ;}; 48 | template struct AsTetraType: public T{typedef A TetraType; typedef TetraType * TetraPointer ;}; 49 | template struct AsHEdgeType: public T{typedef A HEdgeType; typedef HEdgeType * HEdgePointer ;}; 50 | }; 51 | 52 | template