├── .gitignore ├── INSTALL ├── LICENSE.txt ├── Makefile ├── README.md ├── apps ├── compute_mean.cc ├── extract_representation.cc ├── image2hdf5.cc ├── pbtxt2dot.py ├── run_grad_check.cc ├── show_plots.py ├── show_results.py ├── test_data_handler.cc ├── train_convnet.cc ├── train_convnet_data_parallel.cc └── video2hdf5.cc ├── bin └── .gitignore ├── cudamat ├── .gitignore ├── Makefile ├── __init__.py ├── cudamat.cu ├── cudamat.cuh ├── cudamat.py ├── cudamat_conv.cuh ├── cudamat_conv.py ├── cudamat_conv3d_gemm.cu ├── cudamat_conv_filteracts.cu ├── cudamat_conv_gemm.cu ├── cudamat_conv_gemm.cuh ├── cudamat_conv_gemm.py ├── cudamat_conv_imgacts.cu ├── cudamat_conv_others.cu ├── cudamat_conv_util.cu ├── cudamat_conv_util.cuh ├── cudamat_conv_weightacts.cu ├── cudamat_kernels.cu ├── cudamat_kernels.cuh ├── gpu_lock2.py ├── rnd_multipliers_32bit.h └── run_on_me_or_pid_quit ├── deps ├── CImg │ ├── CImg.h │ ├── Licence_CeCILL-C_V1-en.txt │ ├── Licence_CeCILL_V2-en.txt │ ├── README.txt │ ├── examples │ │ ├── CImg_demo │ │ ├── CImg_demo.cpp │ │ ├── Makefile │ │ ├── captcha │ │ ├── captcha.cpp │ │ ├── curve_editor2d │ │ ├── curve_editor2d.cpp │ │ ├── dtmri_view3d │ │ ├── dtmri_view3d.cpp │ │ ├── edge_explorer2d │ │ ├── edge_explorer2d.cpp │ │ ├── fade_images │ │ ├── fade_images.cpp │ │ ├── gaussian_fit1d │ │ ├── gaussian_fit1d.cpp │ │ ├── generate_loop_macros │ │ ├── generate_loop_macros.cpp │ │ ├── hough_transform2d │ │ ├── hough_transform2d.cpp │ │ ├── image2ascii │ │ ├── image2ascii.cpp │ │ ├── image_registration2d │ │ ├── image_registration2d.cpp │ │ ├── image_surface3d │ │ ├── image_surface3d.cpp │ │ ├── img │ │ │ ├── CImg_demo.h │ │ │ ├── lena.pgm │ │ │ ├── logo.bmp │ │ │ ├── milla.bmp │ │ │ ├── odykill.h │ │ │ ├── parrot_mask.pgm │ │ │ ├── parrot_original.ppm │ │ │ ├── sh0r.pgm │ │ │ ├── sh1r.pgm │ │ │ └── tetris.h │ │ ├── jawbreaker │ │ ├── jawbreaker.cpp │ │ ├── mcf_levelsets2d │ │ ├── mcf_levelsets2d.cpp │ │ ├── mcf_levelsets3d │ │ ├── mcf_levelsets3d.cpp │ │ ├── odykill │ │ ├── odykill.cpp │ │ ├── pde_TschumperleDeriche2d │ │ ├── pde_TschumperleDeriche2d.cpp │ │ ├── pde_heatflow2d │ │ ├── pde_heatflow2d.cpp │ │ ├── plotter1d │ │ ├── plotter1d.cpp │ │ ├── radon_transform2d │ │ ├── radon_transform2d.cpp │ │ ├── scene3d │ │ ├── scene3d.cpp │ │ ├── spherical_function3d │ │ ├── spherical_function3d.cpp │ │ ├── tetris │ │ ├── tetris.cpp │ │ ├── tron │ │ ├── tron.cpp │ │ ├── tutorial │ │ ├── tutorial.cpp │ │ ├── use_RGBclass │ │ ├── use_RGBclass.cpp │ │ ├── use_chlpca │ │ ├── use_chlpca.cpp │ │ ├── use_cimgIPL.cpp │ │ ├── use_cimgmatlab.cpp │ │ ├── use_cimgmatlab.m │ │ ├── use_draw_gradient │ │ ├── use_draw_gradient.cpp │ │ ├── use_jpeg_buffer.cpp │ │ ├── use_nlmeans │ │ ├── use_nlmeans.cpp │ │ ├── use_skeleton │ │ ├── use_skeleton.cpp │ │ ├── use_tiff_stream.cpp │ │ ├── wavelet_atrous │ │ └── wavelet_atrous.cpp │ ├── plugins │ │ ├── add_fileformat.h │ │ ├── chlpca.h │ │ ├── cimgIPL.h │ │ ├── cimg_ipl.h │ │ ├── cimgmatlab.h │ │ ├── draw_gradient.h │ │ ├── jpeg_buffer.h │ │ ├── loop_macros.h │ │ ├── nlmeans.h │ │ ├── opencv.h │ │ ├── skeleton.h │ │ ├── tiff_stream.h │ │ ├── vrml.h │ │ └── vtk.h │ └── resources │ │ ├── CImg.pc │ │ ├── cimg_buildpackage │ │ ├── compile_win_icl.bat │ │ ├── compile_win_visualcpp.bat │ │ ├── debian │ │ ├── changelog │ │ ├── cimg-dev.dirs │ │ ├── cimg-dev.install │ │ ├── cimg-dev.links │ │ ├── compat │ │ ├── control │ │ ├── copyright │ │ ├── docs │ │ └── rules │ │ └── project_win_visualcpp │ │ ├── project_win_visualcpp.sln │ │ ├── project_win_visualcpp.suo │ │ └── project_win_visualcpp.vcproj └── eigen │ ├── .hgeol │ ├── .hgignore │ ├── .hgtags │ ├── COPYING.BSD │ ├── COPYING.GPL │ ├── COPYING.LGPL │ ├── COPYING.MINPACK │ ├── COPYING.MPL2 │ ├── COPYING.README │ ├── CTestConfig.cmake │ ├── CTestCustom.cmake.in │ ├── Eigen │ ├── Array │ ├── Cholesky │ ├── CholmodSupport │ ├── Core │ ├── Dense │ ├── Eigen │ ├── Eigen2Support │ ├── Eigenvalues │ ├── Geometry │ ├── Householder │ ├── IterativeLinearSolvers │ ├── Jacobi │ ├── LU │ ├── LeastSquares │ ├── MetisSupport │ ├── OrderingMethods │ ├── PaStiXSupport │ ├── PardisoSupport │ ├── QR │ ├── QtAlignedMalloc │ ├── SPQRSupport │ ├── SVD │ ├── Sparse │ ├── SparseCholesky │ ├── SparseCore │ ├── SparseLU │ ├── SparseQR │ ├── StdDeque │ ├── StdList │ ├── StdVector │ ├── SuperLUSupport │ ├── UmfPackSupport │ └── src │ │ ├── Cholesky │ │ ├── LDLT.h │ │ ├── LLT.h │ │ └── LLT_MKL.h │ │ ├── CholmodSupport │ │ └── CholmodSupport.h │ │ ├── Core │ │ ├── Array.h │ │ ├── ArrayBase.h │ │ ├── ArrayWrapper.h │ │ ├── Assign.h │ │ ├── Assign_MKL.h │ │ ├── BandMatrix.h │ │ ├── Block.h │ │ ├── BooleanRedux.h │ │ ├── CommaInitializer.h │ │ ├── CoreIterators.h │ │ ├── CwiseBinaryOp.h │ │ ├── CwiseNullaryOp.h │ │ ├── CwiseUnaryOp.h │ │ ├── CwiseUnaryView.h │ │ ├── DenseBase.h │ │ ├── DenseCoeffsBase.h │ │ ├── DenseStorage.h │ │ ├── Diagonal.h │ │ ├── DiagonalMatrix.h │ │ ├── DiagonalProduct.h │ │ ├── Dot.h │ │ ├── EigenBase.h │ │ ├── Flagged.h │ │ ├── ForceAlignedAccess.h │ │ ├── Functors.h │ │ ├── Fuzzy.h │ │ ├── GeneralProduct.h │ │ ├── GenericPacketMath.h │ │ ├── GlobalFunctions.h │ │ ├── IO.h │ │ ├── Map.h │ │ ├── MapBase.h │ │ ├── MathFunctions.h │ │ ├── Matrix.h │ │ ├── MatrixBase.h │ │ ├── NestByValue.h │ │ ├── NoAlias.h │ │ ├── NumTraits.h │ │ ├── PermutationMatrix.h │ │ ├── PlainObjectBase.h │ │ ├── ProductBase.h │ │ ├── Random.h │ │ ├── Redux.h │ │ ├── Ref.h │ │ ├── Replicate.h │ │ ├── ReturnByValue.h │ │ ├── Reverse.h │ │ ├── Select.h │ │ ├── SelfAdjointView.h │ │ ├── SelfCwiseBinaryOp.h │ │ ├── SolveTriangular.h │ │ ├── StableNorm.h │ │ ├── Stride.h │ │ ├── Swap.h │ │ ├── Transpose.h │ │ ├── Transpositions.h │ │ ├── TriangularMatrix.h │ │ ├── VectorBlock.h │ │ ├── VectorwiseOp.h │ │ ├── Visitor.h │ │ ├── arch │ │ │ ├── AltiVec │ │ │ │ ├── Complex.h │ │ │ │ └── PacketMath.h │ │ │ ├── Default │ │ │ │ └── Settings.h │ │ │ ├── NEON │ │ │ │ ├── Complex.h │ │ │ │ └── PacketMath.h │ │ │ └── SSE │ │ │ │ ├── Complex.h │ │ │ │ ├── MathFunctions.h │ │ │ │ └── PacketMath.h │ │ ├── products │ │ │ ├── CoeffBasedProduct.h │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ ├── GeneralMatrixMatrix.h │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ ├── GeneralMatrixMatrixTriangular_MKL.h │ │ │ ├── GeneralMatrixMatrix_MKL.h │ │ │ ├── GeneralMatrixVector.h │ │ │ ├── GeneralMatrixVector_MKL.h │ │ │ ├── Parallelizer.h │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ ├── SelfadjointMatrixMatrix_MKL.h │ │ │ ├── SelfadjointMatrixVector.h │ │ │ ├── SelfadjointMatrixVector_MKL.h │ │ │ ├── SelfadjointProduct.h │ │ │ ├── SelfadjointRank2Update.h │ │ │ ├── TriangularMatrixMatrix.h │ │ │ ├── TriangularMatrixMatrix_MKL.h │ │ │ ├── TriangularMatrixVector.h │ │ │ ├── TriangularMatrixVector_MKL.h │ │ │ ├── TriangularSolverMatrix.h │ │ │ ├── TriangularSolverMatrix_MKL.h │ │ │ └── TriangularSolverVector.h │ │ └── util │ │ │ ├── BlasUtil.h │ │ │ ├── Constants.h │ │ │ ├── DisableStupidWarnings.h │ │ │ ├── ForwardDeclarations.h │ │ │ ├── MKL_support.h │ │ │ ├── Macros.h │ │ │ ├── Memory.h │ │ │ ├── Meta.h │ │ │ ├── NonMPL2.h │ │ │ ├── ReenableStupidWarnings.h │ │ │ ├── StaticAssert.h │ │ │ └── XprHelper.h │ │ ├── Eigen2Support │ │ ├── Block.h │ │ ├── Cwise.h │ │ ├── CwiseOperators.h │ │ ├── Geometry │ │ │ ├── AlignedBox.h │ │ │ ├── All.h │ │ │ ├── AngleAxis.h │ │ │ ├── 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 │ │ ├── ComplexEigenSolver.h │ │ ├── ComplexSchur.h │ │ ├── ComplexSchur_MKL.h │ │ ├── EigenSolver.h │ │ ├── GeneralizedEigenSolver.h │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ ├── HessenbergDecomposition.h │ │ ├── MatrixBaseEigenvalues.h │ │ ├── RealQZ.h │ │ ├── RealSchur.h │ │ ├── RealSchur_MKL.h │ │ ├── SelfAdjointEigenSolver.h │ │ ├── SelfAdjointEigenSolver_MKL.h │ │ └── Tridiagonalization.h │ │ ├── Geometry │ │ ├── AlignedBox.h │ │ ├── AngleAxis.h │ │ ├── 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 │ │ │ └── Geometry_SSE.h │ │ ├── Householder │ │ ├── BlockHouseholder.h │ │ ├── Householder.h │ │ └── HouseholderSequence.h │ │ ├── IterativeLinearSolvers │ │ ├── BasicPreconditioners.h │ │ ├── BiCGSTAB.h │ │ ├── ConjugateGradient.h │ │ ├── IncompleteLUT.h │ │ └── IterativeSolverBase.h │ │ ├── Jacobi │ │ └── Jacobi.h │ │ ├── LU │ │ ├── Determinant.h │ │ ├── FullPivLU.h │ │ ├── Inverse.h │ │ ├── PartialPivLU.h │ │ ├── PartialPivLU_MKL.h │ │ └── arch │ │ │ └── Inverse_SSE.h │ │ ├── MetisSupport │ │ └── MetisSupport.h │ │ ├── OrderingMethods │ │ ├── Amd.h │ │ ├── Eigen_Colamd.h │ │ └── Ordering.h │ │ ├── PaStiXSupport │ │ └── PaStiXSupport.h │ │ ├── PardisoSupport │ │ └── PardisoSupport.h │ │ ├── QR │ │ ├── ColPivHouseholderQR.h │ │ ├── ColPivHouseholderQR_MKL.h │ │ ├── FullPivHouseholderQR.h │ │ ├── HouseholderQR.h │ │ └── HouseholderQR_MKL.h │ │ ├── SPQRSupport │ │ └── SuiteSparseQRSupport.h │ │ ├── SVD │ │ ├── JacobiSVD.h │ │ ├── JacobiSVD_MKL.h │ │ └── UpperBidiagonalization.h │ │ ├── SparseCholesky │ │ ├── SimplicialCholesky.h │ │ └── SimplicialCholesky_impl.h │ │ ├── SparseCore │ │ ├── AmbiVector.h │ │ ├── CompressedStorage.h │ │ ├── ConservativeSparseSparseProduct.h │ │ ├── MappedSparseMatrix.h │ │ ├── SparseBlock.h │ │ ├── SparseColEtree.h │ │ ├── SparseCwiseBinaryOp.h │ │ ├── SparseCwiseUnaryOp.h │ │ ├── SparseDenseProduct.h │ │ ├── SparseDiagonalProduct.h │ │ ├── SparseDot.h │ │ ├── SparseFuzzy.h │ │ ├── SparseMatrix.h │ │ ├── SparseMatrixBase.h │ │ ├── SparsePermutation.h │ │ ├── SparseProduct.h │ │ ├── SparseRedux.h │ │ ├── SparseSelfAdjointView.h │ │ ├── SparseSparseProductWithPruning.h │ │ ├── SparseTranspose.h │ │ ├── SparseTriangularView.h │ │ ├── SparseUtil.h │ │ ├── SparseVector.h │ │ ├── SparseView.h │ │ └── TriangularSolver.h │ │ ├── SparseLU │ │ ├── SparseLU.h │ │ ├── SparseLUImpl.h │ │ ├── SparseLU_Memory.h │ │ ├── SparseLU_Structs.h │ │ ├── SparseLU_SupernodalMatrix.h │ │ ├── SparseLU_Utils.h │ │ ├── SparseLU_column_bmod.h │ │ ├── SparseLU_column_dfs.h │ │ ├── SparseLU_copy_to_ucol.h │ │ ├── SparseLU_gemm_kernel.h │ │ ├── SparseLU_heap_relax_snode.h │ │ ├── SparseLU_kernel_bmod.h │ │ ├── SparseLU_panel_bmod.h │ │ ├── SparseLU_panel_dfs.h │ │ ├── SparseLU_pivotL.h │ │ ├── SparseLU_pruneL.h │ │ └── SparseLU_relax_snode.h │ │ ├── SparseQR │ │ └── SparseQR.h │ │ ├── StlSupport │ │ ├── StdDeque.h │ │ ├── StdList.h │ │ ├── StdVector.h │ │ └── details.h │ │ ├── SuperLUSupport │ │ └── SuperLUSupport.h │ │ ├── UmfPackSupport │ │ └── UmfPackSupport.h │ │ ├── misc │ │ ├── Image.h │ │ ├── Kernel.h │ │ ├── Solve.h │ │ ├── SparseSolve.h │ │ └── blas.h │ │ └── plugins │ │ ├── ArrayCwiseBinaryOps.h │ │ ├── ArrayCwiseUnaryOps.h │ │ ├── BlockMethods.h │ │ ├── CommonCwiseBinaryOps.h │ │ ├── CommonCwiseUnaryOps.h │ │ ├── MatrixCwiseBinaryOps.h │ │ └── MatrixCwiseUnaryOps.h │ ├── INSTALL │ ├── bench │ ├── BenchSparseUtil.h │ ├── BenchTimer.h │ ├── BenchUtil.h │ ├── basicbench.cxxlist │ ├── basicbenchmark.cpp │ ├── basicbenchmark.h │ ├── benchBlasGemm.cpp │ ├── benchCholesky.cpp │ ├── benchEigenSolver.cpp │ ├── benchFFT.cpp │ ├── benchGeometry.cpp │ ├── benchVecAdd.cpp │ ├── bench_gemm.cpp │ ├── bench_multi_compilers.sh │ ├── bench_norm.cpp │ ├── bench_reverse.cpp │ ├── bench_sum.cpp │ ├── bench_unrolling │ ├── benchmark.cpp │ ├── benchmarkSlice.cpp │ ├── benchmarkX.cpp │ ├── benchmarkXcwise.cpp │ ├── benchmark_suite │ ├── btl │ │ ├── COPYING │ │ ├── README │ │ ├── actions │ │ │ ├── action_aat_product.hh │ │ │ ├── action_ata_product.hh │ │ │ ├── action_atv_product.hh │ │ │ ├── action_axpby.hh │ │ │ ├── action_axpy.hh │ │ │ ├── action_cholesky.hh │ │ │ ├── action_ger.hh │ │ │ ├── action_hessenberg.hh │ │ │ ├── action_lu_decomp.hh │ │ │ ├── action_lu_solve.hh │ │ │ ├── action_matrix_matrix_product.hh │ │ │ ├── action_matrix_matrix_product_bis.hh │ │ │ ├── action_matrix_vector_product.hh │ │ │ ├── action_partial_lu.hh │ │ │ ├── action_rot.hh │ │ │ ├── action_symv.hh │ │ │ ├── action_syr2.hh │ │ │ ├── action_trisolve.hh │ │ │ ├── action_trisolve_matrix.hh │ │ │ ├── action_trmm.hh │ │ │ └── basic_actions.hh │ │ ├── cmake │ │ │ ├── FindACML.cmake │ │ │ ├── FindATLAS.cmake │ │ │ ├── FindBlitz.cmake │ │ │ ├── FindCBLAS.cmake │ │ │ ├── FindGMM.cmake │ │ │ ├── FindGOTO.cmake │ │ │ ├── FindGOTO2.cmake │ │ │ ├── FindMKL.cmake │ │ │ ├── FindMTL4.cmake │ │ │ ├── FindPackageHandleStandardArgs.cmake │ │ │ ├── FindTvmet.cmake │ │ │ └── MacroOptionalAddSubdirectory.cmake │ │ ├── data │ │ │ ├── gnuplot_common_settings.hh │ │ │ ├── go_mean │ │ │ ├── mean.cxx │ │ │ ├── mk_gnuplot_script.sh │ │ │ ├── mk_mean_script.sh │ │ │ ├── mk_new_gnuplot.sh │ │ │ ├── regularize.cxx │ │ │ ├── smooth.cxx │ │ │ └── smooth_all.sh │ │ ├── generic_bench │ │ │ ├── bench.hh │ │ │ ├── bench_parameter.hh │ │ │ ├── btl.hh │ │ │ ├── init │ │ │ │ ├── init_function.hh │ │ │ │ ├── init_matrix.hh │ │ │ │ └── init_vector.hh │ │ │ ├── static │ │ │ │ ├── bench_static.hh │ │ │ │ ├── intel_bench_fixed_size.hh │ │ │ │ └── static_size_generator.hh │ │ │ ├── timers │ │ │ │ ├── STL_perf_analyzer.hh │ │ │ │ ├── STL_timer.hh │ │ │ │ ├── mixed_perf_analyzer.hh │ │ │ │ ├── portable_perf_analyzer.hh │ │ │ │ ├── portable_perf_analyzer_old.hh │ │ │ │ ├── portable_timer.hh │ │ │ │ ├── x86_perf_analyzer.hh │ │ │ │ └── x86_timer.hh │ │ │ └── utils │ │ │ │ ├── size_lin_log.hh │ │ │ │ ├── size_log.hh │ │ │ │ ├── utilities.h │ │ │ │ └── xy_file.hh │ │ └── libs │ │ │ ├── BLAS │ │ │ ├── blas.h │ │ │ ├── blas_interface.hh │ │ │ ├── blas_interface_impl.hh │ │ │ ├── c_interface_base.h │ │ │ └── main.cpp │ │ │ ├── STL │ │ │ ├── STL_interface.hh │ │ │ └── main.cpp │ │ │ ├── blitz │ │ │ ├── blitz_LU_solve_interface.hh │ │ │ ├── blitz_interface.hh │ │ │ ├── btl_blitz.cpp │ │ │ ├── btl_tiny_blitz.cpp │ │ │ └── tiny_blitz_interface.hh │ │ │ ├── eigen2 │ │ │ ├── btl_tiny_eigen2.cpp │ │ │ ├── eigen2_interface.hh │ │ │ ├── main_adv.cpp │ │ │ ├── main_linear.cpp │ │ │ ├── main_matmat.cpp │ │ │ └── main_vecmat.cpp │ │ │ ├── eigen3 │ │ │ ├── btl_tiny_eigen3.cpp │ │ │ ├── eigen3_interface.hh │ │ │ ├── main_adv.cpp │ │ │ ├── main_linear.cpp │ │ │ ├── main_matmat.cpp │ │ │ └── main_vecmat.cpp │ │ │ ├── gmm │ │ │ ├── gmm_LU_solve_interface.hh │ │ │ ├── gmm_interface.hh │ │ │ └── main.cpp │ │ │ ├── mtl4 │ │ │ ├── .kdbgrc.main │ │ │ ├── main.cpp │ │ │ ├── mtl4_LU_solve_interface.hh │ │ │ └── mtl4_interface.hh │ │ │ ├── tvmet │ │ │ ├── main.cpp │ │ │ └── tvmet_interface.hh │ │ │ └── ublas │ │ │ ├── main.cpp │ │ │ └── ublas_interface.hh │ ├── check_cache_queries.cpp │ ├── eig33.cpp │ ├── geometry.cpp │ ├── product_threshold.cpp │ ├── quat_slerp.cpp │ ├── quatmul.cpp │ ├── sparse_cholesky.cpp │ ├── sparse_dense_product.cpp │ ├── sparse_lu.cpp │ ├── sparse_product.cpp │ ├── sparse_randomsetter.cpp │ ├── sparse_setter.cpp │ ├── sparse_transpose.cpp │ ├── sparse_trisolver.cpp │ ├── spbench │ │ ├── sp_solver.cpp │ │ ├── spbench.dtd │ │ ├── spbenchsolver.cpp │ │ ├── spbenchsolver.h │ │ ├── spbenchstyle.h │ │ └── test_sparseLU.cpp │ ├── spmv.cpp │ └── vdw_new.cpp │ ├── blas │ ├── BandTriangularSolver.h │ ├── GeneralRank1Update.h │ ├── PackedSelfadjointProduct.h │ ├── PackedTriangularMatrixVector.h │ ├── PackedTriangularSolverVector.h │ ├── Rank2Update.h │ ├── chbmv.f │ ├── chpmv.f │ ├── common.h │ ├── complex_double.cpp │ ├── complex_single.cpp │ ├── complexdots.f │ ├── ctbmv.f │ ├── double.cpp │ ├── drotm.f │ ├── drotmg.f │ ├── dsbmv.f │ ├── dspmv.f │ ├── dtbmv.f │ ├── level1_cplx_impl.h │ ├── level1_impl.h │ ├── level1_real_impl.h │ ├── level2_cplx_impl.h │ ├── level2_impl.h │ ├── level2_real_impl.h │ ├── level3_impl.h │ ├── lsame.f │ ├── single.cpp │ ├── srotm.f │ ├── srotmg.f │ ├── ssbmv.f │ ├── sspmv.f │ ├── stbmv.f │ ├── testing │ │ ├── cblat1.f │ │ ├── cblat2.dat │ │ ├── cblat2.f │ │ ├── cblat3.dat │ │ ├── cblat3.f │ │ ├── dblat1.f │ │ ├── dblat2.dat │ │ ├── dblat2.f │ │ ├── dblat3.dat │ │ ├── dblat3.f │ │ ├── runblastest.sh │ │ ├── sblat1.f │ │ ├── sblat2.dat │ │ ├── sblat2.f │ │ ├── sblat3.dat │ │ ├── sblat3.f │ │ ├── zblat1.f │ │ ├── zblat2.dat │ │ ├── zblat2.f │ │ ├── zblat3.dat │ │ └── zblat3.f │ ├── xerbla.cpp │ ├── zhbmv.f │ ├── zhpmv.f │ └── ztbmv.f │ ├── cmake │ ├── EigenConfigureTesting.cmake │ ├── EigenDetermineOSVersion.cmake │ ├── EigenDetermineVSServicePack.cmake │ ├── EigenTesting.cmake │ ├── FindAdolc.cmake │ ├── FindBLAS.cmake │ ├── FindCholmod.cmake │ ├── FindEigen2.cmake │ ├── FindEigen3.cmake │ ├── FindFFTW.cmake │ ├── FindGLEW.cmake │ ├── FindGMP.cmake │ ├── FindGSL.cmake │ ├── FindGoogleHash.cmake │ ├── FindLAPACK.cmake │ ├── FindMPFR.cmake │ ├── FindMetis.cmake │ ├── FindPastix.cmake │ ├── FindSPQR.cmake │ ├── FindScotch.cmake │ ├── FindStandardMathLibrary.cmake │ ├── FindSuperLU.cmake │ ├── FindUmfpack.cmake │ ├── RegexUtils.cmake │ └── language_support.cmake │ ├── debug │ ├── gdb │ │ ├── __init__.py │ │ └── printers.py │ └── msvc │ │ ├── eigen.natvis │ │ └── eigen_autoexp_part.dat │ ├── demos │ ├── mandelbrot │ │ ├── README │ │ ├── mandelbrot.cpp │ │ └── mandelbrot.h │ ├── mix_eigen_and_c │ │ ├── README │ │ ├── binary_library.cpp │ │ ├── binary_library.h │ │ └── example.c │ └── opengl │ │ ├── README │ │ ├── camera.cpp │ │ ├── camera.h │ │ ├── gpuhelper.cpp │ │ ├── gpuhelper.h │ │ ├── icosphere.cpp │ │ ├── icosphere.h │ │ ├── quaternion_demo.cpp │ │ ├── quaternion_demo.h │ │ ├── trackball.cpp │ │ └── trackball.h │ ├── doc │ ├── A05_PortingFrom2To3.dox │ ├── A10_Eigen2SupportModes.dox │ ├── B01_Experimental.dox │ ├── ClassHierarchy.dox │ ├── CustomizingEigen.dox │ ├── Doxyfile.in │ ├── Eigen_Silly_Professor_64x64.png │ ├── FixedSizeVectorizable.dox │ ├── FunctionsTakingEigenTypes.dox │ ├── HiPerformance.dox │ ├── InsideEigenExample.dox │ ├── Manual.dox │ ├── Overview.dox │ ├── PassingByValue.dox │ ├── PreprocessorDirectives.dox │ ├── QuickReference.dox │ ├── QuickStartGuide.dox │ ├── SparseLinearSystems.dox │ ├── SparseQuickReference.dox │ ├── StlContainers.dox │ ├── StorageOrders.dox │ ├── StructHavingEigenMembers.dox │ ├── TemplateKeyword.dox │ ├── TopicAliasing.dox │ ├── TopicAssertions.dox │ ├── TopicEigenExpressionTemplates.dox │ ├── TopicLazyEvaluation.dox │ ├── TopicLinearAlgebraDecompositions.dox │ ├── TopicMultithreading.dox │ ├── TopicResizing.dox │ ├── TopicScalarTypes.dox │ ├── TopicVectorization.dox │ ├── TutorialAdvancedInitialization.dox │ ├── TutorialArrayClass.dox │ ├── TutorialBlockOperations.dox │ ├── TutorialGeometry.dox │ ├── TutorialLinearAlgebra.dox │ ├── TutorialMapClass.dox │ ├── TutorialMatrixArithmetic.dox │ ├── TutorialMatrixClass.dox │ ├── TutorialReductionsVisitorsBroadcasting.dox │ ├── TutorialSparse.dox │ ├── TutorialSparse_example_details.dox │ ├── UnalignedArrayAssert.dox │ ├── UsingIntelMKL.dox │ ├── WrongStackAlignment.dox │ ├── eigen_navtree_hacks.js │ ├── eigendoxy.css │ ├── eigendoxy_footer.html.in │ ├── eigendoxy_header.html.in │ ├── eigendoxy_layout.xml.in │ ├── eigendoxy_tabs.css │ ├── examples │ │ ├── .krazy │ │ ├── DenseBase_middleCols_int.cpp │ │ ├── DenseBase_middleRows_int.cpp │ │ ├── DenseBase_template_int_middleCols.cpp │ │ ├── DenseBase_template_int_middleRows.cpp │ │ ├── MatrixBase_cwise_const.cpp │ │ ├── QuickStart_example.cpp │ │ ├── QuickStart_example2_dynamic.cpp │ │ ├── QuickStart_example2_fixed.cpp │ │ ├── TemplateKeyword_flexible.cpp │ │ ├── TemplateKeyword_simple.cpp │ │ ├── TutorialLinAlgComputeTwice.cpp │ │ ├── TutorialLinAlgExComputeSolveError.cpp │ │ ├── TutorialLinAlgExSolveColPivHouseholderQR.cpp │ │ ├── TutorialLinAlgExSolveLDLT.cpp │ │ ├── TutorialLinAlgInverseDeterminant.cpp │ │ ├── TutorialLinAlgRankRevealing.cpp │ │ ├── TutorialLinAlgSVDSolve.cpp │ │ ├── TutorialLinAlgSelfAdjointEigenSolver.cpp │ │ ├── TutorialLinAlgSetThreshold.cpp │ │ ├── Tutorial_ArrayClass_accessors.cpp │ │ ├── Tutorial_ArrayClass_addition.cpp │ │ ├── Tutorial_ArrayClass_cwise_other.cpp │ │ ├── Tutorial_ArrayClass_interop.cpp │ │ ├── Tutorial_ArrayClass_interop_matrix.cpp │ │ ├── Tutorial_ArrayClass_mult.cpp │ │ ├── Tutorial_BlockOperations_block_assignment.cpp │ │ ├── Tutorial_BlockOperations_colrow.cpp │ │ ├── Tutorial_BlockOperations_corner.cpp │ │ ├── Tutorial_BlockOperations_print_block.cpp │ │ ├── Tutorial_BlockOperations_vector.cpp │ │ ├── Tutorial_PartialLU_solve.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp │ │ ├── Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp │ │ ├── Tutorial_simple_example_dynamic_size.cpp │ │ ├── Tutorial_simple_example_fixed_size.cpp │ │ ├── class_Block.cpp │ │ ├── class_CwiseBinaryOp.cpp │ │ ├── class_CwiseUnaryOp.cpp │ │ ├── class_CwiseUnaryOp_ptrfun.cpp │ │ ├── class_FixedBlock.cpp │ │ ├── class_FixedVectorBlock.cpp │ │ ├── class_VectorBlock.cpp │ │ ├── function_taking_eigenbase.cpp │ │ ├── function_taking_ref.cpp │ │ ├── tut_arithmetic_add_sub.cpp │ │ ├── tut_arithmetic_dot_cross.cpp │ │ ├── tut_arithmetic_matrix_mul.cpp │ │ ├── tut_arithmetic_redux_basic.cpp │ │ ├── tut_arithmetic_scalar_mul_div.cpp │ │ ├── tut_matrix_coefficient_accessors.cpp │ │ ├── tut_matrix_resize.cpp │ │ └── tut_matrix_resize_fixed_size.cpp │ ├── snippets │ │ ├── .krazy │ │ ├── AngleAxis_mimic_euler.cpp │ │ ├── ColPivHouseholderQR_solve.cpp │ │ ├── ComplexEigenSolver_compute.cpp │ │ ├── ComplexEigenSolver_eigenvalues.cpp │ │ ├── ComplexEigenSolver_eigenvectors.cpp │ │ ├── ComplexSchur_compute.cpp │ │ ├── ComplexSchur_matrixT.cpp │ │ ├── ComplexSchur_matrixU.cpp │ │ ├── Cwise_abs.cpp │ │ ├── Cwise_abs2.cpp │ │ ├── Cwise_acos.cpp │ │ ├── Cwise_asin.cpp │ │ ├── Cwise_boolean_and.cpp │ │ ├── Cwise_boolean_or.cpp │ │ ├── Cwise_cos.cpp │ │ ├── Cwise_cube.cpp │ │ ├── Cwise_equal_equal.cpp │ │ ├── Cwise_exp.cpp │ │ ├── Cwise_greater.cpp │ │ ├── Cwise_greater_equal.cpp │ │ ├── Cwise_inverse.cpp │ │ ├── Cwise_less.cpp │ │ ├── Cwise_less_equal.cpp │ │ ├── Cwise_log.cpp │ │ ├── Cwise_max.cpp │ │ ├── Cwise_min.cpp │ │ ├── Cwise_minus.cpp │ │ ├── Cwise_minus_equal.cpp │ │ ├── Cwise_not_equal.cpp │ │ ├── Cwise_plus.cpp │ │ ├── Cwise_plus_equal.cpp │ │ ├── Cwise_pow.cpp │ │ ├── Cwise_product.cpp │ │ ├── Cwise_quotient.cpp │ │ ├── Cwise_sin.cpp │ │ ├── Cwise_slash_equal.cpp │ │ ├── Cwise_sqrt.cpp │ │ ├── Cwise_square.cpp │ │ ├── Cwise_tan.cpp │ │ ├── Cwise_times_equal.cpp │ │ ├── DenseBase_LinSpaced.cpp │ │ ├── DenseBase_LinSpaced_seq.cpp │ │ ├── DenseBase_setLinSpaced.cpp │ │ ├── DirectionWise_replicate.cpp │ │ ├── DirectionWise_replicate_int.cpp │ │ ├── EigenSolver_EigenSolver_MatrixType.cpp │ │ ├── EigenSolver_compute.cpp │ │ ├── EigenSolver_eigenvalues.cpp │ │ ├── EigenSolver_eigenvectors.cpp │ │ ├── EigenSolver_pseudoEigenvectors.cpp │ │ ├── FullPivHouseholderQR_solve.cpp │ │ ├── FullPivLU_image.cpp │ │ ├── FullPivLU_kernel.cpp │ │ ├── FullPivLU_solve.cpp │ │ ├── GeneralizedEigenSolver.cpp │ │ ├── HessenbergDecomposition_compute.cpp │ │ ├── HessenbergDecomposition_matrixH.cpp │ │ ├── HessenbergDecomposition_packedMatrix.cpp │ │ ├── HouseholderQR_householderQ.cpp │ │ ├── HouseholderQR_solve.cpp │ │ ├── HouseholderSequence_HouseholderSequence.cpp │ │ ├── IOFormat.cpp │ │ ├── JacobiSVD_basic.cpp │ │ ├── Jacobi_makeGivens.cpp │ │ ├── Jacobi_makeJacobi.cpp │ │ ├── LLT_example.cpp │ │ ├── LLT_solve.cpp │ │ ├── Map_general_stride.cpp │ │ ├── Map_inner_stride.cpp │ │ ├── Map_outer_stride.cpp │ │ ├── Map_placement_new.cpp │ │ ├── Map_simple.cpp │ │ ├── MatrixBase_adjoint.cpp │ │ ├── MatrixBase_all.cpp │ │ ├── MatrixBase_applyOnTheLeft.cpp │ │ ├── MatrixBase_applyOnTheRight.cpp │ │ ├── MatrixBase_array.cpp │ │ ├── MatrixBase_array_const.cpp │ │ ├── MatrixBase_asDiagonal.cpp │ │ ├── MatrixBase_block_int_int.cpp │ │ ├── MatrixBase_block_int_int_int_int.cpp │ │ ├── MatrixBase_bottomLeftCorner_int_int.cpp │ │ ├── MatrixBase_bottomRightCorner_int_int.cpp │ │ ├── MatrixBase_bottomRows_int.cpp │ │ ├── MatrixBase_cast.cpp │ │ ├── MatrixBase_col.cpp │ │ ├── MatrixBase_colwise.cpp │ │ ├── MatrixBase_computeInverseAndDetWithCheck.cpp │ │ ├── MatrixBase_computeInverseWithCheck.cpp │ │ ├── MatrixBase_cwiseAbs.cpp │ │ ├── MatrixBase_cwiseAbs2.cpp │ │ ├── MatrixBase_cwiseEqual.cpp │ │ ├── MatrixBase_cwiseInverse.cpp │ │ ├── MatrixBase_cwiseMax.cpp │ │ ├── MatrixBase_cwiseMin.cpp │ │ ├── MatrixBase_cwiseNotEqual.cpp │ │ ├── MatrixBase_cwiseProduct.cpp │ │ ├── MatrixBase_cwiseQuotient.cpp │ │ ├── MatrixBase_cwiseSqrt.cpp │ │ ├── MatrixBase_diagonal.cpp │ │ ├── MatrixBase_diagonal_int.cpp │ │ ├── MatrixBase_diagonal_template_int.cpp │ │ ├── MatrixBase_eigenvalues.cpp │ │ ├── MatrixBase_end_int.cpp │ │ ├── MatrixBase_eval.cpp │ │ ├── MatrixBase_extract.cpp │ │ ├── MatrixBase_fixedBlock_int_int.cpp │ │ ├── MatrixBase_identity.cpp │ │ ├── MatrixBase_identity_int_int.cpp │ │ ├── MatrixBase_inverse.cpp │ │ ├── MatrixBase_isDiagonal.cpp │ │ ├── MatrixBase_isIdentity.cpp │ │ ├── MatrixBase_isOnes.cpp │ │ ├── MatrixBase_isOrthogonal.cpp │ │ ├── MatrixBase_isUnitary.cpp │ │ ├── MatrixBase_isZero.cpp │ │ ├── MatrixBase_leftCols_int.cpp │ │ ├── MatrixBase_marked.cpp │ │ ├── MatrixBase_noalias.cpp │ │ ├── MatrixBase_ones.cpp │ │ ├── MatrixBase_ones_int.cpp │ │ ├── MatrixBase_ones_int_int.cpp │ │ ├── MatrixBase_operatorNorm.cpp │ │ ├── MatrixBase_part.cpp │ │ ├── MatrixBase_prod.cpp │ │ ├── MatrixBase_random.cpp │ │ ├── MatrixBase_random_int.cpp │ │ ├── MatrixBase_random_int_int.cpp │ │ ├── MatrixBase_replicate.cpp │ │ ├── MatrixBase_replicate_int_int.cpp │ │ ├── MatrixBase_reverse.cpp │ │ ├── MatrixBase_rightCols_int.cpp │ │ ├── MatrixBase_row.cpp │ │ ├── MatrixBase_rowwise.cpp │ │ ├── MatrixBase_segment_int_int.cpp │ │ ├── MatrixBase_select.cpp │ │ ├── MatrixBase_set.cpp │ │ ├── MatrixBase_setIdentity.cpp │ │ ├── MatrixBase_setOnes.cpp │ │ ├── MatrixBase_setRandom.cpp │ │ ├── MatrixBase_setZero.cpp │ │ ├── MatrixBase_start_int.cpp │ │ ├── MatrixBase_template_int_bottomRows.cpp │ │ ├── MatrixBase_template_int_end.cpp │ │ ├── MatrixBase_template_int_int_block_int_int_int_int.cpp │ │ ├── MatrixBase_template_int_int_bottomLeftCorner.cpp │ │ ├── MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp │ │ ├── MatrixBase_template_int_int_bottomRightCorner.cpp │ │ ├── MatrixBase_template_int_int_bottomRightCorner_int_int.cpp │ │ ├── MatrixBase_template_int_int_topLeftCorner.cpp │ │ ├── MatrixBase_template_int_int_topLeftCorner_int_int.cpp │ │ ├── MatrixBase_template_int_int_topRightCorner.cpp │ │ ├── MatrixBase_template_int_int_topRightCorner_int_int.cpp │ │ ├── MatrixBase_template_int_leftCols.cpp │ │ ├── MatrixBase_template_int_rightCols.cpp │ │ ├── MatrixBase_template_int_segment.cpp │ │ ├── MatrixBase_template_int_start.cpp │ │ ├── MatrixBase_template_int_topRows.cpp │ │ ├── MatrixBase_topLeftCorner_int_int.cpp │ │ ├── MatrixBase_topRightCorner_int_int.cpp │ │ ├── MatrixBase_topRows_int.cpp │ │ ├── MatrixBase_transpose.cpp │ │ ├── MatrixBase_zero.cpp │ │ ├── MatrixBase_zero_int.cpp │ │ ├── MatrixBase_zero_int_int.cpp │ │ ├── Matrix_resize_NoChange_int.cpp │ │ ├── Matrix_resize_int.cpp │ │ ├── Matrix_resize_int_NoChange.cpp │ │ ├── Matrix_resize_int_int.cpp │ │ ├── Matrix_setConstant_int.cpp │ │ ├── Matrix_setConstant_int_int.cpp │ │ ├── Matrix_setIdentity_int_int.cpp │ │ ├── Matrix_setOnes_int.cpp │ │ ├── Matrix_setOnes_int_int.cpp │ │ ├── Matrix_setRandom_int.cpp │ │ ├── Matrix_setRandom_int_int.cpp │ │ ├── Matrix_setZero_int.cpp │ │ ├── Matrix_setZero_int_int.cpp │ │ ├── PartialPivLU_solve.cpp │ │ ├── PartialRedux_count.cpp │ │ ├── PartialRedux_maxCoeff.cpp │ │ ├── PartialRedux_minCoeff.cpp │ │ ├── PartialRedux_norm.cpp │ │ ├── PartialRedux_prod.cpp │ │ ├── PartialRedux_squaredNorm.cpp │ │ ├── PartialRedux_sum.cpp │ │ ├── RealQZ_compute.cpp │ │ ├── RealSchur_RealSchur_MatrixType.cpp │ │ ├── RealSchur_compute.cpp │ │ ├── SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp │ │ ├── SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp │ │ ├── SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType2.cpp │ │ ├── SelfAdjointEigenSolver_compute_MatrixType.cpp │ │ ├── SelfAdjointEigenSolver_compute_MatrixType2.cpp │ │ ├── SelfAdjointEigenSolver_eigenvalues.cpp │ │ ├── SelfAdjointEigenSolver_eigenvectors.cpp │ │ ├── SelfAdjointEigenSolver_operatorInverseSqrt.cpp │ │ ├── SelfAdjointEigenSolver_operatorSqrt.cpp │ │ ├── SelfAdjointView_eigenvalues.cpp │ │ ├── SelfAdjointView_operatorNorm.cpp │ │ ├── TopicAliasing_block.cpp │ │ ├── TopicAliasing_block_correct.cpp │ │ ├── TopicAliasing_cwise.cpp │ │ ├── TopicAliasing_mult1.cpp │ │ ├── TopicAliasing_mult2.cpp │ │ ├── TopicAliasing_mult3.cpp │ │ ├── TopicStorageOrders_example.cpp │ │ ├── Tridiagonalization_Tridiagonalization_MatrixType.cpp │ │ ├── Tridiagonalization_compute.cpp │ │ ├── Tridiagonalization_decomposeInPlace.cpp │ │ ├── Tridiagonalization_diagonal.cpp │ │ ├── Tridiagonalization_householderCoefficients.cpp │ │ ├── Tridiagonalization_packedMatrix.cpp │ │ ├── Tutorial_AdvancedInitialization_Block.cpp │ │ ├── Tutorial_AdvancedInitialization_CommaTemporary.cpp │ │ ├── Tutorial_AdvancedInitialization_Join.cpp │ │ ├── Tutorial_AdvancedInitialization_LinSpaced.cpp │ │ ├── Tutorial_AdvancedInitialization_ThreeWays.cpp │ │ ├── Tutorial_AdvancedInitialization_Zero.cpp │ │ ├── Tutorial_Map_rowmajor.cpp │ │ ├── Tutorial_Map_using.cpp │ │ ├── Tutorial_commainit_01.cpp │ │ ├── Tutorial_commainit_01b.cpp │ │ ├── Tutorial_commainit_02.cpp │ │ ├── Tutorial_solve_matrix_inverse.cpp │ │ ├── Tutorial_solve_multiple_rhs.cpp │ │ ├── Tutorial_solve_reuse_decomposition.cpp │ │ ├── Tutorial_solve_singular.cpp │ │ ├── Tutorial_solve_triangular.cpp │ │ ├── Tutorial_solve_triangular_inplace.cpp │ │ ├── Vectorwise_reverse.cpp │ │ ├── class_FullPivLU.cpp │ │ ├── compile_snippet.cpp.in │ │ ├── tut_arithmetic_redux_minmax.cpp │ │ ├── tut_arithmetic_transpose_aliasing.cpp │ │ ├── tut_arithmetic_transpose_conjugate.cpp │ │ ├── tut_arithmetic_transpose_inplace.cpp │ │ └── tut_matrix_assignment_resizing.cpp │ ├── special_examples │ │ ├── Tutorial_sparse_example.cpp │ │ └── Tutorial_sparse_example_details.cpp │ └── tutorial.cpp │ ├── eigen3.pc.in │ ├── failtest │ ├── block_nonconst_ctor_on_const_xpr_0.cpp │ ├── block_nonconst_ctor_on_const_xpr_1.cpp │ ├── block_nonconst_ctor_on_const_xpr_2.cpp │ ├── block_on_const_type_actually_const_0.cpp │ ├── block_on_const_type_actually_const_1.cpp │ ├── const_qualified_block_method_retval_0.cpp │ ├── const_qualified_block_method_retval_1.cpp │ ├── const_qualified_diagonal_method_retval.cpp │ ├── const_qualified_transpose_method_retval.cpp │ ├── diagonal_nonconst_ctor_on_const_xpr.cpp │ ├── diagonal_on_const_type_actually_const.cpp │ ├── failtest_sanity_check.cpp │ ├── map_nonconst_ctor_on_const_ptr_0.cpp │ ├── map_nonconst_ctor_on_const_ptr_1.cpp │ ├── map_nonconst_ctor_on_const_ptr_2.cpp │ ├── map_nonconst_ctor_on_const_ptr_3.cpp │ ├── map_nonconst_ctor_on_const_ptr_4.cpp │ ├── map_on_const_type_actually_const_0.cpp │ ├── map_on_const_type_actually_const_1.cpp │ ├── ref_1.cpp │ ├── ref_2.cpp │ ├── ref_3.cpp │ ├── ref_4.cpp │ ├── ref_5.cpp │ ├── transpose_nonconst_ctor_on_const_xpr.cpp │ └── transpose_on_const_type_actually_const.cpp │ ├── lapack │ ├── cholesky.cpp │ ├── clacgv.f │ ├── cladiv.f │ ├── clarf.f │ ├── clarfb.f │ ├── clarfg.f │ ├── clarft.f │ ├── complex_double.cpp │ ├── complex_single.cpp │ ├── dladiv.f │ ├── dlamch.f │ ├── dlapy2.f │ ├── dlapy3.f │ ├── dlarf.f │ ├── dlarfb.f │ ├── dlarfg.f │ ├── dlarft.f │ ├── double.cpp │ ├── dsecnd_NONE.f │ ├── eigenvalues.cpp │ ├── ilaclc.f │ ├── ilaclr.f │ ├── iladlc.f │ ├── iladlr.f │ ├── ilaslc.f │ ├── ilaslr.f │ ├── ilazlc.f │ ├── ilazlr.f │ ├── lapack_common.h │ ├── lu.cpp │ ├── second_NONE.f │ ├── single.cpp │ ├── sladiv.f │ ├── slamch.f │ ├── slapy2.f │ ├── slapy3.f │ ├── slarf.f │ ├── slarfb.f │ ├── slarfg.f │ ├── slarft.f │ ├── zlacgv.f │ ├── zladiv.f │ ├── zlarf.f │ ├── zlarfb.f │ ├── zlarfg.f │ └── zlarft.f │ ├── scripts │ ├── buildtests.in │ ├── cdashtesting.cmake.in │ ├── check.in │ ├── debug.in │ ├── eigen_gen_credits.cpp │ ├── eigen_gen_docs │ ├── release.in │ └── relicense.py │ ├── signature_of_eigen3_matrix_library │ ├── test │ ├── adjoint.cpp │ ├── array.cpp │ ├── array_for_matrix.cpp │ ├── array_replicate.cpp │ ├── array_reverse.cpp │ ├── bandmatrix.cpp │ ├── basicstuff.cpp │ ├── bicgstab.cpp │ ├── block.cpp │ ├── cholesky.cpp │ ├── cholmod_support.cpp │ ├── commainitializer.cpp │ ├── conjugate_gradient.cpp │ ├── conservative_resize.cpp │ ├── corners.cpp │ ├── cwiseop.cpp │ ├── denseLM.cpp │ ├── determinant.cpp │ ├── diagonal.cpp │ ├── diagonalmatrices.cpp │ ├── dontalign.cpp │ ├── dynalloc.cpp │ ├── eigen2 │ │ ├── eigen2_adjoint.cpp │ │ ├── eigen2_alignedbox.cpp │ │ ├── eigen2_array.cpp │ │ ├── eigen2_basicstuff.cpp │ │ ├── eigen2_bug_132.cpp │ │ ├── eigen2_cholesky.cpp │ │ ├── eigen2_commainitializer.cpp │ │ ├── eigen2_cwiseop.cpp │ │ ├── eigen2_determinant.cpp │ │ ├── eigen2_dynalloc.cpp │ │ ├── eigen2_eigensolver.cpp │ │ ├── eigen2_first_aligned.cpp │ │ ├── eigen2_geometry.cpp │ │ ├── eigen2_geometry_with_eigen2_prefix.cpp │ │ ├── eigen2_hyperplane.cpp │ │ ├── eigen2_inverse.cpp │ │ ├── eigen2_linearstructure.cpp │ │ ├── eigen2_lu.cpp │ │ ├── eigen2_map.cpp │ │ ├── eigen2_meta.cpp │ │ ├── eigen2_miscmatrices.cpp │ │ ├── eigen2_mixingtypes.cpp │ │ ├── eigen2_newstdvector.cpp │ │ ├── eigen2_nomalloc.cpp │ │ ├── eigen2_packetmath.cpp │ │ ├── eigen2_parametrizedline.cpp │ │ ├── eigen2_prec_inverse_4x4.cpp │ │ ├── eigen2_product_large.cpp │ │ ├── eigen2_product_small.cpp │ │ ├── eigen2_qr.cpp │ │ ├── eigen2_qtvector.cpp │ │ ├── eigen2_regression.cpp │ │ ├── eigen2_sizeof.cpp │ │ ├── eigen2_smallvectors.cpp │ │ ├── eigen2_sparse_basic.cpp │ │ ├── eigen2_sparse_product.cpp │ │ ├── eigen2_sparse_solvers.cpp │ │ ├── eigen2_sparse_vector.cpp │ │ ├── eigen2_stdvector.cpp │ │ ├── eigen2_submatrices.cpp │ │ ├── eigen2_sum.cpp │ │ ├── eigen2_svd.cpp │ │ ├── eigen2_swap.cpp │ │ ├── eigen2_triangular.cpp │ │ ├── eigen2_unalignedassert.cpp │ │ ├── eigen2_visitor.cpp │ │ ├── gsl_helper.h │ │ ├── main.h │ │ ├── product.h │ │ ├── runtest.sh │ │ ├── sparse.h │ │ └── testsuite.cmake │ ├── eigen2support.cpp │ ├── eigensolver_complex.cpp │ ├── eigensolver_generalized_real.cpp │ ├── eigensolver_generic.cpp │ ├── eigensolver_selfadjoint.cpp │ ├── exceptions.cpp │ ├── first_aligned.cpp │ ├── geo_alignedbox.cpp │ ├── geo_eulerangles.cpp │ ├── geo_homogeneous.cpp │ ├── geo_hyperplane.cpp │ ├── geo_orthomethods.cpp │ ├── geo_parametrizedline.cpp │ ├── geo_quaternion.cpp │ ├── geo_transformations.cpp │ ├── hessenberg.cpp │ ├── householder.cpp │ ├── integer_types.cpp │ ├── inverse.cpp │ ├── jacobi.cpp │ ├── jacobisvd.cpp │ ├── linearstructure.cpp │ ├── lu.cpp │ ├── main.h │ ├── mapped_matrix.cpp │ ├── mapstaticmethods.cpp │ ├── mapstride.cpp │ ├── meta.cpp │ ├── metis_support.cpp │ ├── miscmatrices.cpp │ ├── mixingtypes.cpp │ ├── nesting_ops.cpp │ ├── nomalloc.cpp │ ├── nullary.cpp │ ├── packetmath.cpp │ ├── pardiso_support.cpp │ ├── pastix_support.cpp │ ├── permutationmatrices.cpp │ ├── prec_inverse_4x4.cpp │ ├── product.h │ ├── product_extra.cpp │ ├── product_large.cpp │ ├── product_mmtr.cpp │ ├── product_notemporary.cpp │ ├── product_selfadjoint.cpp │ ├── product_small.cpp │ ├── product_symm.cpp │ ├── product_syrk.cpp │ ├── product_trmm.cpp │ ├── product_trmv.cpp │ ├── product_trsolve.cpp │ ├── qr.cpp │ ├── qr_colpivoting.cpp │ ├── qr_fullpivoting.cpp │ ├── qtvector.cpp │ ├── real_qz.cpp │ ├── redux.cpp │ ├── ref.cpp │ ├── resize.cpp │ ├── runtest.sh │ ├── schur_complex.cpp │ ├── schur_real.cpp │ ├── selfadjoint.cpp │ ├── simplicial_cholesky.cpp │ ├── sizeof.cpp │ ├── sizeoverflow.cpp │ ├── smallvectors.cpp │ ├── sparse.h │ ├── sparseLM.cpp │ ├── sparse_basic.cpp │ ├── sparse_permutations.cpp │ ├── sparse_product.cpp │ ├── sparse_solver.h │ ├── sparse_solvers.cpp │ ├── sparse_vector.cpp │ ├── sparselu.cpp │ ├── sparseqr.cpp │ ├── special_numbers.cpp │ ├── spqr_support.cpp │ ├── stable_norm.cpp │ ├── stddeque.cpp │ ├── stdlist.cpp │ ├── stdvector.cpp │ ├── stdvector_overload.cpp │ ├── superlu_support.cpp │ ├── swap.cpp │ ├── testsuite.cmake │ ├── triangular.cpp │ ├── umeyama.cpp │ ├── umfpack_support.cpp │ ├── unalignedassert.cpp │ ├── unalignedcount.cpp │ ├── upperbidiagonalization.cpp │ ├── vectorization_logic.cpp │ ├── vectorwiseop.cpp │ ├── visitor.cpp │ └── zerosized.cpp │ └── unsupported │ ├── Eigen │ ├── AdolcForward │ ├── AlignedVector3 │ ├── ArpackSupport │ ├── AutoDiff │ ├── BVH │ ├── FFT │ ├── IterativeSolvers │ ├── KroneckerProduct │ ├── LevenbergMarquardt │ ├── MPRealSupport │ ├── MatrixFunctions │ ├── MoreVectorization │ ├── NonLinearOptimization │ ├── NumericalDiff │ ├── OpenGLSupport │ ├── Polynomials │ ├── SVD │ ├── Skyline │ ├── SparseExtra │ ├── Splines │ └── src │ │ ├── AutoDiff │ │ ├── AutoDiffJacobian.h │ │ ├── AutoDiffScalar.h │ │ └── AutoDiffVector.h │ │ ├── BVH │ │ ├── BVAlgorithms.h │ │ └── KdBVH.h │ │ ├── Eigenvalues │ │ └── ArpackSelfAdjointEigenSolver.h │ │ ├── FFT │ │ ├── ei_fftw_impl.h │ │ └── ei_kissfft_impl.h │ │ ├── IterativeSolvers │ │ ├── ConstrainedConjGrad.h │ │ ├── DGMRES.h │ │ ├── GMRES.h │ │ ├── IncompleteCholesky.h │ │ ├── IncompleteLU.h │ │ ├── IterationController.h │ │ ├── MINRES.h │ │ └── Scaling.h │ │ ├── KroneckerProduct │ │ └── KroneckerTensorProduct.h │ │ ├── LevenbergMarquardt │ │ ├── LMcovar.h │ │ ├── LMonestep.h │ │ ├── LMpar.h │ │ ├── LMqrsolv.h │ │ └── LevenbergMarquardt.h │ │ ├── MatrixFunctions │ │ ├── MatrixExponential.h │ │ ├── MatrixFunction.h │ │ ├── MatrixFunctionAtomic.h │ │ ├── MatrixLogarithm.h │ │ ├── MatrixPower.h │ │ ├── MatrixSquareRoot.h │ │ └── StemFunction.h │ │ ├── MoreVectorization │ │ └── MathFunctions.h │ │ ├── NonLinearOptimization │ │ ├── HybridNonLinearSolver.h │ │ ├── LevenbergMarquardt.h │ │ ├── chkder.h │ │ ├── covar.h │ │ ├── dogleg.h │ │ ├── fdjac1.h │ │ ├── lmpar.h │ │ ├── qrsolv.h │ │ ├── r1mpyq.h │ │ ├── r1updt.h │ │ └── rwupdt.h │ │ ├── NumericalDiff │ │ └── NumericalDiff.h │ │ ├── Polynomials │ │ ├── Companion.h │ │ ├── PolynomialSolver.h │ │ └── PolynomialUtils.h │ │ ├── SVD │ │ ├── BDCSVD.h │ │ ├── JacobiSVD.h │ │ └── SVDBase.h │ │ ├── Skyline │ │ ├── SkylineInplaceLU.h │ │ ├── SkylineMatrix.h │ │ ├── SkylineMatrixBase.h │ │ ├── SkylineProduct.h │ │ ├── SkylineStorage.h │ │ └── SkylineUtil.h │ │ ├── SparseExtra │ │ ├── BlockOfDynamicSparseMatrix.h │ │ ├── DynamicSparseMatrix.h │ │ ├── MarketIO.h │ │ ├── MatrixMarketIterator.h │ │ └── RandomSetter.h │ │ └── Splines │ │ ├── Spline.h │ │ ├── SplineFitting.h │ │ └── SplineFwd.h │ ├── bench │ └── bench_svd.cpp │ ├── doc │ ├── Overview.dox │ ├── eigendoxy_layout.xml.in │ └── examples │ │ ├── BVH_Example.cpp │ │ ├── FFT.cpp │ │ ├── MatrixExponential.cpp │ │ ├── MatrixFunction.cpp │ │ ├── MatrixLogarithm.cpp │ │ ├── MatrixPower.cpp │ │ ├── MatrixPower_optimal.cpp │ │ ├── MatrixSine.cpp │ │ ├── MatrixSinh.cpp │ │ ├── MatrixSquareRoot.cpp │ │ ├── PolynomialSolver1.cpp │ │ └── PolynomialUtils1.cpp │ └── test │ ├── BVH.cpp │ ├── FFT.cpp │ ├── FFTW.cpp │ ├── NonLinearOptimization.cpp │ ├── NumericalDiff.cpp │ ├── alignedvector3.cpp │ ├── autodiff.cpp │ ├── bdcsvd.cpp │ ├── dgmres.cpp │ ├── forward_adolc.cpp │ ├── gmres.cpp │ ├── jacobisvd.cpp │ ├── kronecker_product.cpp │ ├── levenberg_marquardt.cpp │ ├── matrix_exponential.cpp │ ├── matrix_function.cpp │ ├── matrix_functions.h │ ├── matrix_power.cpp │ ├── matrix_square_root.cpp │ ├── minres.cpp │ ├── mpreal │ └── mpreal.h │ ├── mpreal_support.cpp │ ├── openglsupport.cpp │ ├── polynomialsolver.cpp │ ├── polynomialutils.cpp │ ├── sparse_extra.cpp │ ├── splines.cpp │ └── svd_common.h ├── docs └── Doxyfile ├── eigenmat ├── .gitignore ├── Makefile ├── common.h ├── cpumat_conv.cc ├── cpumat_conv.h ├── eigenmat.cc └── eigenmat.h ├── examples ├── data │ └── .gitignore ├── data_prep │ ├── README.md │ └── test_images.txt ├── imagenet │ ├── CLS_net_20140621074703.pbtxt │ ├── CLS_net_20140801232522.pbtxt │ ├── CLS_train.pbtxt │ ├── CLS_valid.pbtxt │ ├── README.md │ ├── class_names_CLS.txt │ ├── cpu_out │ │ └── .gitignore │ ├── feature_config.pbtxt │ ├── feature_config_avg10.pbtxt │ ├── pixel_mean.h5 │ ├── sample_output.txt │ ├── test_images.pbtxt │ ├── test_images.txt │ └── test_images │ │ ├── 0.jpg │ │ ├── 1.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ ├── 6.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ └── 9.jpg ├── mnist-conv │ ├── README.md │ ├── checkpoint_dir │ │ └── .gitignore │ ├── feature_config.pbtxt │ ├── net.pbtxt │ ├── test_data.pbtxt │ ├── train_data.pbtxt │ ├── train_plus_val_data.pbtxt │ └── val_data.pbtxt └── mnist-ff │ ├── README.md │ ├── checkpoint_dir │ └── .gitignore │ ├── feature_config.pbtxt │ ├── net.pbtxt │ ├── test_data.pbtxt │ ├── train_data.pbtxt │ ├── train_plus_val_data.pbtxt │ └── val_data.pbtxt ├── obj ├── .gitignore └── cpu │ └── .gitignore ├── proto └── convnet_config.proto ├── py ├── README.md ├── conv_autoencoder.py ├── conv_cpu.py ├── convnet.py ├── data_handler.py ├── edge.py ├── layer.py ├── perf_stats.py ├── run_convnet.py ├── test_conv.py └── util.py └── src ├── CPUMatrix.cc ├── CPUMatrix.h ├── avgpool_edge.cc ├── avgpool_edge.h ├── conv_edge.cc ├── conv_edge.h ├── conv_onetoone_edge.cc ├── conv_onetoone_edge.h ├── convnet.cc ├── convnet.h ├── datahandler.cc ├── datahandler.h ├── datawriter.cc ├── datawriter.h ├── downsample_edge.cc ├── downsample_edge.h ├── edge.cc ├── edge.h ├── edge_with_weight.cc ├── edge_with_weight.h ├── fc_edge.cc ├── fc_edge.h ├── grad_check.cc ├── grad_check.h ├── image_iterators.cc ├── image_iterators.h ├── layer.cc ├── layer.h ├── local_edge.cc ├── local_edge.h ├── loss_functions.cc ├── loss_functions.h ├── matrix.cc ├── matrix.h ├── maxpool_edge.cc ├── maxpool_edge.h ├── multigpu_convnet.cc ├── multigpu_convnet.h ├── optimizer.cc ├── optimizer.h ├── response_norm_edge.cc ├── response_norm_edge.h ├── rgb_to_yuv_edge.cc ├── rgb_to_yuv_edge.h ├── upsample_edge.cc ├── upsample_edge.h ├── util.cc ├── util.h ├── video_iterators.cc └── video_iterators.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Compiled Dynamic libraries 8 | *.so 9 | *.dylib 10 | *.dll 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | *.lib 17 | 18 | # Executables 19 | *.exe 20 | *.out 21 | *.app 22 | 23 | # Compiled protobuffers 24 | *.pb.cc 25 | *.pb.h 26 | *_pb2.py 27 | 28 | html/ 29 | -------------------------------------------------------------------------------- /apps/run_grad_check.cc: -------------------------------------------------------------------------------- 1 | #include "grad_check.h" 2 | #include 3 | using namespace std; 4 | 5 | int main(int argc, char** argv) { 6 | #ifdef USE_MPI 7 | MPI_Init(&argc, &argv); 8 | #endif 9 | int board = atoi(argv[1]); 10 | string model_file(argv[2]); 11 | string output_file(argv[3]); 12 | int batchsize = argc > 4 ? atoi(argv[4]) : 128; 13 | 14 | Matrix::SetupCUDADevice(board); 15 | cout << "Using board " << board << endl; 16 | 17 | GradChecker gcheck = GradChecker(model_file); 18 | gcheck.SetBatchsize(batchsize); 19 | gcheck.AllocateMemory(false); 20 | gcheck.Run(output_file); 21 | 22 | #ifdef USE_MPI 23 | MPI_Finalize(); 24 | #endif 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /apps/show_plots.py: -------------------------------------------------------------------------------- 1 | import glob 2 | import matplotlib.pyplot as plt 3 | import numpy as np 4 | import sys 5 | 6 | plt.ion() 7 | 8 | data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_train.log')) 9 | valid_data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_valid.log')) 10 | 11 | for fname in data_files: 12 | data = np.loadtxt(fname).reshape(-1, 3) 13 | name = fname.split('/')[-1] 14 | plt.plot(data[:, 0], 1-data[:, 2], label=name) 15 | 16 | for fname in valid_data_files: 17 | data = np.loadtxt(fname).reshape(-1, 2) 18 | name = fname.split('/')[-1] 19 | plt.plot(data[:, 0], 1-data[:, 1], label=name) 20 | 21 | plt.legend(loc=1) 22 | 23 | raw_input('Press Enter.') 24 | -------------------------------------------------------------------------------- /apps/show_results.py: -------------------------------------------------------------------------------- 1 | import h5py 2 | import numpy as np 3 | import sys 4 | import os 5 | 6 | pred_file = sys.argv[1] 7 | print os.path.splitext(pred_file) 8 | if os.path.splitext(pred_file)[1] == '.txt': 9 | predictions = np.loadtxt(pred_file) 10 | else: 11 | predictions = h5py.File(pred_file, 'r')['output'].value 12 | class_names = [] 13 | for line in open('class_names_CLS.txt', 'r'): 14 | class_names.append(line.strip()) 15 | K = 10 16 | for i in xrange(predictions.shape[0]): 17 | print '----------------' 18 | p = predictions[i, :] 19 | p_sorted = (-p).argsort() 20 | for label in p_sorted[:K]: 21 | print class_names[label], p[label] 22 | 23 | 24 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /cudamat/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *.pyc 4 | cudamat_experimental.* 5 | test_cudamat_experimental.* 6 | -------------------------------------------------------------------------------- /cudamat/__init__.py: -------------------------------------------------------------------------------- 1 | from cudamat import * 2 | -------------------------------------------------------------------------------- /deps/CImg/Licence_CeCILL-C_V1-en.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/Licence_CeCILL-C_V1-en.txt -------------------------------------------------------------------------------- /deps/CImg/Licence_CeCILL_V2-en.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/Licence_CeCILL_V2-en.txt -------------------------------------------------------------------------------- /deps/CImg/examples/CImg_demo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/CImg_demo -------------------------------------------------------------------------------- /deps/CImg/examples/captcha: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/captcha -------------------------------------------------------------------------------- /deps/CImg/examples/curve_editor2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/curve_editor2d -------------------------------------------------------------------------------- /deps/CImg/examples/dtmri_view3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/dtmri_view3d -------------------------------------------------------------------------------- /deps/CImg/examples/edge_explorer2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/edge_explorer2d -------------------------------------------------------------------------------- /deps/CImg/examples/fade_images: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/fade_images -------------------------------------------------------------------------------- /deps/CImg/examples/gaussian_fit1d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/gaussian_fit1d -------------------------------------------------------------------------------- /deps/CImg/examples/generate_loop_macros: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/generate_loop_macros -------------------------------------------------------------------------------- /deps/CImg/examples/hough_transform2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/hough_transform2d -------------------------------------------------------------------------------- /deps/CImg/examples/image2ascii: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/image2ascii -------------------------------------------------------------------------------- /deps/CImg/examples/image_registration2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/image_registration2d -------------------------------------------------------------------------------- /deps/CImg/examples/image_surface3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/image_surface3d -------------------------------------------------------------------------------- /deps/CImg/examples/img/lena.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/lena.pgm -------------------------------------------------------------------------------- /deps/CImg/examples/img/logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/logo.bmp -------------------------------------------------------------------------------- /deps/CImg/examples/img/milla.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/milla.bmp -------------------------------------------------------------------------------- /deps/CImg/examples/img/parrot_mask.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/parrot_mask.pgm -------------------------------------------------------------------------------- /deps/CImg/examples/img/parrot_original.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/parrot_original.ppm -------------------------------------------------------------------------------- /deps/CImg/examples/img/sh0r.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/sh0r.pgm -------------------------------------------------------------------------------- /deps/CImg/examples/img/sh1r.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/img/sh1r.pgm -------------------------------------------------------------------------------- /deps/CImg/examples/jawbreaker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/jawbreaker -------------------------------------------------------------------------------- /deps/CImg/examples/mcf_levelsets2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/mcf_levelsets2d -------------------------------------------------------------------------------- /deps/CImg/examples/mcf_levelsets3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/mcf_levelsets3d -------------------------------------------------------------------------------- /deps/CImg/examples/odykill: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/odykill -------------------------------------------------------------------------------- /deps/CImg/examples/pde_TschumperleDeriche2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/pde_TschumperleDeriche2d -------------------------------------------------------------------------------- /deps/CImg/examples/pde_heatflow2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/pde_heatflow2d -------------------------------------------------------------------------------- /deps/CImg/examples/plotter1d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/plotter1d -------------------------------------------------------------------------------- /deps/CImg/examples/radon_transform2d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/radon_transform2d -------------------------------------------------------------------------------- /deps/CImg/examples/scene3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/scene3d -------------------------------------------------------------------------------- /deps/CImg/examples/spherical_function3d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/spherical_function3d -------------------------------------------------------------------------------- /deps/CImg/examples/tetris: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/tetris -------------------------------------------------------------------------------- /deps/CImg/examples/tron: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/tron -------------------------------------------------------------------------------- /deps/CImg/examples/tutorial: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/tutorial -------------------------------------------------------------------------------- /deps/CImg/examples/use_RGBclass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/use_RGBclass -------------------------------------------------------------------------------- /deps/CImg/examples/use_chlpca: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/use_chlpca -------------------------------------------------------------------------------- /deps/CImg/examples/use_draw_gradient: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/use_draw_gradient -------------------------------------------------------------------------------- /deps/CImg/examples/use_nlmeans: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/use_nlmeans -------------------------------------------------------------------------------- /deps/CImg/examples/use_skeleton: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/use_skeleton -------------------------------------------------------------------------------- /deps/CImg/examples/wavelet_atrous: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/examples/wavelet_atrous -------------------------------------------------------------------------------- /deps/CImg/resources/CImg.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr 2 | exec_prefix=/usr 3 | includedir=/usr/include/CImg 4 | 5 | Name: CImg 6 | Description: C++ Template Image Processing Toolkit 7 | Version: 1.5.0 8 | Cflags: -I${includedir} 9 | -------------------------------------------------------------------------------- /deps/CImg/resources/compile_win_icl.bat: -------------------------------------------------------------------------------- 1 | REM ---------------------------------------------------------------- 2 | REM 3 | REM Script to compile CImg examples, using Intel ICL C++ Compiler. 4 | REM 5 | REM ---------------------------------------------------------------- 6 | 7 | CD ..\examples\ 8 | SET CPPFILE=CImg_demo captcha curve_editor2d dtmri_view3d edge_explorer2d fade_images gaussian_fit1d generate_loop_macros hough_transform2d image2ascii image_registration2d image_surface3d jawbreaker mcf_levelsets2d mcf_levelsets3d odykill pde_heatflow2d pde_TschumperleDeriche2d plotter1d radon_transform2d scene3d spherical_function3d tetris tron tutorial wavelet_atrous use_draw_gradient use_nlmeans use_RGBclass use_skeleton 9 | 10 | FOR %%F IN (%CPPFILE%) DO ( 11 | icl /I.. /GX /Ox %%F.cpp gdi32.lib user32.lib 12 | ) 13 | -------------------------------------------------------------------------------- /deps/CImg/resources/debian/changelog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/resources/debian/changelog -------------------------------------------------------------------------------- /deps/CImg/resources/debian/cimg-dev.dirs: -------------------------------------------------------------------------------- 1 | usr/include/CImg 2 | usr/include 3 | usr/share/CImg 4 | -------------------------------------------------------------------------------- /deps/CImg/resources/debian/cimg-dev.install: -------------------------------------------------------------------------------- 1 | CImg.h resources html examples plugins CHANGES.txt README.txt usr/share/CImg 2 | CImg.h plugins usr/include/CImg 3 | README.txt usr/share/doc/cimg-dev 4 | -------------------------------------------------------------------------------- /deps/CImg/resources/debian/cimg-dev.links: -------------------------------------------------------------------------------- 1 | usr/include/CImg/CImg.h usr/include/CImg.h 2 | usr/share/CImg/html usr/share/doc/cimg-dev/html 3 | 4 | -------------------------------------------------------------------------------- /deps/CImg/resources/debian/compat: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /deps/CImg/resources/debian/control: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/resources/debian/control -------------------------------------------------------------------------------- /deps/CImg/resources/debian/copyright: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/resources/debian/copyright -------------------------------------------------------------------------------- /deps/CImg/resources/debian/docs: -------------------------------------------------------------------------------- 1 | changelog 2 | -------------------------------------------------------------------------------- /deps/CImg/resources/project_win_visualcpp/project_win_visualcpp.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/resources/project_win_visualcpp/project_win_visualcpp.suo -------------------------------------------------------------------------------- /deps/CImg/resources/project_win_visualcpp/project_win_visualcpp.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/CImg/resources/project_win_visualcpp/project_win_visualcpp.vcproj -------------------------------------------------------------------------------- /deps/eigen/.hgeol: -------------------------------------------------------------------------------- 1 | [patterns] 2 | scripts/*.in = LF 3 | debug/msvc/*.dat = CRLF 4 | unsupported/test/mpreal/*.* = CRLF 5 | ** = native 6 | 7 | [repository] 8 | native = LF 9 | -------------------------------------------------------------------------------- /deps/eigen/.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | qrc_*cxx 3 | *.orig 4 | *.pyc 5 | *.diff 6 | diff 7 | *.save 8 | save 9 | *.old 10 | *.gmo 11 | *.qm 12 | core 13 | core.* 14 | *.bak 15 | *~ 16 | build* 17 | *.moc.* 18 | *.moc 19 | ui_* 20 | CMakeCache.txt 21 | tags 22 | .*.swp 23 | activity.png 24 | *.out 25 | *.php* 26 | *.log 27 | *.orig 28 | *.rej 29 | log 30 | patch 31 | a 32 | a.* 33 | -------------------------------------------------------------------------------- /deps/eigen/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | ## This file should be placed in the root directory of your project. 2 | ## Then modify the CMakeLists.txt file in the root directory of your 3 | ## project to incorporate the testing dashboard. 4 | ## # The following are required to uses Dart and the Cdash dashboard 5 | ## ENABLE_TESTING() 6 | ## INCLUDE(CTest) 7 | set(CTEST_PROJECT_NAME "Eigen3.2") 8 | set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC") 9 | 10 | set(CTEST_DROP_METHOD "http") 11 | set(CTEST_DROP_SITE "manao.inria.fr") 12 | set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen3.2") 13 | set(CTEST_DROP_SITE_CDASH TRUE) 14 | -------------------------------------------------------------------------------- /deps/eigen/CTestCustom.cmake.in: -------------------------------------------------------------------------------- 1 | 2 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "2000") 3 | set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "2000") 4 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Householder_Module Householder module 9 | * This module provides Householder transformations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | */ 15 | 16 | #include "src/Householder/Householder.h" 17 | #include "src/Householder/HouseholderSequence.h" 18 | #include "src/Householder/BlockHouseholder.h" 19 | 20 | #include "src/Core/util/ReenableStupidWarnings.h" 21 | 22 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 23 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 24 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Jacobi_Module Jacobi module 9 | * This module provides Jacobi and Givens rotations. 10 | * 11 | * \code 12 | * #include 13 | * \endcode 14 | * 15 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 16 | * - MatrixBase::applyOnTheLeft() 17 | * - MatrixBase::applyOnTheRight(). 18 | */ 19 | 20 | #include "src/Jacobi/Jacobi.h" 21 | 22 | #include "src/Core/util/ReenableStupidWarnings.h" 23 | 24 | #endif // EIGEN_JACOBI_MODULE_H 25 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 26 | 27 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | /** \defgroup Sparse_Module Sparse meta-module 5 | * 6 | * Meta-module including all related modules: 7 | * - \ref SparseCore_Module 8 | * - \ref OrderingMethods_Module 9 | * - \ref SparseCholesky_Module 10 | * - \ref SparseLU_Module 11 | * - \ref SparseQR_Module 12 | * - \ref IterativeLinearSolvers_Module 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "SparseCore" 20 | #include "OrderingMethods" 21 | #include "SparseCholesky" 22 | #include "SparseLU" 23 | #include "SparseQR" 24 | #include "IterativeLinearSolvers" 25 | 26 | #endif // EIGEN_SPARSE_MODULE_H 27 | 28 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/Eigen/src/Eigen2Support/Macros.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MACROS_H 11 | #define EIGEN2_MACROS_H 12 | 13 | #define ei_assert eigen_assert 14 | #define ei_internal_assert eigen_internal_assert 15 | 16 | #define EIGEN_ALIGN_128 EIGEN_ALIGN16 17 | 18 | #define EIGEN_ARCH_WANTS_ALIGNMENT EIGEN_ALIGN_STATICALLY 19 | 20 | #endif // EIGEN2_MACROS_H 21 | -------------------------------------------------------------------------------- /deps/eigen/bench/bench_multi_compilers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if (($# < 2)); then 4 | echo "Usage: $0 compilerlist.txt benchfile.cpp" 5 | else 6 | 7 | compilerlist=$1 8 | benchfile=$2 9 | 10 | g=0 11 | source $compilerlist 12 | 13 | # for each compiler, compile benchfile and run the benchmark 14 | for (( i=0 ; i /dev/null 22 | echo "" 23 | else 24 | echo "compiler not found: $compiler" 25 | fi 26 | done 27 | 28 | fi 29 | -------------------------------------------------------------------------------- /deps/eigen/bench/bench_sum.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | typedef Matrix Vec; 9 | Vec v(SIZE); 10 | v.setZero(); 11 | v[0] = 1; 12 | v[1] = 2; 13 | for(int i = 0; i < 1000000; i++) 14 | { 15 | v.coeffRef(0) += v.sum() * SCALAR(1e-20); 16 | } 17 | cout << v.sum() << endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/bench/bench_unrolling: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # gcc : CXX="g++ -finline-limit=10000 -ftemplate-depth-2000 --param max-inline-recursive-depth=2000" 4 | # icc : CXX="icpc -fast -no-inline-max-size -fno-exceptions" 5 | CXX=${CXX-g++ -finline-limit=10000 -ftemplate-depth-2000 --param max-inline-recursive-depth=2000} # default value 6 | 7 | for ((i=1; i<16; ++i)); do 8 | echo "Matrix size: $i x $i :" 9 | $CXX -O3 -I.. -DNDEBUG benchmark.cpp -DMATSIZE=$i -DEIGEN_UNROLLING_LIMIT=400 -o benchmark && time ./benchmark >/dev/null 10 | $CXX -O3 -I.. -DNDEBUG -finline-limit=10000 benchmark.cpp -DMATSIZE=$i -DEIGEN_DONT_USE_UNROLLED_LOOPS=1 -o benchmark && time ./benchmark >/dev/null 11 | echo " " 12 | done 13 | -------------------------------------------------------------------------------- /deps/eigen/bench/benchmarkXcwise.cpp: -------------------------------------------------------------------------------- 1 | // g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX 2 | 3 | #include 4 | #include 5 | 6 | using namespace std; 7 | using namespace Eigen; 8 | 9 | #ifndef VECTYPE 10 | #define VECTYPE VectorXLd 11 | #endif 12 | 13 | #ifndef VECSIZE 14 | #define VECSIZE 1000000 15 | #endif 16 | 17 | #ifndef REPEAT 18 | #define REPEAT 1000 19 | #endif 20 | 21 | int main(int argc, char *argv[]) 22 | { 23 | VECTYPE I = VECTYPE::Ones(VECSIZE); 24 | VECTYPE m(VECSIZE,1); 25 | for(int i = 0; i < VECSIZE; i++) 26 | { 27 | m[i] = 0.1 * i/VECSIZE; 28 | } 29 | for(int a = 0; a < REPEAT; a++) 30 | { 31 | m = VECTYPE::Ones(VECSIZE) + 0.00005 * (m.cwise().square() + m/4); 32 | } 33 | cout << m[0] << endl; 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /deps/eigen/bench/btl/actions/basic_actions.hh: -------------------------------------------------------------------------------- 1 | 2 | #include "action_axpy.hh" 3 | #include "action_axpby.hh" 4 | 5 | #include "action_matrix_vector_product.hh" 6 | #include "action_atv_product.hh" 7 | 8 | #include "action_matrix_matrix_product.hh" 9 | // #include "action_ata_product.hh" 10 | #include "action_aat_product.hh" 11 | 12 | #include "action_trisolve.hh" 13 | #include "action_trmm.hh" 14 | #include "action_symv.hh" 15 | // #include "action_symm.hh" 16 | #include "action_syr2.hh" 17 | #include "action_ger.hh" 18 | #include "action_rot.hh" 19 | 20 | // #include "action_lu_solve.hh" 21 | 22 | -------------------------------------------------------------------------------- /deps/eigen/bench/btl/cmake/FindGMM.cmake: -------------------------------------------------------------------------------- 1 | if (GMM_INCLUDE_DIR) 2 | # in cache already 3 | set(GMM_FOUND TRUE) 4 | else (GMM_INCLUDE_DIR) 5 | 6 | find_path(GMM_INCLUDE_DIR NAMES gmm/gmm.h 7 | PATHS 8 | ${INCLUDE_INSTALL_DIR} 9 | ${GMM_INCLUDE_PATH} 10 | ) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMM DEFAULT_MSG GMM_INCLUDE_DIR ) 14 | 15 | mark_as_advanced(GMM_INCLUDE_DIR) 16 | 17 | endif(GMM_INCLUDE_DIR) 18 | -------------------------------------------------------------------------------- /deps/eigen/bench/btl/cmake/FindGOTO.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (GOTO_LIBRARIES) 3 | set(GOTO_FIND_QUIETLY TRUE) 4 | endif (GOTO_LIBRARIES) 5 | 6 | find_library(GOTO_LIBRARIES goto PATHS $ENV{GOTODIR} ${LIB_INSTALL_DIR}) 7 | 8 | if(GOTO_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX) 9 | set(GOTO_LIBRARIES ${GOTO_LIBRARIES} "-lpthread -lgfortran") 10 | endif() 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(GOTO DEFAULT_MSG GOTO_LIBRARIES) 14 | 15 | mark_as_advanced(GOTO_LIBRARIES) 16 | -------------------------------------------------------------------------------- /deps/eigen/bench/btl/cmake/FindGOTO2.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (GOTO2_LIBRARIES) 3 | set(GOTO2_FIND_QUIETLY TRUE) 4 | endif (GOTO2_LIBRARIES) 5 | # 6 | # find_path(GOTO_INCLUDES 7 | # NAMES 8 | # cblas.h 9 | # PATHS 10 | # $ENV{GOTODIR}/include 11 | # ${INCLUDE_INSTALL_DIR} 12 | # ) 13 | 14 | find_file(GOTO2_LIBRARIES libgoto2.so PATHS /usr/lib $ENV{GOTO2DIR} ${LIB_INSTALL_DIR}) 15 | find_library(GOTO2_LIBRARIES goto2 PATHS $ENV{GOTO2DIR} ${LIB_INSTALL_DIR}) 16 | 17 | if(GOTO2_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX) 18 | set(GOTO2_LIBRARIES ${GOTO2_LIBRARIES} "-lpthread -lgfortran") 19 | endif() 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(GOTO2 DEFAULT_MSG 23 | GOTO2_LIBRARIES) 24 | 25 | mark_as_advanced(GOTO2_LIBRARIES) 26 | -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/static/intel_bench_fixed_size.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/static/intel_bench_fixed_size.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/static/static_size_generator.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/static/static_size_generator.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/timers/STL_perf_analyzer.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/timers/STL_perf_analyzer.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/timers/STL_timer.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/timers/STL_timer.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/timers/mixed_perf_analyzer.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/timers/mixed_perf_analyzer.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/generic_bench/utils/size_lin_log.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/bench/btl/generic_bench/utils/size_lin_log.hh -------------------------------------------------------------------------------- /deps/eigen/bench/btl/libs/mtl4/.kdbgrc.main: -------------------------------------------------------------------------------- 1 | [General] 2 | DebuggerCmdStr= 3 | DriverName=GDB 4 | FileVersion=1 5 | OptionsSelected= 6 | ProgramArgs= 7 | TTYLevel=7 8 | WorkingDirectory= 9 | 10 | [Memory] 11 | ColumnWidths=80,0 12 | NumExprs=0 13 | -------------------------------------------------------------------------------- /deps/eigen/blas/complex_double.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 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR std::complex 11 | #define SCALAR_SUFFIX z 12 | #define SCALAR_SUFFIX_UP "Z" 13 | #define REAL_SCALAR_SUFFIX d 14 | #define ISCOMPLEX 1 15 | 16 | #include "level1_impl.h" 17 | #include "level1_cplx_impl.h" 18 | #include "level2_impl.h" 19 | #include "level2_cplx_impl.h" 20 | #include "level3_impl.h" 21 | -------------------------------------------------------------------------------- /deps/eigen/blas/complex_single.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 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR std::complex 11 | #define SCALAR_SUFFIX c 12 | #define SCALAR_SUFFIX_UP "C" 13 | #define REAL_SCALAR_SUFFIX s 14 | #define ISCOMPLEX 1 15 | 16 | #include "level1_impl.h" 17 | #include "level1_cplx_impl.h" 18 | #include "level2_impl.h" 19 | #include "level2_cplx_impl.h" 20 | #include "level3_impl.h" 21 | -------------------------------------------------------------------------------- /deps/eigen/blas/xerbla.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #if (defined __GNUC__) 5 | #define EIGEN_WEAK_LINKING __attribute__ ((weak)) 6 | #else 7 | #define EIGEN_WEAK_LINKING 8 | #endif 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | EIGEN_WEAK_LINKING int xerbla_(const char * msg, int *info, int) 16 | { 17 | std::cerr << "Eigen BLAS ERROR #" << *info << ": " << msg << "\n"; 18 | return 0; 19 | } 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | -------------------------------------------------------------------------------- /deps/eigen/cmake/FindAdolc.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (ADOLC_INCLUDES AND ADOLC_LIBRARIES) 3 | set(ADOLC_FIND_QUIETLY TRUE) 4 | endif (ADOLC_INCLUDES AND ADOLC_LIBRARIES) 5 | 6 | find_path(ADOLC_INCLUDES 7 | NAMES 8 | adolc/adouble.h 9 | PATHS 10 | $ENV{ADOLCDIR} 11 | ${INCLUDE_INSTALL_DIR} 12 | ) 13 | 14 | find_library(ADOLC_LIBRARIES adolc PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR}) 15 | 16 | include(FindPackageHandleStandardArgs) 17 | find_package_handle_standard_args(ADOLC DEFAULT_MSG 18 | ADOLC_INCLUDES ADOLC_LIBRARIES) 19 | 20 | mark_as_advanced(ADOLC_INCLUDES ADOLC_LIBRARIES) 21 | -------------------------------------------------------------------------------- /deps/eigen/cmake/FindGMP.cmake: -------------------------------------------------------------------------------- 1 | # Try to find the GNU Multiple Precision Arithmetic Library (GMP) 2 | # See http://gmplib.org/ 3 | 4 | if (GMP_INCLUDES AND GMP_LIBRARIES) 5 | set(GMP_FIND_QUIETLY TRUE) 6 | endif (GMP_INCLUDES AND GMP_LIBRARIES) 7 | 8 | find_path(GMP_INCLUDES 9 | NAMES 10 | gmp.h 11 | PATHS 12 | $ENV{GMPDIR} 13 | ${INCLUDE_INSTALL_DIR} 14 | ) 15 | 16 | find_library(GMP_LIBRARIES gmp PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR}) 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(GMP DEFAULT_MSG 20 | GMP_INCLUDES GMP_LIBRARIES) 21 | mark_as_advanced(GMP_INCLUDES GMP_LIBRARIES) 22 | -------------------------------------------------------------------------------- /deps/eigen/cmake/FindScotch.cmake: -------------------------------------------------------------------------------- 1 | # Pastix requires SCOTCH or METIS (partitioning and reordering tools) 2 | 3 | if (SCOTCH_INCLUDES AND SCOTCH_LIBRARIES) 4 | set(SCOTCH_FIND_QUIETLY TRUE) 5 | endif (SCOTCH_INCLUDES AND SCOTCH_LIBRARIES) 6 | 7 | find_path(SCOTCH_INCLUDES 8 | NAMES 9 | scotch.h 10 | PATHS 11 | $ENV{SCOTCHDIR} 12 | ${INCLUDE_INSTALL_DIR} 13 | PATH_SUFFIXES 14 | scotch 15 | ) 16 | 17 | 18 | find_library(SCOTCH_LIBRARIES scotch PATHS $ENV{SCOTCHDIR} ${LIB_INSTALL_DIR}) 19 | 20 | include(FindPackageHandleStandardArgs) 21 | find_package_handle_standard_args(SCOTCH DEFAULT_MSG 22 | SCOTCH_INCLUDES SCOTCH_LIBRARIES) 23 | 24 | mark_as_advanced(SCOTCH_INCLUDES SCOTCH_LIBRARIES) 25 | -------------------------------------------------------------------------------- /deps/eigen/debug/gdb/__init__.py: -------------------------------------------------------------------------------- 1 | # Intentionally empty 2 | -------------------------------------------------------------------------------- /deps/eigen/demos/mandelbrot/README: -------------------------------------------------------------------------------- 1 | *** Mandelbrot demo *** 2 | 3 | Controls: 4 | * Left mouse button to center view at a point. 5 | * Drag vertically with left mouse button to zoom in and out. 6 | 7 | Be sure to enable SSE2 or AltiVec to improve performance. 8 | 9 | The number of iterations, and the choice between single and double precision, are 10 | determined at runtime depending on the zoom level. 11 | -------------------------------------------------------------------------------- /deps/eigen/demos/mix_eigen_and_c/README: -------------------------------------------------------------------------------- 1 | This is an example of how one can wrap some of Eigen into a C library. 2 | 3 | To try this with GCC, do: 4 | 5 | g++ -c binary_library.cpp -O2 -msse2 -I ../.. 6 | gcc example.c binary_library.o -o example -lstdc++ 7 | ./example 8 | 9 | TODO: add CMakeLists, add more explanations here -------------------------------------------------------------------------------- /deps/eigen/demos/opengl/README: -------------------------------------------------------------------------------- 1 | 2 | Navigation: 3 | left button: rotate around the target 4 | middle button: zoom 5 | left button + ctrl quake rotate (rotate around camera position) 6 | middle button + ctrl walk (progress along camera's z direction) 7 | left button: pan (translate in the XY camera's plane) 8 | 9 | R : move the camera to initial position 10 | A : start/stop animation 11 | C : clear the animation 12 | G : add a key frame 13 | 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/Eigen_Silly_Professor_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/deps/eigen/doc/Eigen_Silly_Professor_64x64.png -------------------------------------------------------------------------------- /deps/eigen/doc/TopicEigenExpressionTemplates.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | /** \page TopicEigenExpressionTemplates Expression templates in Eigen 4 | 5 | 6 | TODO: write this dox page! 7 | 8 | Is linked from the tutorial on arithmetic ops. 9 | 10 | */ 11 | 12 | } 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/TopicResizing.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | /** \page TopicResizing Resizing 4 | 5 | 6 | TODO: write this dox page! 7 | 8 | Is linked from the tutorial on the Matrix class. 9 | 10 | */ 11 | } 12 | -------------------------------------------------------------------------------- /deps/eigen/doc/TopicScalarTypes.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | /** \page TopicScalarTypes Scalar types 4 | 5 | 6 | TODO: write this dox page! 7 | 8 | Is linked from the tutorial on the Matrix class. 9 | 10 | */ 11 | 12 | } 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/TopicVectorization.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | /** \page TopicVectorization Vectorization 4 | 5 | 6 | TODO: write this dox page! 7 | 8 | */ 9 | } 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/TutorialSparse_example_details.dox: -------------------------------------------------------------------------------- 1 | /** 2 | \page TutorialSparse_example_details 3 | \include Tutorial_sparse_example_details.cpp 4 | */ 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/.krazy: -------------------------------------------------------------------------------- 1 | EXCLUDE copyright 2 | EXCLUDE license 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/DenseBase_middleCols_int.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main(void) 8 | { 9 | int const N = 5; 10 | MatrixXi A(N,N); 11 | A.setRandom(); 12 | cout << "A =\n" << A << '\n' << endl; 13 | cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/DenseBase_middleRows_int.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main(void) 8 | { 9 | int const N = 5; 10 | MatrixXi A(N,N); 11 | A.setRandom(); 12 | cout << "A =\n" << A << '\n' << endl; 13 | cout << "A(2..3,:) =\n" << A.middleRows(2,2) << endl; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/DenseBase_template_int_middleCols.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main(void) 8 | { 9 | int const N = 5; 10 | MatrixXi A(N,N); 11 | A.setRandom(); 12 | cout << "A =\n" << A << '\n' << endl; 13 | cout << "A(:,1..3) =\n" << A.middleCols<3>(1) << endl; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/DenseBase_template_int_middleRows.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main(void) 8 | { 9 | int const N = 5; 10 | MatrixXi A(N,N); 11 | A.setRandom(); 12 | cout << "A =\n" << A << '\n' << endl; 13 | cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl; 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/MatrixBase_cwise_const.cpp: -------------------------------------------------------------------------------- 1 | #define EIGEN2_SUPPORT 2 | #include 3 | #include 4 | 5 | using namespace Eigen; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | Matrix3i m = Matrix3i::Random(); 11 | cout << "Here is the matrix m:" << endl << m << endl; 12 | Matrix3i n = Matrix3i::Random(); 13 | cout << "And here is the matrix n:" << endl << n << endl; 14 | cout << "The coefficient-wise product of m and n is:" << endl; 15 | cout << m.cwise() * n << endl; 16 | cout << "Taking the cube of the coefficients of m yields:" << endl; 17 | cout << m.cwise().pow(3) << endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/QuickStart_example.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using Eigen::MatrixXd; 5 | 6 | int main() 7 | { 8 | MatrixXd m(2,2); 9 | m(0,0) = 3; 10 | m(1,0) = 2.5; 11 | m(0,1) = -1; 12 | m(1,1) = m(1,0) + m(0,1); 13 | std::cout << m << std::endl; 14 | } 15 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/QuickStart_example2_dynamic.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | MatrixXd m = MatrixXd::Random(3,3); 10 | m = (m + MatrixXd::Constant(3,3,1.2)) * 50; 11 | cout << "m =" << endl << m << endl; 12 | VectorXd v(3); 13 | v << 1, 2, 3; 14 | cout << "m * v =" << endl << m * v << endl; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/QuickStart_example2_fixed.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | Matrix3d m = Matrix3d::Random(); 10 | m = (m + Matrix3d::Constant(1.2)) * 50; 11 | cout << "m =" << endl << m << endl; 12 | Vector3d v(1,2,3); 13 | 14 | cout << "m * v =" << endl << m * v << endl; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TemplateKeyword_simple.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src) 7 | { 8 | dst.triangularView() = src.triangularView(); 9 | } 10 | 11 | int main() 12 | { 13 | MatrixXf m1 = MatrixXf::Ones(4,4); 14 | MatrixXf m2 = MatrixXf::Random(4,4); 15 | std::cout << "m2 before copy:" << std::endl; 16 | std::cout << m2 << std::endl << std::endl; 17 | copyUpperTriangularPart(m2, m1); 18 | std::cout << "m2 after copy:" << std::endl; 19 | std::cout << m2 << std::endl << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgComputeTwice.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix2f A, b; 10 | LLT llt; 11 | A << 2, -1, -1, 3; 12 | b << 1, 2, 3, 1; 13 | cout << "Here is the matrix A:\n" << A << endl; 14 | cout << "Here is the right hand side b:\n" << b << endl; 15 | cout << "Computing LLT decomposition..." << endl; 16 | llt.compute(A); 17 | cout << "The solution is:\n" << llt.solve(b) << endl; 18 | A(1,1)++; 19 | cout << "The matrix A is now:\n" << A << endl; 20 | cout << "Computing LLT decomposition..." << endl; 21 | llt.compute(A); 22 | cout << "The solution is now:\n" << llt.solve(b) << endl; 23 | } 24 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | MatrixXd A = MatrixXd::Random(100,100); 10 | MatrixXd b = MatrixXd::Random(100,50); 11 | MatrixXd x = A.fullPivLu().solve(b); 12 | double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm 13 | cout << "The relative error is:\n" << relative_error << endl; 14 | } 15 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix3f A; 10 | Vector3f b; 11 | A << 1,2,3, 4,5,6, 7,8,10; 12 | b << 3, 3, 4; 13 | cout << "Here is the matrix A:\n" << A << endl; 14 | cout << "Here is the vector b:\n" << b << endl; 15 | Vector3f x = A.colPivHouseholderQr().solve(b); 16 | cout << "The solution is:\n" << x << endl; 17 | } 18 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgExSolveLDLT.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix2f A, b; 10 | A << 2, -1, -1, 3; 11 | b << 1, 2, 3, 1; 12 | cout << "Here is the matrix A:\n" << A << endl; 13 | cout << "Here is the right hand side b:\n" << b << endl; 14 | Matrix2f x = A.ldlt().solve(b); 15 | cout << "The solution is:\n" << x << endl; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgInverseDeterminant.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix3f A; 10 | A << 1, 2, 1, 11 | 2, 1, 0, 12 | -1, 1, 2; 13 | cout << "Here is the matrix A:\n" << A << endl; 14 | cout << "The determinant of A is " << A.determinant() << endl; 15 | cout << "The inverse of A is:\n" << A.inverse() << endl; 16 | } -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgRankRevealing.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix3f A; 10 | A << 1, 2, 5, 11 | 2, 1, 4, 12 | 3, 0, 3; 13 | cout << "Here is the matrix A:\n" << A << endl; 14 | FullPivLU lu_decomp(A); 15 | cout << "The rank of A is " << lu_decomp.rank() << endl; 16 | cout << "Here is a matrix whose columns form a basis of the null-space of A:\n" 17 | << lu_decomp.kernel() << endl; 18 | cout << "Here is a matrix whose columns form a basis of the column-space of A:\n" 19 | << lu_decomp.image(A) << endl; // yes, have to pass the original A 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgSVDSolve.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | MatrixXf A = MatrixXf::Random(3, 2); 10 | cout << "Here is the matrix A:\n" << A << endl; 11 | VectorXf b = VectorXf::Random(3); 12 | cout << "Here is the right hand side b:\n" << b << endl; 13 | cout << "The least-squares solution is:\n" 14 | << A.jacobiSvd(ComputeThinU | ComputeThinV).solve(b) << endl; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgSelfAdjointEigenSolver.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix2f A; 10 | A << 1, 2, 2, 3; 11 | cout << "Here is the matrix A:\n" << A << endl; 12 | SelfAdjointEigenSolver eigensolver(A); 13 | if (eigensolver.info() != Success) abort(); 14 | cout << "The eigenvalues of A are:\n" << eigensolver.eigenvalues() << endl; 15 | cout << "Here's a matrix whose columns are eigenvectors of A \n" 16 | << "corresponding to these eigenvalues:\n" 17 | << eigensolver.eigenvectors() << endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/TutorialLinAlgSetThreshold.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Matrix2d A; 10 | A << 2, 1, 11 | 2, 0.9999999999; 12 | FullPivLU lu(A); 13 | cout << "By default, the rank of A is found to be " << lu.rank() << endl; 14 | lu.setThreshold(1e-5); 15 | cout << "With threshold 1e-5, the rank of A is found to be " << lu.rank() << endl; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_accessors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | ArrayXXf m(2,2); 10 | 11 | // assign some values coefficient by coefficient 12 | m(0,0) = 1.0; m(0,1) = 2.0; 13 | m(1,0) = 3.0; m(1,1) = m(0,1) + m(1,0); 14 | 15 | // print values to standard output 16 | cout << m << endl << endl; 17 | 18 | // using the comma-initializer is also allowed 19 | m << 1.0,2.0, 20 | 3.0,4.0; 21 | 22 | // print values to standard output 23 | cout << m << endl; 24 | } 25 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_addition.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | ArrayXXf a(3,3); 10 | ArrayXXf b(3,3); 11 | a << 1,2,3, 12 | 4,5,6, 13 | 7,8,9; 14 | b << 1,2,3, 15 | 1,2,3, 16 | 1,2,3; 17 | 18 | // Adding two arrays 19 | cout << "a + b = " << endl << a + b << endl << endl; 20 | 21 | // Subtracting a scalar from an array 22 | cout << "a - 2 = " << endl << a - 2 << endl; 23 | } 24 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | ArrayXf a = ArrayXf::Random(5); 10 | a *= 2; 11 | cout << "a =" << endl 12 | << a << endl; 13 | cout << "a.abs() =" << endl 14 | << a.abs() << endl; 15 | cout << "a.abs().sqrt() =" << endl 16 | << a.abs().sqrt() << endl; 17 | cout << "a.min(a.abs().sqrt()) =" << endl 18 | << a.min(a.abs().sqrt()) << endl; 19 | } 20 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_interop.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | MatrixXf m(2,2); 10 | MatrixXf n(2,2); 11 | MatrixXf result(2,2); 12 | 13 | m << 1,2, 14 | 3,4; 15 | n << 5,6, 16 | 7,8; 17 | 18 | result = (m.array() + 4).matrix() * m; 19 | cout << "-- Combination 1: --" << endl << result << endl << endl; 20 | result = (m.array() * n.array()).matrix() * m; 21 | cout << "-- Combination 2: --" << endl << result << endl << endl; 22 | } 23 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | MatrixXf m(2,2); 10 | MatrixXf n(2,2); 11 | MatrixXf result(2,2); 12 | 13 | m << 1,2, 14 | 3,4; 15 | n << 5,6, 16 | 7,8; 17 | 18 | result = m * n; 19 | cout << "-- Matrix m*n: --" << endl << result << endl << endl; 20 | result = m.array() * n.array(); 21 | cout << "-- Array m*n: --" << endl << result << endl << endl; 22 | result = m.cwiseProduct(n); 23 | cout << "-- With cwiseProduct: --" << endl << result << endl << endl; 24 | result = m.array() + 4; 25 | cout << "-- Array m + 4: --" << endl << result << endl << endl; 26 | } 27 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ArrayClass_mult.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main() 8 | { 9 | ArrayXXf a(2,2); 10 | ArrayXXf b(2,2); 11 | a << 1,2, 12 | 3,4; 13 | b << 5,6, 14 | 7,8; 15 | cout << "a * b = " << endl << a * b << endl; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_BlockOperations_block_assignment.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Array22f m; 10 | m << 1,2, 11 | 3,4; 12 | Array44f a = Array44f::Constant(0.6); 13 | cout << "Here is the array a:" << endl << a << endl << endl; 14 | a.block<2,2>(1,1) = m; 15 | cout << "Here is now a with m copied into its central 2x2 block:" << endl << a << endl << endl; 16 | a.block(0,0,2,3) = a.block(2,1,2,3); 17 | cout << "Here is now a with bottom-right 2x3 block copied into top-left 2x2 block:" << endl << a << endl << endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_BlockOperations_colrow.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | Eigen::MatrixXf m(3,3); 9 | m << 1,2,3, 10 | 4,5,6, 11 | 7,8,9; 12 | cout << "Here is the matrix m:" << endl << m << endl; 13 | cout << "2nd Row: " << m.row(1) << endl; 14 | m.col(2) += 3 * m.col(0); 15 | cout << "After adding 3 times the first column into the third column, the matrix m is:\n"; 16 | cout << m << endl; 17 | } 18 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_BlockOperations_corner.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | Eigen::Matrix4f m; 9 | m << 1, 2, 3, 4, 10 | 5, 6, 7, 8, 11 | 9, 10,11,12, 12 | 13,14,15,16; 13 | cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl; 14 | cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << endl; 15 | m.topLeftCorner(1,3) = m.bottomRightCorner(3,1).transpose(); 16 | cout << "After assignment, m = " << endl << m << endl; 17 | } 18 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_BlockOperations_print_block.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | Eigen::MatrixXf m(4,4); 9 | m << 1, 2, 3, 4, 10 | 5, 6, 7, 8, 11 | 9,10,11,12, 12 | 13,14,15,16; 13 | cout << "Block in the middle" << endl; 14 | cout << m.block<2,2>(1,1) << endl << endl; 15 | for (int i = 1; i <= 3; ++i) 16 | { 17 | cout << "Block of size " << i << "x" << i << endl; 18 | cout << m.block(0,0,i,i) << endl << endl; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_BlockOperations_vector.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | Eigen::ArrayXf v(6); 9 | v << 1, 2, 3, 4, 5, 6; 10 | cout << "v.head(3) =" << endl << v.head(3) << endl << endl; 11 | cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl; 12 | v.segment(1,4) *= 2; 13 | cout << "after 'v.segment(1,4) *= 2', v =" << endl << v << endl; 14 | } 15 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_PartialLU_solve.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | using namespace Eigen; 7 | 8 | int main() 9 | { 10 | Matrix3f A; 11 | Vector3f b; 12 | A << 1,2,3, 4,5,6, 7,8,10; 13 | b << 3, 3, 4; 14 | cout << "Here is the matrix A:" << endl << A << endl; 15 | cout << "Here is the vector b:" << endl << b << endl; 16 | Vector3f x = A.lu().solve(b); 17 | cout << "The solution is:" << endl << x << endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Eigen::MatrixXf m(2,4); 10 | Eigen::VectorXf v(2); 11 | 12 | m << 1, 23, 6, 9, 13 | 3, 11, 7, 2; 14 | 15 | v << 2, 16 | 3; 17 | 18 | MatrixXf::Index index; 19 | // find nearest neighbour 20 | (m.colwise() - v).colwise().squaredNorm().minCoeff(&index); 21 | 22 | cout << "Nearest neighbour is column " << index << ":" << endl; 23 | cout << m.col(index) << endl; 24 | } 25 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | int main() 6 | { 7 | Eigen::MatrixXf mat(2,4); 8 | Eigen::VectorXf v(2); 9 | 10 | mat << 1, 2, 6, 9, 11 | 3, 1, 7, 2; 12 | 13 | v << 0, 14 | 1; 15 | 16 | //add v to each column of m 17 | mat.colwise() += v; 18 | 19 | std::cout << "Broadcasting result: " << std::endl; 20 | std::cout << mat << std::endl; 21 | } 22 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | int main() 6 | { 7 | Eigen::MatrixXf mat(2,4); 8 | Eigen::VectorXf v(4); 9 | 10 | mat << 1, 2, 6, 9, 11 | 3, 1, 7, 2; 12 | 13 | v << 0,1,2,3; 14 | 15 | //add v to each row of m 16 | mat.rowwise() += v.transpose(); 17 | 18 | std::cout << "Broadcasting result: " << std::endl; 19 | std::cout << mat << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_colwise.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | int main() 6 | { 7 | Eigen::MatrixXf mat(2,4); 8 | mat << 1, 2, 6, 9, 9 | 3, 1, 7, 2; 10 | 11 | std::cout << "Column's maximum: " << std::endl 12 | << mat.colwise().maxCoeff() << std::endl; 13 | } 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | int main() 7 | { 8 | MatrixXf mat(2,4); 9 | mat << 1, 2, 6, 9, 10 | 3, 1, 7, 2; 11 | 12 | MatrixXf::Index maxIndex; 13 | float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex); 14 | 15 | std::cout << "Maximum sum at position " << maxIndex << std::endl; 16 | 17 | std::cout << "The corresponding vector is: " << std::endl; 18 | std::cout << mat.col( maxIndex ) << std::endl; 19 | std::cout << "And its sum is is: " << maxNorm << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | ArrayXXf a(2,2); 10 | 11 | a << 1,2, 12 | 3,4; 13 | 14 | cout << "(a > 0).all() = " << (a > 0).all() << endl; 15 | cout << "(a > 0).any() = " << (a > 0).any() << endl; 16 | cout << "(a > 0).count() = " << (a > 0).count() << endl; 17 | cout << endl; 18 | cout << "(a > 2).all() = " << (a > 2).all() << endl; 19 | cout << "(a > 2).any() = " << (a > 2).any() << endl; 20 | cout << "(a > 2).count() = " << (a > 2).count() << endl; 21 | } 22 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | int main() 6 | { 7 | Eigen::MatrixXf mat(2,4); 8 | mat << 1, 2, 6, 9, 9 | 3, 1, 7, 2; 10 | 11 | std::cout << "Row's maximum: " << std::endl 12 | << mat.rowwise().maxCoeff() << std::endl; 13 | } 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | using namespace Eigen; 6 | 7 | int main() 8 | { 9 | Eigen::MatrixXf m(2,2); 10 | 11 | m << 1, 2, 12 | 3, 4; 13 | 14 | //get location of maximum 15 | MatrixXf::Index maxRow, maxCol; 16 | float max = m.maxCoeff(&maxRow, &maxCol); 17 | 18 | //get location of minimum 19 | MatrixXf::Index minRow, minCol; 20 | float min = m.minCoeff(&minRow, &minCol); 21 | 22 | cout << "Max: " << max << ", at: " << 23 | maxRow << "," << maxCol << endl; 24 | cout << "Min: " << min << ", at: " << 25 | minRow << "," << minCol << endl; 26 | } 27 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/Tutorial_simple_example_fixed_size.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | Matrix3f m3; 9 | m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9; 10 | Matrix4f m4 = Matrix4f::Identity(); 11 | Vector4i v4(1, 2, 3, 4); 12 | 13 | std::cout << "m3\n" << m3 << "\nm4:\n" 14 | << m4 << "\nv4:\n" << v4 << std::endl; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/class_CwiseBinaryOp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | using namespace std; 5 | 6 | // define a custom template binary functor 7 | template struct MakeComplexOp { 8 | EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp) 9 | typedef complex result_type; 10 | complex operator()(const Scalar& a, const Scalar& b) const { return complex(a,b); } 11 | }; 12 | 13 | int main(int, char**) 14 | { 15 | Matrix4d m1 = Matrix4d::Random(), m2 = Matrix4d::Random(); 16 | cout << m1.binaryExpr(m2, MakeComplexOp()) << endl; 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/class_CwiseUnaryOp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | using namespace std; 5 | 6 | // define a custom template unary functor 7 | template 8 | struct CwiseClampOp { 9 | CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {} 10 | const Scalar operator()(const Scalar& x) const { return xm_sup ? m_sup : x); } 11 | Scalar m_inf, m_sup; 12 | }; 13 | 14 | int main(int, char**) 15 | { 16 | Matrix4d m1 = Matrix4d::Random(); 17 | cout << m1 << endl << "becomes: " << endl << m1.unaryExpr(CwiseClampOp(-0.5,0.5)) << endl; 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/class_CwiseUnaryOp_ptrfun.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | using namespace std; 5 | 6 | // define function to be applied coefficient-wise 7 | double ramp(double x) 8 | { 9 | if (x > 0) 10 | return x; 11 | else 12 | return 0; 13 | } 14 | 15 | int main(int, char**) 16 | { 17 | Matrix4d m1 = Matrix4d::Random(); 18 | cout << m1 << endl << "becomes: " << endl << m1.unaryExpr(ptr_fun(ramp)) << endl; 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/function_taking_eigenbase.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | 5 | template 6 | void print_size(const EigenBase& b) 7 | { 8 | std::cout << "size (rows, cols): " << b.size() << " (" << b.rows() 9 | << ", " << b.cols() << ")" << std::endl; 10 | } 11 | 12 | int main() 13 | { 14 | Vector3f v; 15 | print_size(v); 16 | // v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression 17 | print_size(v.asDiagonal()); 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/function_taking_ref.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace Eigen; 4 | using namespace std; 5 | 6 | float inv_cond(const Ref& a) 7 | { 8 | const VectorXf sing_vals = a.jacobiSvd().singularValues(); 9 | return sing_vals(sing_vals.size()-1) / sing_vals(0); 10 | } 11 | 12 | int main() 13 | { 14 | Matrix4f m = Matrix4f::Random(); 15 | cout << "matrix m:" << endl << m << endl << endl; 16 | cout << "inv_cond(m): " << inv_cond(m) << endl; 17 | cout << "inv_cond(m(1:3,1:3)): " << inv_cond(m.topLeftCorner(3,3)) << endl; 18 | cout << "inv_cond(m+I): " << inv_cond(m+Matrix4f::Identity()) << endl; 19 | } 20 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_arithmetic_add_sub.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | Matrix2d a; 9 | a << 1, 2, 10 | 3, 4; 11 | MatrixXd b(2,2); 12 | b << 2, 3, 13 | 1, 4; 14 | std::cout << "a + b =\n" << a + b << std::endl; 15 | std::cout << "a - b =\n" << a - b << std::endl; 16 | std::cout << "Doing a += b;" << std::endl; 17 | a += b; 18 | std::cout << "Now a =\n" << a << std::endl; 19 | Vector3d v(1,2,3); 20 | Vector3d w(1,0,0); 21 | std::cout << "-v + w - v =\n" << -v + w - v << std::endl; 22 | } 23 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_arithmetic_dot_cross.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | int main() 7 | { 8 | Vector3d v(1,2,3); 9 | Vector3d w(0,1,2); 10 | 11 | cout << "Dot product: " << v.dot(w) << endl; 12 | double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar 13 | cout << "Dot product via a matrix product: " << dp << endl; 14 | cout << "Cross product:\n" << v.cross(w) << endl; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_arithmetic_matrix_mul.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | int main() 6 | { 7 | Matrix2d mat; 8 | mat << 1, 2, 9 | 3, 4; 10 | Vector2d u(-1,1), v(2,0); 11 | std::cout << "Here is mat*mat:\n" << mat*mat << std::endl; 12 | std::cout << "Here is mat*u:\n" << mat*u << std::endl; 13 | std::cout << "Here is u^T*mat:\n" << u.transpose()*mat << std::endl; 14 | std::cout << "Here is u^T*v:\n" << u.transpose()*v << std::endl; 15 | std::cout << "Here is u*v^T:\n" << u*v.transpose() << std::endl; 16 | std::cout << "Let's multiply mat by itself" << std::endl; 17 | mat = mat*mat; 18 | std::cout << "Now mat is mat:\n" << mat << std::endl; 19 | } 20 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_arithmetic_redux_basic.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | int main() 6 | { 7 | Eigen::Matrix2d mat; 8 | mat << 1, 2, 9 | 3, 4; 10 | cout << "Here is mat.sum(): " << mat.sum() << endl; 11 | cout << "Here is mat.prod(): " << mat.prod() << endl; 12 | cout << "Here is mat.mean(): " << mat.mean() << endl; 13 | cout << "Here is mat.minCoeff(): " << mat.minCoeff() << endl; 14 | cout << "Here is mat.maxCoeff(): " << mat.maxCoeff() << endl; 15 | cout << "Here is mat.trace(): " << mat.trace() << endl; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_arithmetic_scalar_mul_div.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | Matrix2d a; 9 | a << 1, 2, 10 | 3, 4; 11 | Vector3d v(1,2,3); 12 | std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; 13 | std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; 14 | std::cout << "Doing v *= 2;" << std::endl; 15 | v *= 2; 16 | std::cout << "Now v =\n" << v << std::endl; 17 | } 18 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_matrix_coefficient_accessors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | MatrixXd m(2,2); 9 | m(0,0) = 3; 10 | m(1,0) = 2.5; 11 | m(0,1) = -1; 12 | m(1,1) = m(1,0) + m(0,1); 13 | std::cout << "Here is the matrix m:\n" << m << std::endl; 14 | VectorXd v(2); 15 | v(0) = 4; 16 | v(1) = v(0) - 1; 17 | std::cout << "Here is the vector v:\n" << v << std::endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_matrix_resize.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | MatrixXd m(2,5); 9 | m.resize(4,3); 10 | std::cout << "The matrix m is of size " 11 | << m.rows() << "x" << m.cols() << std::endl; 12 | std::cout << "It has " << m.size() << " coefficients" << std::endl; 13 | VectorXd v(2); 14 | v.resize(5); 15 | std::cout << "The vector v is of size " << v.size() << std::endl; 16 | std::cout << "As a matrix, v is of size " 17 | << v.rows() << "x" << v.cols() << std::endl; 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/examples/tut_matrix_resize_fixed_size.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | Matrix4d m; 9 | m.resize(4,4); // no operation 10 | std::cout << "The matrix m is of size " 11 | << m.rows() << "x" << m.cols() << std::endl; 12 | } 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/.krazy: -------------------------------------------------------------------------------- 1 | EXCLUDE copyright 2 | EXCLUDE license 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/AngleAxis_mimic_euler.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m; 2 | m = AngleAxisf(0.25*M_PI, Vector3f::UnitX()) 3 | * AngleAxisf(0.5*M_PI, Vector3f::UnitY()) 4 | * AngleAxisf(0.33*M_PI, Vector3f::UnitZ()); 5 | cout << m << endl << "is unitary: " << m.isUnitary() << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ColPivHouseholderQR_solve.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m = Matrix3f::Random(); 2 | Matrix3f y = Matrix3f::Random(); 3 | cout << "Here is the matrix m:" << endl << m << endl; 4 | cout << "Here is the matrix y:" << endl << y << endl; 5 | Matrix3f x; 6 | x = m.colPivHouseholderQr().solve(y); 7 | assert(y.isApprox(m*x)); 8 | cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ComplexEigenSolver_eigenvalues.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf ones = MatrixXcf::Ones(3,3); 2 | ComplexEigenSolver ces(ones, /* computeEigenvectors = */ false); 3 | cout << "The eigenvalues of the 3x3 matrix of ones are:" 4 | << endl << ces.eigenvalues() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ComplexEigenSolver_eigenvectors.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf ones = MatrixXcf::Ones(3,3); 2 | ComplexEigenSolver ces(ones); 3 | cout << "The first eigenvector of the 3x3 matrix of ones is:" 4 | << endl << ces.eigenvectors().col(1) << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ComplexSchur_compute.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf A = MatrixXcf::Random(4,4); 2 | ComplexSchur schur(4); 3 | schur.compute(A); 4 | cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl; 5 | schur.compute(A.inverse()); 6 | cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ComplexSchur_matrixT.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf A = MatrixXcf::Random(4,4); 2 | cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; 3 | ComplexSchur schurOfA(A, false); // false means do not compute U 4 | cout << "The triangular matrix T is:" << endl << schurOfA.matrixT() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/ComplexSchur_matrixU.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf A = MatrixXcf::Random(4,4); 2 | cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl; 3 | ComplexSchur schurOfA(A); 4 | cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_abs.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(1,-2,-3); 2 | cout << v.abs() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_abs2.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(1,-2,-3); 2 | cout << v.abs2() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_acos.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(0, sqrt(2.)/2, 1); 2 | cout << v.acos() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_asin.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(0, sqrt(2.)/2, 1); 2 | cout << v.asin() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_boolean_and.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(-1,2,1), w(-3,2,3); 2 | cout << ((vw) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_greater_equal.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(1,2,3), w(3,2,1); 2 | cout << (v>=w) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_inverse.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(2,3,4); 2 | cout << v.inverse() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Cwise_less.cpp: -------------------------------------------------------------------------------- 1 | Array3d v(1,2,3), w(3,2,1); 2 | cout << (v() = ..." << endl; 4 | cout << m.colwise().replicate<3>() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/DirectionWise_replicate_int.cpp: -------------------------------------------------------------------------------- 1 | Vector3i v = Vector3i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "v.rowwise().replicate(5) = ..." << endl; 4 | cout << v.rowwise().replicate(5) << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/EigenSolver_compute.cpp: -------------------------------------------------------------------------------- 1 | EigenSolver es; 2 | MatrixXf A = MatrixXf::Random(4,4); 3 | es.compute(A, /* computeEigenvectors = */ false); 4 | cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; 5 | es.compute(A + MatrixXf::Identity(4,4), false); // re-use es to compute eigenvalues of A+I 6 | cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/EigenSolver_eigenvalues.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | EigenSolver es(ones, false); 3 | cout << "The eigenvalues of the 3x3 matrix of ones are:" 4 | << endl << es.eigenvalues() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/EigenSolver_eigenvectors.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | EigenSolver es(ones); 3 | cout << "The first eigenvector of the 3x3 matrix of ones is:" 4 | << endl << es.eigenvectors().col(1) << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/EigenSolver_pseudoEigenvectors.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd A = MatrixXd::Random(6,6); 2 | cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; 3 | 4 | EigenSolver es(A); 5 | MatrixXd D = es.pseudoEigenvalueMatrix(); 6 | MatrixXd V = es.pseudoEigenvectors(); 7 | cout << "The pseudo-eigenvalue matrix D is:" << endl << D << endl; 8 | cout << "The pseudo-eigenvector matrix V is:" << endl << V << endl; 9 | cout << "Finally, V * D * V^(-1) = " << endl << V * D * V.inverse() << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/FullPivHouseholderQR_solve.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m = Matrix3f::Random(); 2 | Matrix3f y = Matrix3f::Random(); 3 | cout << "Here is the matrix m:" << endl << m << endl; 4 | cout << "Here is the matrix y:" << endl << y << endl; 5 | Matrix3f x; 6 | x = m.fullPivHouseholderQr().solve(y); 7 | assert(y.isApprox(m*x)); 8 | cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/FullPivLU_image.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m; 2 | m << 1,1,0, 3 | 1,3,2, 4 | 0,1,1; 5 | cout << "Here is the matrix m:" << endl << m << endl; 6 | cout << "Notice that the middle column is the sum of the two others, so the " 7 | << "columns are linearly dependent." << endl; 8 | cout << "Here is a matrix whose columns have the same span but are linearly independent:" 9 | << endl << m.fullPivLu().image(m) << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/FullPivLU_kernel.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m = MatrixXf::Random(3,5); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | MatrixXf ker = m.fullPivLu().kernel(); 4 | cout << "Here is a matrix whose columns form a basis of the kernel of m:" 5 | << endl << ker << endl; 6 | cout << "By definition of the kernel, m*ker is zero:" 7 | << endl << m*ker << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/FullPivLU_solve.cpp: -------------------------------------------------------------------------------- 1 | Matrix m = Matrix::Random(); 2 | Matrix2f y = Matrix2f::Random(); 3 | cout << "Here is the matrix m:" << endl << m << endl; 4 | cout << "Here is the matrix y:" << endl << y << endl; 5 | Matrix x = m.fullPivLu().solve(y); 6 | if((m*x).isApprox(y)) 7 | { 8 | cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; 9 | } 10 | else 11 | cout << "The equation mx=y does not have any solution." << endl; 12 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/GeneralizedEigenSolver.cpp: -------------------------------------------------------------------------------- 1 | GeneralizedEigenSolver ges; 2 | MatrixXf A = MatrixXf::Random(4,4); 3 | MatrixXf B = MatrixXf::Random(4,4); 4 | ges.compute(A, B); 5 | cout << "The (complex) numerators of the generalzied eigenvalues are: " << ges.alphas().transpose() << endl; 6 | cout << "The (real) denominatore of the generalzied eigenvalues are: " << ges.betas().transpose() << endl; 7 | cout << "The (complex) generalzied eigenvalues are (alphas./beta): " << ges.eigenvalues().transpose() << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/HessenbergDecomposition_compute.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf A = MatrixXcf::Random(4,4); 2 | HessenbergDecomposition hd(4); 3 | hd.compute(A); 4 | cout << "The matrix H in the decomposition of A is:" << endl << hd.matrixH() << endl; 5 | hd.compute(2*A); // re-use hd to compute and store decomposition of 2A 6 | cout << "The matrix H in the decomposition of 2A is:" << endl << hd.matrixH() << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/HessenbergDecomposition_matrixH.cpp: -------------------------------------------------------------------------------- 1 | Matrix4f A = MatrixXf::Random(4,4); 2 | cout << "Here is a random 4x4 matrix:" << endl << A << endl; 3 | HessenbergDecomposition hessOfA(A); 4 | MatrixXf H = hessOfA.matrixH(); 5 | cout << "The Hessenberg matrix H is:" << endl << H << endl; 6 | MatrixXf Q = hessOfA.matrixQ(); 7 | cout << "The orthogonal matrix Q is:" << endl << Q << endl; 8 | cout << "Q H Q^T is:" << endl << Q * H * Q.transpose() << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/HessenbergDecomposition_packedMatrix.cpp: -------------------------------------------------------------------------------- 1 | Matrix4d A = Matrix4d::Random(4,4); 2 | cout << "Here is a random 4x4 matrix:" << endl << A << endl; 3 | HessenbergDecomposition hessOfA(A); 4 | Matrix4d pm = hessOfA.packedMatrix(); 5 | cout << "The packed matrix M is:" << endl << pm << endl; 6 | cout << "The upper Hessenberg part corresponds to the matrix H, which is:" 7 | << endl << hessOfA.matrixH() << endl; 8 | Vector3d hc = hessOfA.householderCoefficients(); 9 | cout << "The vector of Householder coefficients is:" << endl << hc << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/HouseholderQR_householderQ.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf A(MatrixXf::Random(5,3)), thinQ(MatrixXf::Identity(5,3)), Q; 2 | A.setRandom(); 3 | HouseholderQR qr(A); 4 | Q = qr.householderQ(); 5 | thinQ = qr.householderQ() * thinQ; 6 | std::cout << "The complete unitary matrix Q is:\n" << Q << "\n\n"; 7 | std::cout << "The thin matrix Q is:\n" << thinQ << "\n\n"; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/HouseholderQR_solve.cpp: -------------------------------------------------------------------------------- 1 | typedef Matrix Matrix3x3; 2 | Matrix3x3 m = Matrix3x3::Random(); 3 | Matrix3f y = Matrix3f::Random(); 4 | cout << "Here is the matrix m:" << endl << m << endl; 5 | cout << "Here is the matrix y:" << endl << y << endl; 6 | Matrix3f x; 7 | x = m.householderQr().solve(y); 8 | assert(y.isApprox(m*x)); 9 | cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/IOFormat.cpp: -------------------------------------------------------------------------------- 1 | std::string sep = "\n----------------------------------------\n"; 2 | Matrix3d m1; 3 | m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9; 4 | 5 | IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";"); 6 | IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]"); 7 | IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]"); 8 | IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]"); 9 | 10 | std::cout << m1 << sep; 11 | std::cout << m1.format(CommaInitFmt) << sep; 12 | std::cout << m1.format(CleanFmt) << sep; 13 | std::cout << m1.format(OctaveFmt) << sep; 14 | std::cout << m1.format(HeavyFmt) << sep; 15 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/JacobiSVD_basic.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m = MatrixXf::Random(3,2); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | JacobiSVD svd(m, ComputeThinU | ComputeThinV); 4 | cout << "Its singular values are:" << endl << svd.singularValues() << endl; 5 | cout << "Its left singular vectors are the columns of the thin U matrix:" << endl << svd.matrixU() << endl; 6 | cout << "Its right singular vectors are the columns of the thin V matrix:" << endl << svd.matrixV() << endl; 7 | Vector3f rhs(1, 0, 0); 8 | cout << "Now consider this rhs vector:" << endl << rhs << endl; 9 | cout << "A least-squares solution of m*x = rhs is:" << endl << svd.solve(rhs) << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Jacobi_makeGivens.cpp: -------------------------------------------------------------------------------- 1 | Vector2f v = Vector2f::Random(); 2 | JacobiRotation G; 3 | G.makeGivens(v.x(), v.y()); 4 | cout << "Here is the vector v:" << endl << v << endl; 5 | v.applyOnTheLeft(0, 1, G.adjoint()); 6 | cout << "Here is the vector J' * v:" << endl << v << endl; -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Jacobi_makeJacobi.cpp: -------------------------------------------------------------------------------- 1 | Matrix2f m = Matrix2f::Random(); 2 | m = (m + m.adjoint()).eval(); 3 | JacobiRotation J; 4 | J.makeJacobi(m, 0, 1); 5 | cout << "Here is the matrix m:" << endl << m << endl; 6 | m.applyOnTheLeft(0, 1, J.adjoint()); 7 | m.applyOnTheRight(0, 1, J); 8 | cout << "Here is the matrix J' * m * J:" << endl << m << endl; -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/LLT_example.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd A(3,3); 2 | A << 4,-1,2, -1,6,0, 2,0,5; 3 | cout << "The matrix A is" << endl << A << endl; 4 | 5 | LLT lltOfA(A); // compute the Cholesky decomposition of A 6 | MatrixXd L = lltOfA.matrixL(); // retrieve factor L in the decomposition 7 | // The previous two lines can also be written as "L = A.llt().matrixL()" 8 | 9 | cout << "The Cholesky factor L is" << endl << L << endl; 10 | cout << "To check this, let us compute L * L.transpose()" << endl; 11 | cout << L * L.transpose() << endl; 12 | cout << "This should equal the matrix A" << endl; 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/LLT_solve.cpp: -------------------------------------------------------------------------------- 1 | typedef Matrix DataMatrix; 2 | // let's generate some samples on the 3D plane of equation z = 2x+3y (with some noise) 3 | DataMatrix samples = DataMatrix::Random(12,2); 4 | VectorXf elevations = 2*samples.col(0) + 3*samples.col(1) + VectorXf::Random(12)*0.1; 5 | // and let's solve samples * [x y]^T = elevations in least square sense: 6 | Matrix xy 7 | = (samples.adjoint() * samples).llt().solve((samples.adjoint()*elevations)); 8 | cout << xy << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Map_general_stride.cpp: -------------------------------------------------------------------------------- 1 | int array[24]; 2 | for(int i = 0; i < 24; ++i) array[i] = i; 3 | cout << Map > 4 | (array, 3, 3, Stride(8, 2)) 5 | << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Map_inner_stride.cpp: -------------------------------------------------------------------------------- 1 | int array[12]; 2 | for(int i = 0; i < 12; ++i) array[i] = i; 3 | cout << Map > 4 | (array, 6) // the inner stride has already been passed as template parameter 5 | << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Map_outer_stride.cpp: -------------------------------------------------------------------------------- 1 | int array[12]; 2 | for(int i = 0; i < 12; ++i) array[i] = i; 3 | cout << Map >(array, 3, 3, OuterStride<>(4)) << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Map_placement_new.cpp: -------------------------------------------------------------------------------- 1 | int data[] = {1,2,3,4,5,6,7,8,9}; 2 | Map v(data,4); 3 | cout << "The mapped vector v is: " << v << "\n"; 4 | new (&v) Map(data+4,5); 5 | cout << "Now v is: " << v << "\n"; -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Map_simple.cpp: -------------------------------------------------------------------------------- 1 | int array[9]; 2 | for(int i = 0; i < 9; ++i) array[i] = i; 3 | cout << Map(array) << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_adjoint.cpp: -------------------------------------------------------------------------------- 1 | Matrix2cf m = Matrix2cf::Random(); 2 | cout << "Here is the 2x2 complex matrix m:" << endl << m << endl; 3 | cout << "Here is the adjoint of m:" << endl << m.adjoint() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_all.cpp: -------------------------------------------------------------------------------- 1 | Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones()); 2 | Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs(); 3 | // let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax: 4 | cout << "Is (" << p0.transpose() << ") inside the box: " 5 | << ((boxMin.array()p0.array()).all()) << endl; 6 | cout << "Is (" << p1.transpose() << ") inside the box: " 7 | << ((boxMin.array()p1.array()).all()) << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_applyOnTheLeft.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A = Matrix3f::Random(3,3), B; 2 | B << 0,1,0, 3 | 0,0,1, 4 | 1,0,0; 5 | cout << "At start, A = " << endl << A << endl; 6 | A.applyOnTheLeft(B); 7 | cout << "After applyOnTheLeft, A = " << endl << A << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_applyOnTheRight.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A = Matrix3f::Random(3,3), B; 2 | B << 0,1,0, 3 | 0,0,1, 4 | 1,0,0; 5 | cout << "At start, A = " << endl << A << endl; 6 | A *= B; 7 | cout << "After A *= B, A = " << endl << A << endl; 8 | A.applyOnTheRight(B); // equivalent to A *= B 9 | cout << "After applyOnTheRight, A = " << endl << A << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_array.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(1,2,3); 2 | v.array() += 3; 3 | v.array() -= 2; 4 | cout << v << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_array_const.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(-1,2,-3); 2 | cout << "the absolute values:" << endl << v.array().abs() << endl; 3 | cout << "the absolute values plus one:" << endl << v.array().abs()+1 << endl; 4 | cout << "sum of the squares: " << v.array().square().sum() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_asDiagonal.cpp: -------------------------------------------------------------------------------- 1 | cout << Matrix3i(Vector3i(2,5,6).asDiagonal()) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_block_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.block<2,2>(1,1):" << endl << m.block<2,2>(1,1) << endl; 4 | m.block<2,2>(1,1).setZero(); 5 | cout << "Now the matrix m is:" << endl << m << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_block_int_int_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.block(1, 1, 2, 2):" << endl << m.block(1, 1, 2, 2) << endl; 4 | m.block(1, 1, 2, 2).setZero(); 5 | cout << "Now the matrix m is:" << endl << m << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_bottomLeftCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomLeftCorner(2, 2):" << endl; 4 | cout << m.bottomLeftCorner(2, 2) << endl; 5 | m.bottomLeftCorner(2, 2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_bottomRightCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomRightCorner(2, 2):" << endl; 4 | cout << m.bottomRightCorner(2, 2) << endl; 5 | m.bottomRightCorner(2, 2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_bottomRows_int.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.bottomRows(2):" << endl; 4 | cout << a.bottomRows(2) << endl; 5 | a.bottomRows(2).setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cast.cpp: -------------------------------------------------------------------------------- 1 | Matrix2d md = Matrix2d::Identity() * 0.45; 2 | Matrix2f mf = Matrix2f::Identity(); 3 | cout << md + mf.cast() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_col.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Identity(); 2 | m.col(1) = Vector3d(4,5,6); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_colwise.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the sum of each column:" << endl << m.colwise().sum() << endl; 4 | cout << "Here is the maximum absolute value of each column:" 5 | << endl << m.cwiseAbs().colwise().maxCoeff() << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_computeInverseAndDetWithCheck.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | Matrix3d inverse; 4 | bool invertible; 5 | double determinant; 6 | m.computeInverseAndDetWithCheck(inverse,determinant,invertible); 7 | cout << "Its determinant is " << determinant << endl; 8 | if(invertible) { 9 | cout << "It is invertible, and its inverse is:" << endl << inverse << endl; 10 | } 11 | else { 12 | cout << "It is not invertible." << endl; 13 | } 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_computeInverseWithCheck.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | Matrix3d inverse; 4 | bool invertible; 5 | m.computeInverseWithCheck(inverse,invertible); 6 | if(invertible) { 7 | cout << "It is invertible, and its inverse is:" << endl << inverse << endl; 8 | } 9 | else { 10 | cout << "It is not invertible." << endl; 11 | } 12 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseAbs.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(2,3); 2 | m << 2, -4, 6, 3 | -5, 1, 0; 4 | cout << m.cwiseAbs() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseAbs2.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(2,3); 2 | m << 2, -4, 6, 3 | -5, 1, 0; 4 | cout << m.cwiseAbs2() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m(2,2); 2 | m << 1, 0, 3 | 1, 1; 4 | cout << "Comparing m with identity matrix:" << endl; 5 | cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl; 6 | int count = m.cwiseEqual(MatrixXi::Identity(2,2)).count(); 7 | cout << "Number of coefficients that are equal: " << count << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseInverse.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(2,3); 2 | m << 2, 0.5, 1, 3 | 3, 0.25, 1; 4 | cout << m.cwiseInverse() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseMax.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(2,3,4), w(4,2,3); 2 | cout << v.cwiseMax(w) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseMin.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(2,3,4), w(4,2,3); 2 | cout << v.cwiseMin(w) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseNotEqual.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m(2,2); 2 | m << 1, 0, 3 | 1, 1; 4 | cout << "Comparing m with identity matrix:" << endl; 5 | cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl; 6 | int count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count(); 7 | cout << "Number of coefficients that are not equal: " << count << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseProduct.cpp: -------------------------------------------------------------------------------- 1 | Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random(); 2 | Matrix3i c = a.cwiseProduct(b); 3 | cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl; 4 | 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseQuotient.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(2,3,4), w(4,2,3); 2 | cout << v.cwiseQuotient(w) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_cwiseSqrt.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(1,2,4); 2 | cout << v.cwiseSqrt() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_diagonal.cpp: -------------------------------------------------------------------------------- 1 | Matrix3i m = Matrix3i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here are the coefficients on the main diagonal of m:" << endl 4 | << m.diagonal() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_diagonal_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl 4 | << m.diagonal(1).transpose() << endl 5 | << m.diagonal(-2).transpose() << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_diagonal_template_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl 4 | << m.diagonal<1>().transpose() << endl 5 | << m.diagonal<-2>().transpose() << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_eigenvalues.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | VectorXcd eivals = ones.eigenvalues(); 3 | cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_end_int.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.tail(2):" << endl << v.tail(2) << endl; 4 | v.tail(2).setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_eval.cpp: -------------------------------------------------------------------------------- 1 | Matrix2f M = Matrix2f::Random(); 2 | Matrix2f m; 3 | m = M; 4 | cout << "Here is the matrix m:" << endl << m << endl; 5 | cout << "Now we want to copy a column into a row." << endl; 6 | cout << "If we do m.col(1) = m.row(0), then m becomes:" << endl; 7 | m.col(1) = m.row(0); 8 | cout << m << endl << "which is wrong!" << endl; 9 | cout << "Now let us instead do m.col(1) = m.row(0).eval(). Then m becomes" << endl; 10 | m = M; 11 | m.col(1) = m.row(0).eval(); 12 | cout << m << endl << "which is right." << endl; 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_extract.cpp: -------------------------------------------------------------------------------- 1 | #ifndef _MSC_VER 2 | #warning deprecated 3 | #endif 4 | /* deprecated 5 | Matrix3i m = Matrix3i::Random(); 6 | cout << "Here is the matrix m:" << endl << m << endl; 7 | cout << "Here is the upper-triangular matrix extracted from m:" << endl 8 | << m.part() << endl; 9 | cout << "Here is the strictly-upper-triangular matrix extracted from m:" << endl 10 | << m.part() << endl; 11 | cout << "Here is the unit-lower-triangular matrix extracted from m:" << endl 12 | << m.part() << endl; 13 | */ -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_fixedBlock_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4d m = Vector4d(1,2,3,4).asDiagonal(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.fixed<2, 2>(2, 2):" << endl << m.block<2, 2>(2, 2) << endl; 4 | m.block<2, 2>(2, 0) = m.block<2, 2>(2, 2); 5 | cout << "Now the matrix m is:" << endl << m << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_identity.cpp: -------------------------------------------------------------------------------- 1 | cout << Matrix::Identity() << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_identity_int_int.cpp: -------------------------------------------------------------------------------- 1 | cout << MatrixXd::Identity(4, 3) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_inverse.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Its inverse is:" << endl << m.inverse() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isDiagonal.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = 10000 * Matrix3d::Identity(); 2 | m(0,2) = 1; 3 | cout << "Here's the matrix m:" << endl << m << endl; 4 | cout << "m.isDiagonal() returns: " << m.isDiagonal() << endl; 5 | cout << "m.isDiagonal(1e-3) returns: " << m.isDiagonal(1e-3) << endl; 6 | 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isIdentity.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Identity(); 2 | m(0,2) = 1e-4; 3 | cout << "Here's the matrix m:" << endl << m << endl; 4 | cout << "m.isIdentity() returns: " << m.isIdentity() << endl; 5 | cout << "m.isIdentity(1e-3) returns: " << m.isIdentity(1e-3) << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isOnes.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Ones(); 2 | m(0,2) += 1e-4; 3 | cout << "Here's the matrix m:" << endl << m << endl; 4 | cout << "m.isOnes() returns: " << m.isOnes() << endl; 5 | cout << "m.isOnes(1e-3) returns: " << m.isOnes(1e-3) << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isOrthogonal.cpp: -------------------------------------------------------------------------------- 1 | Vector3d v(1,0,0); 2 | Vector3d w(1e-4,0,1); 3 | cout << "Here's the vector v:" << endl << v << endl; 4 | cout << "Here's the vector w:" << endl << w << endl; 5 | cout << "v.isOrthogonal(w) returns: " << v.isOrthogonal(w) << endl; 6 | cout << "v.isOrthogonal(w,1e-3) returns: " << v.isOrthogonal(w,1e-3) << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isUnitary.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Identity(); 2 | m(0,2) = 1e-4; 3 | cout << "Here's the matrix m:" << endl << m << endl; 4 | cout << "m.isUnitary() returns: " << m.isUnitary() << endl; 5 | cout << "m.isUnitary(1e-3) returns: " << m.isUnitary(1e-3) << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_isZero.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Zero(); 2 | m(0,2) = 1e-4; 3 | cout << "Here's the matrix m:" << endl << m << endl; 4 | cout << "m.isZero() returns: " << m.isZero() << endl; 5 | cout << "m.isZero(1e-3) returns: " << m.isZero(1e-3) << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_leftCols_int.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.leftCols(2):" << endl; 4 | cout << a.leftCols(2) << endl; 5 | a.leftCols(2).setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_marked.cpp: -------------------------------------------------------------------------------- 1 | #ifndef _MSC_VER 2 | #warning deprecated 3 | #endif 4 | /* 5 | Matrix3d m = Matrix3d::Zero(); 6 | m.part().setOnes(); 7 | cout << "Here is the matrix m:" << endl << m << endl; 8 | Matrix3d n = Matrix3d::Ones(); 9 | n.part() *= 2; 10 | cout << "Here is the matrix n:" << endl << n << endl; 11 | cout << "And now here is m.inverse()*n, taking advantage of the fact that" 12 | " m is upper-triangular:" << endl 13 | << m.marked().solveTriangular(n); 14 | */ -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_noalias.cpp: -------------------------------------------------------------------------------- 1 | Matrix2d a, b, c; a << 1,2,3,4; b << 5,6,7,8; 2 | c.noalias() = a * b; // this computes the product directly to c 3 | cout << c << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_ones.cpp: -------------------------------------------------------------------------------- 1 | cout << Matrix2d::Ones() << endl; 2 | cout << 6 * RowVector4i::Ones() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_ones_int.cpp: -------------------------------------------------------------------------------- 1 | cout << 6 * RowVectorXi::Ones(4) << endl; 2 | cout << VectorXf::Ones(2) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_ones_int_int.cpp: -------------------------------------------------------------------------------- 1 | cout << MatrixXi::Ones(2,3) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_operatorNorm.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | cout << "The operator norm of the 3x3 matrix of ones is " 3 | << ones.operatorNorm() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_part.cpp: -------------------------------------------------------------------------------- 1 | #ifndef _MSC_VER 2 | #warning deprecated 3 | #endif 4 | /* 5 | Matrix3d m = Matrix3d::Zero(); 6 | m.part().setOnes(); 7 | cout << "Here is the matrix m:" << endl << m << endl; 8 | cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl 9 | << "taking advantage of the symmetry." << endl; 10 | Matrix3d n; 11 | n.part() = (m*m.adjoint()).lazy(); 12 | cout << "The result is:" << endl << n << endl; 13 | */ -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_prod.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the product of all the coefficients:" << endl << m.prod() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_random.cpp: -------------------------------------------------------------------------------- 1 | cout << 100 * Matrix2i::Random() << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_random_int.cpp: -------------------------------------------------------------------------------- 1 | cout << VectorXi::Random(2) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_random_int_int.cpp: -------------------------------------------------------------------------------- 1 | cout << MatrixXi::Random(2,3) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_replicate.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m = MatrixXi::Random(2,3); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "m.replicate<3,2>() = ..." << endl; 4 | cout << m.replicate<3,2>() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_replicate_int_int.cpp: -------------------------------------------------------------------------------- 1 | Vector3i v = Vector3i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "v.replicate(2,5) = ..." << endl; 4 | cout << v.replicate(2,5) << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_reverse.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m = MatrixXi::Random(3,4); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the reverse of m:" << endl << m.reverse() << endl; 4 | cout << "Here is the coefficient (1,0) in the reverse of m:" << endl 5 | << m.reverse()(1,0) << endl; 6 | cout << "Let us overwrite this coefficient with the value 4." << endl; 7 | m.reverse()(1,0) = 4; 8 | cout << "Now the matrix m is:" << endl << m << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_rightCols_int.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.rightCols(2):" << endl; 4 | cout << a.rightCols(2) << endl; 5 | a.rightCols(2).setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_row.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Identity(); 2 | m.row(1) = Vector3d(4,5,6); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_rowwise.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl; 4 | cout << "Here is the maximum absolute value of each row:" 5 | << endl << m.cwiseAbs().rowwise().maxCoeff() << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_segment_int_int.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.segment(1, 2):" << endl << v.segment(1, 2) << endl; 4 | v.segment(1, 2).setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_select.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m(3, 3); 2 | m << 1, 2, 3, 3 | 4, 5, 6, 4 | 7, 8, 9; 5 | m = (m.array() >= 5).select(-m, m); 6 | cout << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_set.cpp: -------------------------------------------------------------------------------- 1 | Matrix3i m1; 2 | m1 << 1, 2, 3, 3 | 4, 5, 6, 4 | 7, 8, 9; 5 | cout << m1 << endl << endl; 6 | Matrix3i m2 = Matrix3i::Identity(); 7 | m2.block(0,0, 2,2) << 10, 11, 12, 13; 8 | cout << m2 << endl << endl; 9 | Vector2i v1; 10 | v1 << 14, 15; 11 | m2 << v1.transpose(), 16, 12 | v1, m1.block(1,1,2,2); 13 | cout << m2 << endl; 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_setIdentity.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Zero(); 2 | m.block<3,3>(1,0).setIdentity(); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_setOnes.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | m.row(1).setOnes(); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_setRandom.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Zero(); 2 | m.col(1).setRandom(); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_setZero.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | m.row(1).setZero(); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_start_int.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.head(2):" << endl << v.head(2) << endl; 4 | v.head(2).setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_bottomRows.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.bottomRows<2>():" << endl; 4 | cout << a.bottomRows<2>() << endl; 5 | a.bottomRows<2>().setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_end.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.tail(2):" << endl << v.tail<2>() << endl; 4 | v.tail<2>().setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_block_int_int_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the block:" << endl << m.block<2, Dynamic>(1, 1, 2, 3) << endl; 4 | m.block<2, Dynamic>(1, 1, 2, 3).setZero(); 5 | cout << "Now the matrix m is:" << endl << m << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomLeftCorner<2,2>():" << endl; 4 | cout << m.bottomLeftCorner<2,2>() << endl; 5 | m.bottomLeftCorner<2,2>().setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomLeftCorner<2,Dynamic>(2,2):" << endl; 4 | cout << m.bottomLeftCorner<2,Dynamic>(2,2) << endl; 5 | m.bottomLeftCorner<2,Dynamic>(2,2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomRightCorner<2,2>():" << endl; 4 | cout << m.bottomRightCorner<2,2>() << endl; 5 | m.bottomRightCorner<2,2>().setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_bottomRightCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.bottomRightCorner<2,Dynamic>(2,2):" << endl; 4 | cout << m.bottomRightCorner<2,Dynamic>(2,2) << endl; 5 | m.bottomRightCorner<2,Dynamic>(2,2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topLeftCorner<2,2>():" << endl; 4 | cout << m.topLeftCorner<2,2>() << endl; 5 | m.topLeftCorner<2,2>().setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_topLeftCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topLeftCorner<2,Dynamic>(2,2):" << endl; 4 | cout << m.topLeftCorner<2,Dynamic>(2,2) << endl; 5 | m.topLeftCorner<2,Dynamic>(2,2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topRightCorner<2,2>():" << endl; 4 | cout << m.topRightCorner<2,2>() << endl; 5 | m.topRightCorner<2,2>().setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_int_topRightCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topRightCorner<2,Dynamic>(2,2):" << endl; 4 | cout << m.topRightCorner<2,Dynamic>(2,2) << endl; 5 | m.topRightCorner<2,Dynamic>(2,2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_leftCols.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.leftCols<2>():" << endl; 4 | cout << a.leftCols<2>() << endl; 5 | a.leftCols<2>().setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_rightCols.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.rightCols<2>():" << endl; 4 | cout << a.rightCols<2>() << endl; 5 | a.rightCols<2>().setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_segment.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.segment<2>(1):" << endl << v.segment<2>(1) << endl; 4 | v.segment<2>(2).setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_start.cpp: -------------------------------------------------------------------------------- 1 | RowVector4i v = RowVector4i::Random(); 2 | cout << "Here is the vector v:" << endl << v << endl; 3 | cout << "Here is v.head(2):" << endl << v.head<2>() << endl; 4 | v.head<2>().setZero(); 5 | cout << "Now the vector v is:" << endl << v << endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_template_int_topRows.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.topRows<2>():" << endl; 4 | cout << a.topRows<2>() << endl; 5 | a.topRows<2>().setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_topLeftCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topLeftCorner(2, 2):" << endl; 4 | cout << m.topLeftCorner(2, 2) << endl; 5 | m.topLeftCorner(2, 2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_topRightCorner_int_int.cpp: -------------------------------------------------------------------------------- 1 | Matrix4i m = Matrix4i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is m.topRightCorner(2, 2):" << endl; 4 | cout << m.topRightCorner(2, 2) << endl; 5 | m.topRightCorner(2, 2).setZero(); 6 | cout << "Now the matrix m is:" << endl << m << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_topRows_int.cpp: -------------------------------------------------------------------------------- 1 | Array44i a = Array44i::Random(); 2 | cout << "Here is the array a:" << endl << a << endl; 3 | cout << "Here is a.topRows(2):" << endl; 4 | cout << a.topRows(2) << endl; 5 | a.topRows(2).setZero(); 6 | cout << "Now the array a is:" << endl << a << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_transpose.cpp: -------------------------------------------------------------------------------- 1 | Matrix2i m = Matrix2i::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the transpose of m:" << endl << m.transpose() << endl; 4 | cout << "Here is the coefficient (1,0) in the transpose of m:" << endl 5 | << m.transpose()(1,0) << endl; 6 | cout << "Let us overwrite this coefficient with the value 0." << endl; 7 | m.transpose()(1,0) = 0; 8 | cout << "Now the matrix m is:" << endl << m << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_zero.cpp: -------------------------------------------------------------------------------- 1 | cout << Matrix2d::Zero() << endl; 2 | cout << RowVector4i::Zero() << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_zero_int.cpp: -------------------------------------------------------------------------------- 1 | cout << RowVectorXi::Zero(4) << endl; 2 | cout << VectorXf::Zero(2) << endl; 3 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/MatrixBase_zero_int_int.cpp: -------------------------------------------------------------------------------- 1 | cout << MatrixXi::Zero(2,3) << endl; 2 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_resize_NoChange_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(3,4); 2 | m.resize(NoChange, 5); 3 | cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_resize_int.cpp: -------------------------------------------------------------------------------- 1 | VectorXd v(10); 2 | v.resize(3); 3 | RowVector3d w; 4 | w.resize(3); // this is legal, but has no effect 5 | cout << "v: " << v.rows() << " rows, " << v.cols() << " cols" << endl; 6 | cout << "w: " << w.rows() << " rows, " << w.cols() << " cols" << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_resize_int_NoChange.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(3,4); 2 | m.resize(5, NoChange); 3 | cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_resize_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd m(2,3); 2 | m << 1,2,3,4,5,6; 3 | cout << "here's the 2x3 matrix m:" << endl << m << endl; 4 | cout << "let's resize m to 3x2. This is a conservative resizing because 2*3==3*2." << endl; 5 | m.resize(3,2); 6 | cout << "here's the 3x2 matrix m:" << endl << m << endl; 7 | cout << "now let's resize m to size 2x2. This is NOT a conservative resizing, so it becomes uninitialized:" << endl; 8 | m.resize(2,2); 9 | cout << m << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setConstant_int.cpp: -------------------------------------------------------------------------------- 1 | VectorXf v; 2 | v.setConstant(3, 5); 3 | cout << v << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setConstant_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m; 2 | m.setConstant(3, 3, 5); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setIdentity_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m; 2 | m.setIdentity(3, 3); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setOnes_int.cpp: -------------------------------------------------------------------------------- 1 | VectorXf v; 2 | v.setOnes(3); 3 | cout << v << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setOnes_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m; 2 | m.setOnes(3, 3); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setRandom_int.cpp: -------------------------------------------------------------------------------- 1 | VectorXf v; 2 | v.setRandom(3); 3 | cout << v << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setRandom_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m; 2 | m.setRandom(3, 3); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setZero_int.cpp: -------------------------------------------------------------------------------- 1 | VectorXf v; 2 | v.setZero(3); 3 | cout << v << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Matrix_setZero_int_int.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf m; 2 | m.setZero(3, 3); 3 | cout << m << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialPivLU_solve.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd A = MatrixXd::Random(3,3); 2 | MatrixXd B = MatrixXd::Random(3,2); 3 | cout << "Here is the invertible matrix A:" << endl << A << endl; 4 | cout << "Here is the matrix B:" << endl << B << endl; 5 | MatrixXd X = A.lu().solve(B); 6 | cout << "Here is the (unique) solution X to the equation AX=B:" << endl << X << endl; 7 | cout << "Relative error: " << (A*X-B).norm() / B.norm() << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_count.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl << (m.array() >= 0.5).rowwise().count() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_maxCoeff.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_minCoeff.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_norm.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_prod.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the product of each row:" << endl << m.rowwise().prod() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_squaredNorm.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the square norm of each row:" << endl << m.rowwise().squaredNorm() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/PartialRedux_sum.cpp: -------------------------------------------------------------------------------- 1 | Matrix3d m = Matrix3d::Random(); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/RealSchur_RealSchur_MatrixType.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd A = MatrixXd::Random(6,6); 2 | cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; 3 | 4 | RealSchur schur(A); 5 | cout << "The orthogonal matrix U is:" << endl << schur.matrixU() << endl; 6 | cout << "The quasi-triangular matrix T is:" << endl << schur.matrixT() << endl << endl; 7 | 8 | MatrixXd U = schur.matrixU(); 9 | MatrixXd T = schur.matrixT(); 10 | cout << "U * T * U^T = " << endl << U * T * U.transpose() << endl; 11 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/RealSchur_compute.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf A = MatrixXf::Random(4,4); 2 | RealSchur schur(4); 3 | schur.compute(A, /* computeU = */ false); 4 | cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl; 5 | schur.compute(A.inverse(), /* computeU = */ false); 6 | cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp: -------------------------------------------------------------------------------- 1 | SelfAdjointEigenSolver es; 2 | Matrix4f X = Matrix4f::Random(4,4); 3 | Matrix4f A = X + X.transpose(); 4 | es.compute(A); 5 | cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; 6 | es.compute(A + Matrix4f::Identity(4,4)); // re-use es to compute eigenvalues of A+I 7 | cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType.cpp: -------------------------------------------------------------------------------- 1 | SelfAdjointEigenSolver es(4); 2 | MatrixXf X = MatrixXf::Random(4,4); 3 | MatrixXf A = X + X.transpose(); 4 | es.compute(A); 5 | cout << "The eigenvalues of A are: " << es.eigenvalues().transpose() << endl; 6 | es.compute(A + MatrixXf::Identity(4,4)); // re-use es to compute eigenvalues of A+I 7 | cout << "The eigenvalues of A+I are: " << es.eigenvalues().transpose() << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_compute_MatrixType2.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd X = MatrixXd::Random(5,5); 2 | MatrixXd A = X * X.transpose(); 3 | X = MatrixXd::Random(5,5); 4 | MatrixXd B = X * X.transpose(); 5 | 6 | GeneralizedSelfAdjointEigenSolver es(A,B,EigenvaluesOnly); 7 | cout << "The eigenvalues of the pencil (A,B) are:" << endl << es.eigenvalues() << endl; 8 | es.compute(B,A,false); 9 | cout << "The eigenvalues of the pencil (B,A) are:" << endl << es.eigenvalues() << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvalues.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | SelfAdjointEigenSolver es(ones); 3 | cout << "The eigenvalues of the 3x3 matrix of ones are:" 4 | << endl << es.eigenvalues() << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_eigenvectors.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | SelfAdjointEigenSolver es(ones); 3 | cout << "The first eigenvector of the 3x3 matrix of ones is:" 4 | << endl << es.eigenvectors().col(1) << endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_operatorInverseSqrt.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd X = MatrixXd::Random(4,4); 2 | MatrixXd A = X * X.transpose(); 3 | cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl; 4 | 5 | SelfAdjointEigenSolver es(A); 6 | cout << "The inverse square root of A is: " << endl; 7 | cout << es.operatorInverseSqrt() << endl; 8 | cout << "We can also compute it with operatorSqrt() and inverse(). That yields: " << endl; 9 | cout << es.operatorSqrt().inverse() << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointEigenSolver_operatorSqrt.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd X = MatrixXd::Random(4,4); 2 | MatrixXd A = X * X.transpose(); 3 | cout << "Here is a random positive-definite matrix, A:" << endl << A << endl << endl; 4 | 5 | SelfAdjointEigenSolver es(A); 6 | MatrixXd sqrtA = es.operatorSqrt(); 7 | cout << "The square root of A is: " << endl << sqrtA << endl; 8 | cout << "If we square this, we get: " << endl << sqrtA*sqrtA << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointView_eigenvalues.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | VectorXd eivals = ones.selfadjointView().eigenvalues(); 3 | cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/SelfAdjointView_operatorNorm.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd ones = MatrixXd::Ones(3,3); 2 | cout << "The operator norm of the 3x3 matrix of ones is " 3 | << ones.selfadjointView().operatorNorm() << endl; 4 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_block.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi mat(3,3); 2 | mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; 3 | cout << "Here is the matrix mat:\n" << mat << endl; 4 | 5 | // This assignment shows the aliasing problem 6 | mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2); 7 | cout << "After the assignment, mat = \n" << mat << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_block_correct.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi mat(3,3); 2 | mat << 1, 2, 3, 4, 5, 6, 7, 8, 9; 3 | cout << "Here is the matrix mat:\n" << mat << endl; 4 | 5 | // The eval() solves the aliasing problem 6 | mat.bottomRightCorner(2,2) = mat.topLeftCorner(2,2).eval(); 7 | cout << "After the assignment, mat = \n" << mat << endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_cwise.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf mat(2,2); 2 | mat << 1, 2, 4, 7; 3 | cout << "Here is the matrix mat:\n" << mat << endl << endl; 4 | 5 | mat = 2 * mat; 6 | cout << "After 'mat = 2 * mat', mat = \n" << mat << endl << endl; 7 | 8 | 9 | mat = mat - MatrixXf::Identity(2,2); 10 | cout << "After the subtraction, it becomes\n" << mat << endl << endl; 11 | 12 | 13 | ArrayXXf arr = mat; 14 | arr = arr.square(); 15 | cout << "After squaring, it becomes\n" << arr << endl << endl; 16 | 17 | // Combining all operations in one statement: 18 | mat << 1, 2, 4, 7; 19 | mat = (2 * mat - MatrixXf::Identity(2,2)).array().square(); 20 | cout << "Doing everything at once yields\n" << mat << endl << endl; 21 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_mult1.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf matA(2,2); 2 | matA << 2, 0, 0, 2; 3 | matA = matA * matA; 4 | cout << matA; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_mult2.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf matA(2,2), matB(2,2); 2 | matA << 2, 0, 0, 2; 3 | 4 | // Simple but not quite as efficient 5 | matB = matA * matA; 6 | cout << matB << endl << endl; 7 | 8 | // More complicated but also more efficient 9 | matB.noalias() = matA * matA; 10 | cout << matB; 11 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicAliasing_mult3.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf matA(2,2); 2 | matA << 2, 0, 0, 2; 3 | matA.noalias() = matA * matA; 4 | cout << matA; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/TopicStorageOrders_example.cpp: -------------------------------------------------------------------------------- 1 | Matrix Acolmajor; 2 | Acolmajor << 8, 2, 2, 9, 3 | 9, 1, 4, 4, 4 | 3, 5, 4, 5; 5 | cout << "The matrix A:" << endl; 6 | cout << Acolmajor << endl << endl; 7 | 8 | cout << "In memory (column-major):" << endl; 9 | for (int i = 0; i < Acolmajor.size(); i++) 10 | cout << *(Acolmajor.data() + i) << " "; 11 | cout << endl << endl; 12 | 13 | Matrix Arowmajor = Acolmajor; 14 | cout << "In memory (row-major):" << endl; 15 | for (int i = 0; i < Arowmajor.size(); i++) 16 | cout << *(Arowmajor.data() + i) << " "; 17 | cout << endl; 18 | 19 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_Tridiagonalization_MatrixType.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd X = MatrixXd::Random(5,5); 2 | MatrixXd A = X + X.transpose(); 3 | cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl; 4 | Tridiagonalization triOfA(A); 5 | MatrixXd Q = triOfA.matrixQ(); 6 | cout << "The orthogonal matrix Q is:" << endl << Q << endl; 7 | MatrixXd T = triOfA.matrixT(); 8 | cout << "The tridiagonal matrix T is:" << endl << T << endl << endl; 9 | cout << "Q * T * Q^T = " << endl << Q * T * Q.transpose() << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_compute.cpp: -------------------------------------------------------------------------------- 1 | Tridiagonalization tri; 2 | MatrixXf X = MatrixXf::Random(4,4); 3 | MatrixXf A = X + X.transpose(); 4 | tri.compute(A); 5 | cout << "The matrix T in the tridiagonal decomposition of A is: " << endl; 6 | cout << tri.matrixT() << endl; 7 | tri.compute(2*A); // re-use tri to compute eigenvalues of 2A 8 | cout << "The matrix T in the tridiagonal decomposition of 2A is: " << endl; 9 | cout << tri.matrixT() << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_decomposeInPlace.cpp: -------------------------------------------------------------------------------- 1 | MatrixXd X = MatrixXd::Random(5,5); 2 | MatrixXd A = X + X.transpose(); 3 | cout << "Here is a random symmetric 5x5 matrix:" << endl << A << endl << endl; 4 | 5 | VectorXd diag(5); 6 | VectorXd subdiag(4); 7 | internal::tridiagonalization_inplace(A, diag, subdiag, true); 8 | cout << "The orthogonal matrix Q is:" << endl << A << endl; 9 | cout << "The diagonal of the tridiagonal matrix T is:" << endl << diag << endl; 10 | cout << "The subdiagonal of the tridiagonal matrix T is:" << endl << subdiag << endl; 11 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_diagonal.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcd X = MatrixXcd::Random(4,4); 2 | MatrixXcd A = X + X.adjoint(); 3 | cout << "Here is a random self-adjoint 4x4 matrix:" << endl << A << endl << endl; 4 | 5 | Tridiagonalization triOfA(A); 6 | MatrixXd T = triOfA.matrixT(); 7 | cout << "The tridiagonal matrix T is:" << endl << T << endl << endl; 8 | 9 | cout << "We can also extract the diagonals of T directly ..." << endl; 10 | VectorXd diag = triOfA.diagonal(); 11 | cout << "The diagonal is:" << endl << diag << endl; 12 | VectorXd subdiag = triOfA.subDiagonal(); 13 | cout << "The subdiagonal is:" << endl << subdiag << endl; 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_householderCoefficients.cpp: -------------------------------------------------------------------------------- 1 | Matrix4d X = Matrix4d::Random(4,4); 2 | Matrix4d A = X + X.transpose(); 3 | cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl; 4 | Tridiagonalization triOfA(A); 5 | Vector3d hc = triOfA.householderCoefficients(); 6 | cout << "The vector of Householder coefficients is:" << endl << hc << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tridiagonalization_packedMatrix.cpp: -------------------------------------------------------------------------------- 1 | Matrix4d X = Matrix4d::Random(4,4); 2 | Matrix4d A = X + X.transpose(); 3 | cout << "Here is a random symmetric 4x4 matrix:" << endl << A << endl; 4 | Tridiagonalization triOfA(A); 5 | Matrix4d pm = triOfA.packedMatrix(); 6 | cout << "The packed matrix M is:" << endl << pm << endl; 7 | cout << "The diagonal and subdiagonal corresponds to the matrix T, which is:" 8 | << endl << triOfA.matrixT() << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_AdvancedInitialization_Block.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf matA(2, 2); 2 | matA << 1, 2, 3, 4; 3 | MatrixXf matB(4, 4); 4 | matB << matA, matA/10, matA/10, matA; 5 | std::cout << matB << std::endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_AdvancedInitialization_CommaTemporary.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf mat = MatrixXf::Random(2, 3); 2 | std::cout << mat << std::endl << std::endl; 3 | mat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat; 4 | std::cout << mat << std::endl; 5 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_AdvancedInitialization_Join.cpp: -------------------------------------------------------------------------------- 1 | RowVectorXd vec1(3); 2 | vec1 << 1, 2, 3; 3 | std::cout << "vec1 = " << vec1 << std::endl; 4 | 5 | RowVectorXd vec2(4); 6 | vec2 << 1, 4, 9, 16;; 7 | std::cout << "vec2 = " << vec2 << std::endl; 8 | 9 | RowVectorXd joined(7); 10 | joined << vec1, vec2; 11 | std::cout << "joined = " << joined << std::endl; 12 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_AdvancedInitialization_LinSpaced.cpp: -------------------------------------------------------------------------------- 1 | ArrayXXf table(10, 4); 2 | table.col(0) = ArrayXf::LinSpaced(10, 0, 90); 3 | table.col(1) = M_PI / 180 * table.col(0); 4 | table.col(2) = table.col(1).sin(); 5 | table.col(3) = table.col(1).cos(); 6 | std::cout << " Degrees Radians Sine Cosine\n"; 7 | std::cout << table << std::endl; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_AdvancedInitialization_Zero.cpp: -------------------------------------------------------------------------------- 1 | std::cout << "A fixed-size array:\n"; 2 | Array33f a1 = Array33f::Zero(); 3 | std::cout << a1 << "\n\n"; 4 | 5 | 6 | std::cout << "A one-dimensional dynamic-size array:\n"; 7 | ArrayXf a2 = ArrayXf::Zero(3); 8 | std::cout << a2 << "\n\n"; 9 | 10 | 11 | std::cout << "A two-dimensional dynamic-size array:\n"; 12 | ArrayXXf a3 = ArrayXXf::Zero(3, 4); 13 | std::cout << a3 << "\n"; 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_Map_rowmajor.cpp: -------------------------------------------------------------------------------- 1 | int array[8]; 2 | for(int i = 0; i < 8; ++i) array[i] = i; 3 | cout << "Column-major:\n" << Map >(array) << endl; 4 | cout << "Row-major:\n" << Map >(array) << endl; 5 | cout << "Row-major using stride:\n" << 6 | Map, Unaligned, Stride<1,4> >(array) << endl; 7 | 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_commainit_01.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m; 2 | m << 1, 2, 3, 3 | 4, 5, 6, 4 | 7, 8, 9; 5 | std::cout << m; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_commainit_01b.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m; 2 | m.row(0) << 1, 2, 3; 3 | m.block(1,0,2,2) << 4, 5, 7, 8; 4 | m.col(2).tail(2) << 6, 9; 5 | std::cout << m; 6 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_commainit_02.cpp: -------------------------------------------------------------------------------- 1 | int rows=5, cols=5; 2 | MatrixXf m(rows,cols); 3 | m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(), 4 | MatrixXf::Zero(3,cols-3), 5 | MatrixXf::Zero(rows-3,3), 6 | MatrixXf::Identity(rows-3,cols-3); 7 | cout << m; 8 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_matrix_inverse.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A; 2 | Vector3f b; 3 | A << 1,2,3, 4,5,6, 7,8,10; 4 | b << 3, 3, 4; 5 | Vector3f x = A.inverse() * b; 6 | cout << "The solution is:" << endl << x << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_multiple_rhs.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A(3,3); 2 | A << 1,2,3, 4,5,6, 7,8,10; 3 | Matrix B; 4 | B << 3,1, 3,1, 4,1; 5 | Matrix X; 6 | X = A.fullPivLu().solve(B); 7 | cout << "The solution with right-hand side (3,3,4) is:" << endl; 8 | cout << X.col(0) << endl; 9 | cout << "The solution with right-hand side (1,1,1) is:" << endl; 10 | cout << X.col(1) << endl; 11 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_reuse_decomposition.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A(3,3); 2 | A << 1,2,3, 4,5,6, 7,8,10; 3 | PartialPivLU luOfA(A); // compute LU decomposition of A 4 | Vector3f b; 5 | b << 3,3,4; 6 | Vector3f x; 7 | x = luOfA.solve(b); 8 | cout << "The solution with right-hand side (3,3,4) is:" << endl; 9 | cout << x << endl; 10 | b << 1,1,1; 11 | x = luOfA.solve(b); 12 | cout << "The solution with right-hand side (1,1,1) is:" << endl; 13 | cout << x << endl; 14 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_singular.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A; 2 | Vector3f b; 3 | A << 1,2,3, 4,5,6, 7,8,9; 4 | b << 3, 3, 4; 5 | cout << "Here is the matrix A:" << endl << A << endl; 6 | cout << "Here is the vector b:" << endl << b << endl; 7 | Vector3f x; 8 | x = A.lu().solve(b); 9 | cout << "The solution is:" << endl << x << endl; 10 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_triangular.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A; 2 | Vector3f b; 3 | A << 1,2,3, 0,5,6, 0,0,10; 4 | b << 3, 3, 4; 5 | cout << "Here is the matrix A:" << endl << A << endl; 6 | cout << "Here is the vector b:" << endl << b << endl; 7 | Vector3f x = A.triangularView().solve(b); 8 | cout << "The solution is:" << endl << x << endl; 9 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Tutorial_solve_triangular_inplace.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f A; 2 | Vector3f b; 3 | A << 1,2,3, 0,5,6, 0,0,10; 4 | b << 3, 3, 4; 5 | A.triangularView().solveInPlace(b); 6 | cout << "The solution is:" << endl << b << endl; 7 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/Vectorwise_reverse.cpp: -------------------------------------------------------------------------------- 1 | MatrixXi m = MatrixXi::Random(3,4); 2 | cout << "Here is the matrix m:" << endl << m << endl; 3 | cout << "Here is the rowwise reverse of m:" << endl << m.rowwise().reverse() << endl; 4 | cout << "Here is the colwise reverse of m:" << endl << m.colwise().reverse() << endl; 5 | 6 | cout << "Here is the coefficient (1,0) in the rowise reverse of m:" << endl 7 | << m.rowwise().reverse()(1,0) << endl; 8 | cout << "Let us overwrite this coefficient with the value 4." << endl; 9 | //m.colwise().reverse()(1,0) = 4; 10 | cout << "Now the matrix m is:" << endl << m << endl; 11 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/compile_snippet.cpp.in: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | using namespace std; 6 | 7 | int main(int, char**) 8 | { 9 | cout.precision(3); 10 | ${snippet_source_code} 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/tut_arithmetic_redux_minmax.cpp: -------------------------------------------------------------------------------- 1 | Matrix3f m = Matrix3f::Random(); 2 | std::ptrdiff_t i, j; 3 | float minOfM = m.minCoeff(&i,&j); 4 | cout << "Here is the matrix m:\n" << m << endl; 5 | cout << "Its minimum coefficient (" << minOfM 6 | << ") is at position (" << i << "," << j << ")\n\n"; 7 | 8 | RowVector4i v = RowVector4i::Random(); 9 | int maxOfV = v.maxCoeff(&i); 10 | cout << "Here is the vector v: " << v << endl; 11 | cout << "Its maximum coefficient (" << maxOfV 12 | << ") is at position " << i << endl; 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp: -------------------------------------------------------------------------------- 1 | Matrix2i a; a << 1, 2, 3, 4; 2 | cout << "Here is the matrix a:\n" << a << endl; 3 | 4 | a = a.transpose(); // !!! do NOT do this !!! 5 | cout << "and the result of the aliasing effect:\n" << a << endl; -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/tut_arithmetic_transpose_conjugate.cpp: -------------------------------------------------------------------------------- 1 | MatrixXcf a = MatrixXcf::Random(2,2); 2 | cout << "Here is the matrix a\n" << a << endl; 3 | 4 | cout << "Here is the matrix a^T\n" << a.transpose() << endl; 5 | 6 | 7 | cout << "Here is the conjugate of a\n" << a.conjugate() << endl; 8 | 9 | 10 | cout << "Here is the matrix a^*\n" << a.adjoint() << endl; 11 | 12 | 13 | -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/tut_arithmetic_transpose_inplace.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6; 2 | cout << "Here is the initial matrix a:\n" << a << endl; 3 | 4 | 5 | a.transposeInPlace(); 6 | cout << "and after being transposed:\n" << a << endl; -------------------------------------------------------------------------------- /deps/eigen/doc/snippets/tut_matrix_assignment_resizing.cpp: -------------------------------------------------------------------------------- 1 | MatrixXf a(2,2); 2 | std::cout << "a is of size " << a.rows() << "x" << a.cols() << std::endl; 3 | MatrixXf b(3,3); 4 | a = b; 5 | std::cout << "a is now of size " << a.rows() << "x" << a.cols() << std::endl; 6 | -------------------------------------------------------------------------------- /deps/eigen/eigen3.pc.in: -------------------------------------------------------------------------------- 1 | Name: Eigen3 2 | Description: A C++ template library for linear algebra: vectors, matrices, and related algorithms 3 | Requires: 4 | Version: ${EIGEN_VERSION_NUMBER} 5 | Libs: 6 | Cflags: -I${INCLUDE_INSTALL_DIR} 7 | -------------------------------------------------------------------------------- /deps/eigen/failtest/block_nonconst_ctor_on_const_xpr_0.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Block b(m,0,0); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/block_nonconst_ctor_on_const_xpr_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Block b(m,0,0,3,3); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/block_nonconst_ctor_on_const_xpr_2.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | // row/column constructor 13 | Block b(m,0); 14 | } 15 | 16 | int main() {} 17 | -------------------------------------------------------------------------------- /deps/eigen/failtest/block_on_const_type_actually_const_0.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(){ 12 | Matrix3f m; 13 | Block(m, 0, 0, 3, 3).coeffRef(0, 0) = 1.0f; 14 | } 15 | 16 | int main() {} 17 | -------------------------------------------------------------------------------- /deps/eigen/failtest/block_on_const_type_actually_const_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(){ 12 | MatrixXf m; 13 | Block(m, 0, 0).coeffRef(0, 0) = 1.0f; 14 | } 15 | 16 | int main() {} 17 | -------------------------------------------------------------------------------- /deps/eigen/failtest/const_qualified_block_method_retval_0.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Block b(m.block<3,3>(0,0)); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/const_qualified_block_method_retval_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Block b(m.block(0,0,3,3)); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/const_qualified_diagonal_method_retval.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Diagonal b(m.diagonal()); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/const_qualified_transpose_method_retval.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Transpose b(m.transpose()); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/diagonal_nonconst_ctor_on_const_xpr.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Diagonal d(m); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/diagonal_on_const_type_actually_const.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(){ 12 | MatrixXf m; 13 | Diagonal(m).coeffRef(0) = 1.0f; 14 | } 15 | 16 | int main() {} 17 | -------------------------------------------------------------------------------- /deps/eigen/failtest/failtest_sanity_check.cpp: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 2 | This is just some text that won't compile as a C++ file, as a basic sanity check for failtest. 3 | #else 4 | int main() {} 5 | #endif 6 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_nonconst_ctor_on_const_ptr_0.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER float *ptr){ 12 | Map m(ptr); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_nonconst_ctor_on_const_ptr_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER float *ptr, DenseIndex size){ 12 | Map m(ptr, size); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_nonconst_ctor_on_const_ptr_2.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols){ 12 | Map m(ptr, rows, cols); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_nonconst_ctor_on_const_ptr_3.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols){ 12 | Map > m(ptr, rows, cols, InnerStride<2>()); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_nonconst_ctor_on_const_ptr_4.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER 5 | #else 6 | #define CV_QUALIFIER const 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(const float *ptr, DenseIndex rows, DenseIndex cols){ 12 | Map > m(ptr, rows, cols, OuterStride<>(2)); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_on_const_type_actually_const_0.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(float *ptr){ 12 | Map(ptr, 1, 1).coeffRef(0,0) = 1.0f; 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/map_on_const_type_actually_const_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(float *ptr){ 12 | Map(ptr).coeffRef(0) = 1.0f; 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/ref_1.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void call_ref(Ref a) { } 12 | 13 | int main() 14 | { 15 | VectorXf a(10); 16 | CV_QUALIFIER VectorXf& ac(a); 17 | call_ref(ac); 18 | } 19 | -------------------------------------------------------------------------------- /deps/eigen/failtest/ref_2.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | using namespace Eigen; 4 | 5 | void call_ref(Ref a) { } 6 | 7 | int main() 8 | { 9 | MatrixXf A(10,10); 10 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 11 | call_ref(A.row(3)); 12 | #else 13 | call_ref(A.col(3)); 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/ref_3.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | using namespace Eigen; 4 | 5 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 6 | void call_ref(Ref a) { } 7 | #else 8 | void call_ref(const Ref &a) { } 9 | #endif 10 | 11 | int main() 12 | { 13 | VectorXf a(10); 14 | call_ref(a+a); 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/ref_4.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | using namespace Eigen; 4 | 5 | void call_ref(Ref > a) {} 6 | 7 | int main() 8 | { 9 | MatrixXf A(10,10); 10 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 11 | call_ref(A.transpose()); 12 | #else 13 | call_ref(A); 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/ref_5.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | using namespace Eigen; 4 | 5 | void call_ref(Ref a) { } 6 | 7 | int main() 8 | { 9 | VectorXf a(10); 10 | DenseBase &ac(a); 11 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 12 | call_ref(ac); 13 | #else 14 | call_ref(ac.derived()); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/failtest/transpose_nonconst_ctor_on_const_xpr.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(CV_QUALIFIER Matrix3d &m){ 12 | Transpose t(m); 13 | } 14 | 15 | int main() {} 16 | -------------------------------------------------------------------------------- /deps/eigen/failtest/transpose_on_const_type_actually_const.cpp: -------------------------------------------------------------------------------- 1 | #include "../Eigen/Core" 2 | 3 | #ifdef EIGEN_SHOULD_FAIL_TO_BUILD 4 | #define CV_QUALIFIER const 5 | #else 6 | #define CV_QUALIFIER 7 | #endif 8 | 9 | using namespace Eigen; 10 | 11 | void foo(){ 12 | MatrixXf m; 13 | Transpose(m).coeffRef(0, 0) = 1.0f; 14 | } 15 | 16 | int main() {} 17 | -------------------------------------------------------------------------------- /deps/eigen/lapack/complex_double.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2011 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR std::complex 11 | #define SCALAR_SUFFIX z 12 | #define SCALAR_SUFFIX_UP "Z" 13 | #define REAL_SCALAR_SUFFIX d 14 | #define ISCOMPLEX 1 15 | 16 | #include "cholesky.cpp" 17 | #include "lu.cpp" 18 | -------------------------------------------------------------------------------- /deps/eigen/lapack/complex_single.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2011 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR std::complex 11 | #define SCALAR_SUFFIX c 12 | #define SCALAR_SUFFIX_UP "C" 13 | #define REAL_SCALAR_SUFFIX s 14 | #define ISCOMPLEX 1 15 | 16 | #include "cholesky.cpp" 17 | #include "lu.cpp" 18 | -------------------------------------------------------------------------------- /deps/eigen/lapack/double.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2011 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR double 11 | #define SCALAR_SUFFIX d 12 | #define SCALAR_SUFFIX_UP "D" 13 | #define ISCOMPLEX 0 14 | 15 | #include "cholesky.cpp" 16 | #include "lu.cpp" 17 | #include "eigenvalues.cpp" 18 | -------------------------------------------------------------------------------- /deps/eigen/lapack/single.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009-2011 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #define SCALAR float 11 | #define SCALAR_SUFFIX s 12 | #define SCALAR_SUFFIX_UP "S" 13 | #define ISCOMPLEX 0 14 | 15 | #include "cholesky.cpp" 16 | #include "lu.cpp" 17 | #include "eigenvalues.cpp" 18 | -------------------------------------------------------------------------------- /deps/eigen/scripts/buildtests.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# != 1 || $1 == *help ]] 4 | then 5 | echo "usage: ./check regexp" 6 | echo " Builds tests matching the regexp." 7 | echo " The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'." 8 | echo " For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'" 9 | exit 0 10 | fi 11 | 12 | TESTSLIST="@EIGEN_TESTS_LIST@" 13 | targets_to_make=`echo "$TESTSLIST" | egrep "$1" | xargs echo` 14 | 15 | if [ -n "${EIGEN_MAKE_ARGS:+x}" ] 16 | then 17 | make $targets_to_make ${EIGEN_MAKE_ARGS} 18 | else 19 | make $targets_to_make 20 | fi 21 | exit $? 22 | 23 | -------------------------------------------------------------------------------- /deps/eigen/scripts/check.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # check : shorthand for make and ctest -R 3 | 4 | if [[ $# != 1 || $1 == *help ]] 5 | then 6 | echo "usage: ./check regexp" 7 | echo " Builds and runs tests matching the regexp." 8 | echo " The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'." 9 | echo " For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'" 10 | echo " The EIGEN_CTEST_ARGS environment variable allows to pass args to 'ctest'." 11 | echo " For example, with CTest 2.8, you can use EIGEN_CTEST_ARGS='-j5'." 12 | exit 0 13 | fi 14 | 15 | if [ -n "${EIGEN_CTEST_ARGS:+x}" ] 16 | then 17 | ./buildtests.sh "$1" && ctest -R "$1" ${EIGEN_CTEST_ARGS} 18 | else 19 | ./buildtests.sh "$1" && ctest -R "$1" 20 | fi 21 | exit $? 22 | -------------------------------------------------------------------------------- /deps/eigen/scripts/debug.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cmake -DCMAKE_BUILD_TYPE=Debug . 4 | -------------------------------------------------------------------------------- /deps/eigen/scripts/release.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cmake -DCMAKE_BUILD_TYPE=Release . 4 | -------------------------------------------------------------------------------- /deps/eigen/signature_of_eigen3_matrix_library: -------------------------------------------------------------------------------- 1 | This file is just there as a signature to help identify directories containing Eigen3. When writing a script looking for Eigen3, just look for this file. This is especially useful to help disambiguate with Eigen2... 2 | -------------------------------------------------------------------------------- /deps/eigen/test/eigen2/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | black='\E[30m' 4 | red='\E[31m' 5 | green='\E[32m' 6 | yellow='\E[33m' 7 | blue='\E[34m' 8 | magenta='\E[35m' 9 | cyan='\E[36m' 10 | white='\E[37m' 11 | 12 | if make test_$1 > /dev/null 2> .runtest.log ; then 13 | if ! ./test_$1 r20 > /dev/null 2> .runtest.log ; then 14 | echo -e $red Test $1 failed: $black 15 | echo -e $blue 16 | cat .runtest.log 17 | echo -e $black 18 | exit 1 19 | else 20 | echo -e $green Test $1 passed$black 21 | fi 22 | else 23 | echo -e $red Build of target $1 failed: $black 24 | echo -e $blue 25 | cat .runtest.log 26 | echo -e $black 27 | exit 1 28 | fi 29 | -------------------------------------------------------------------------------- /deps/eigen/test/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | black='\E[30m' 4 | red='\E[31m' 5 | green='\E[32m' 6 | yellow='\E[33m' 7 | blue='\E[34m' 8 | magenta='\E[35m' 9 | cyan='\E[36m' 10 | white='\E[37m' 11 | 12 | if ! ./$1 > /dev/null 2> .runtest.log ; then 13 | echo -e $red Test $1 failed: $black 14 | echo -e $blue 15 | cat .runtest.log 16 | echo -e $black 17 | exit 1 18 | else 19 | echo -e $green Test $1 passed$black 20 | fi 21 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/Eigen/MoreVectorization: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla 6 | // Public License v. 2.0. If a copy of the MPL was not distributed 7 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | #ifndef EIGEN_MOREVECTORIZATION_MODULE_H 10 | #define EIGEN_MOREVECTORIZATION_MODULE_H 11 | 12 | #include 13 | 14 | namespace Eigen { 15 | 16 | /** 17 | * \defgroup MoreVectorization More vectorization module 18 | */ 19 | 20 | } 21 | 22 | #include "src/MoreVectorization/MathFunctions.h" 23 | 24 | #endif // EIGEN_MOREVECTORIZATION_MODULE_H 25 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/doc/Overview.dox: -------------------------------------------------------------------------------- 1 | namespace Eigen { 2 | 3 | /** \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 | Click on the \e Modules tab at the top of this page to get a list of all unsupported modules. 10 | 11 | Don't miss the official Eigen documentation. 12 | 13 | */ 14 | 15 | /* 16 | 17 | \defgroup Unsupported_modules Unsupported modules 18 | 19 | The unsupported modules are contributions from various users. They are 20 | provided "as is", without any support. Nevertheless, some of them are 21 | subject to be included in Eigen in the future. 22 | 23 | */ 24 | 25 | } 26 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/doc/examples/MatrixLogarithm.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | using std::sqrt; 9 | MatrixXd A(3,3); 10 | A << 0.5*sqrt(2), -0.5*sqrt(2), 0, 11 | 0.5*sqrt(2), 0.5*sqrt(2), 0, 12 | 0, 0, 1; 13 | std::cout << "The matrix A is:\n" << A << "\n\n"; 14 | std::cout << "The matrix logarithm of A is:\n" << A.log() << "\n"; 15 | } 16 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/doc/examples/MatrixPower.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | const double pi = std::acos(-1.0); 9 | Matrix3d A; 10 | A << cos(1), -sin(1), 0, 11 | sin(1), cos(1), 0, 12 | 0 , 0 , 1; 13 | std::cout << "The matrix A is:\n" << A << "\n\n" 14 | "The matrix power A^(pi/4) is:\n" << A.pow(pi/4) << std::endl; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/doc/examples/MatrixPower_optimal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace Eigen; 5 | 6 | int main() 7 | { 8 | Matrix4cd A = Matrix4cd::Random(); 9 | MatrixPower Apow(A); 10 | 11 | std::cout << "The matrix A is:\n" << A << "\n\n" 12 | "A^3.1 is:\n" << Apow(3.1) << "\n\n" 13 | "A^3.3 is:\n" << Apow(3.3) << "\n\n" 14 | "A^3.7 is:\n" << Apow(3.7) << "\n\n" 15 | "A^3.9 is:\n" << Apow(3.9) << std::endl; 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/doc/examples/MatrixSquareRoot.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(2,2); 11 | A << cos(pi/3), -sin(pi/3), 12 | sin(pi/3), cos(pi/3); 13 | std::cout << "The matrix A is:\n" << A << "\n\n"; 14 | std::cout << "The matrix square root of A is:\n" << A.sqrt() << "\n\n"; 15 | std::cout << "The square of the last matrix is:\n" << A.sqrt() * A.sqrt() << "\n"; 16 | } 17 | -------------------------------------------------------------------------------- /deps/eigen/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 | -------------------------------------------------------------------------------- /deps/eigen/unsupported/test/FFT.cpp: -------------------------------------------------------------------------------- 1 | #define test_FFTW test_FFT 2 | #include "FFTW.cpp" 3 | -------------------------------------------------------------------------------- /eigenmat/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | 4 | -------------------------------------------------------------------------------- /eigenmat/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | typedef struct Shape4D 5 | { 6 | int shape[4]; 7 | } Shape4D; 8 | 9 | typedef struct ConvDesc 10 | { 11 | int num_input_channels; 12 | int num_output_channels; 13 | int kernel_size_y; 14 | int kernel_size_x; 15 | int kernel_size_t; 16 | int stride_y; 17 | int stride_x; 18 | int stride_t; 19 | int padding_y; 20 | int padding_x; 21 | int padding_t; 22 | int input_channel_begin; 23 | int input_channel_end; 24 | int output_channel_begin; 25 | int output_channel_end; 26 | int num_groups; 27 | } ConvDesc; 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /examples/data/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /examples/data_prep/test_images.txt: -------------------------------------------------------------------------------- 1 | ../imagenet/test_images/0.jpg 2 | ../imagenet/test_images/1.jpg 3 | ../imagenet/test_images/2.jpg 4 | ../imagenet/test_images/3.jpg 5 | ../imagenet/test_images/4.jpg 6 | ../imagenet/test_images/5.jpg 7 | ../imagenet/test_images/6.jpg 8 | ../imagenet/test_images/7.jpg 9 | ../imagenet/test_images/8.jpg 10 | ../imagenet/test_images/9.jpg 11 | -------------------------------------------------------------------------------- /examples/imagenet/CLS_train.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | layer_name: "input" 3 | file_pattern: "/nobackup/nitish/imagenet/imagenet_train.h5" 4 | dataset_name: "data" 5 | data_type: HDF5 6 | mean_file: "/ais/gobi3/u/nitish/imagenet/pixel_mean.h5" 7 | pixelwise_normalize: true 8 | can_translate: true 9 | can_flip: true 10 | pca_noise_stddev: 0.1; 11 | num_colors: 3 12 | image_size_y: 256 13 | image_size_x: 256 14 | gpu_image_size_y: 224 15 | gpu_image_size_x: 224 16 | } 17 | 18 | data_config { 19 | layer_name: "output" 20 | file_pattern: "/ais/gobi3/u/nitish/imagenet/lists/train_classids.txt" 21 | data_type: TXT 22 | } 23 | 24 | batch_size : 128 25 | chunk_size: 2560 26 | pipeline_loads: true 27 | randomize_cpu: true 28 | randomize_gpu: true 29 | random_access_chunk_size: 8 30 | -------------------------------------------------------------------------------- /examples/imagenet/CLS_valid.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | layer_name: "input" 3 | file_pattern: "/nobackup/nitish/imagenet/imagenet_valid.h5" 4 | dataset_name: "data" 5 | data_type: HDF5 6 | mean_file: "/ais/gobi3/u/nitish/imagenet/pixel_mean.h5" 7 | pixelwise_normalize: true 8 | num_colors: 3 9 | image_size_y: 256 10 | image_size_x: 256 11 | gpu_image_size_y: 224 12 | gpu_image_size_x: 224 13 | } 14 | 15 | data_config { 16 | layer_name: "output" 17 | file_pattern: "/ais/gobi3/u/nitish/imagenet/lists/valid_classids.txt" 18 | data_type: TXT 19 | } 20 | 21 | batch_size : 128 22 | chunk_size: 256 23 | pipeline_loads: true 24 | -------------------------------------------------------------------------------- /examples/imagenet/cpu_out/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /examples/imagenet/feature_config.pbtxt: -------------------------------------------------------------------------------- 1 | output_file: "output.h5" 2 | 3 | feature { 4 | layer: "output" 5 | } 6 | feature { 7 | layer: "hidden7" 8 | } 9 | 10 | input { 11 | data_config { 12 | layer_name: "input" 13 | file_pattern: "test_images.txt" 14 | data_type: IMAGE_RAW 15 | mean_file: "pixel_mean.h5" 16 | pixelwise_normalize: true 17 | num_colors: 3 18 | raw_image_size_y: 256 19 | raw_image_size_x: 256 20 | image_size_y: 256 21 | image_size_x: 256 22 | gpu_image_size_y: 224 23 | gpu_image_size_x: 224 24 | } 25 | batch_size : 10 26 | chunk_size: 10 27 | pipeline_loads: true 28 | } 29 | -------------------------------------------------------------------------------- /examples/imagenet/feature_config_avg10.pbtxt: -------------------------------------------------------------------------------- 1 | output_file: "output_avg10.h5" 2 | 3 | feature { 4 | layer: "output" 5 | average_batches: 10 6 | } 7 | 8 | feature { 9 | layer: "hidden7" 10 | average_batches: 10 11 | } 12 | 13 | input { 14 | data_config { 15 | layer_name: "input" 16 | file_pattern: "test_images.txt" 17 | data_type: IMAGE_RAW 18 | mean_file: "pixel_mean.h5" 19 | pixelwise_normalize: true 20 | num_colors: 3 21 | raw_image_size: 256 22 | image_size: 256 23 | } 24 | batch_size : 10 25 | chunk_size: 10 26 | multiplicity: 10 27 | pipeline_loads: true 28 | } 29 | -------------------------------------------------------------------------------- /examples/imagenet/pixel_mean.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/pixel_mean.h5 -------------------------------------------------------------------------------- /examples/imagenet/test_images.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | layer_name: "input" 3 | file_pattern: "test_images.txt" 4 | dataset_name: "data" 5 | data_type: IMAGE_RAW 6 | mean_file: "pixel_mean.h5" 7 | pixelwise_normalize: true 8 | num_colors: 3 9 | raw_image_size_y: 256 10 | raw_image_size_x: 256 11 | image_size_y: 224 12 | image_size_x: 224 13 | gpu_image_size_y: 224 14 | gpu_image_size_x: 224 15 | } 16 | 17 | batch_size : 10 18 | chunk_size: 10 19 | -------------------------------------------------------------------------------- /examples/imagenet/test_images.txt: -------------------------------------------------------------------------------- 1 | test_images/0.jpg 2 | test_images/1.jpg 3 | test_images/2.jpg 4 | test_images/3.jpg 5 | test_images/4.jpg 6 | test_images/5.jpg 7 | test_images/6.jpg 8 | test_images/7.jpg 9 | test_images/8.jpg 10 | test_images/9.jpg 11 | -------------------------------------------------------------------------------- /examples/imagenet/test_images/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/0.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/1.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/2.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/3.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/4.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/5.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/6.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/7.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/8.jpg -------------------------------------------------------------------------------- /examples/imagenet/test_images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TorontoDeepLearning/convnet/4ae77c04e898643bb476e0604fab5682f23069d7/examples/imagenet/test_images/9.jpg -------------------------------------------------------------------------------- /examples/mnist-conv/checkpoint_dir/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /examples/mnist-conv/feature_config.pbtxt: -------------------------------------------------------------------------------- 1 | output_file: "output.h5" 2 | 3 | feature { 4 | layer: "output" 5 | } 6 | feature { 7 | layer: "hidden2" 8 | } 9 | 10 | input { 11 | data_config { 12 | layer_name: "input" 13 | file_pattern: "../data/mnist.h5" 14 | dataset_name: "test" 15 | data_type: HDF5 16 | } 17 | batch_size : 100 18 | } 19 | -------------------------------------------------------------------------------- /examples/mnist-conv/test_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "test" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "test_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | -------------------------------------------------------------------------------- /examples/mnist-conv/train_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "train" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "train_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | randomize_cpu: true 15 | randomize_gpu: true 16 | -------------------------------------------------------------------------------- /examples/mnist-conv/train_plus_val_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "train_full" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "train_full_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | randomize_cpu: true 15 | randomize_gpu: true 16 | -------------------------------------------------------------------------------- /examples/mnist-conv/val_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "validation" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "validation_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | -------------------------------------------------------------------------------- /examples/mnist-ff/checkpoint_dir/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /examples/mnist-ff/feature_config.pbtxt: -------------------------------------------------------------------------------- 1 | output_file: "output.h5" 2 | 3 | feature { 4 | layer: "output" 5 | } 6 | feature { 7 | layer: "hidden2" 8 | } 9 | 10 | input { 11 | data_config { 12 | layer_name: "input" 13 | file_pattern: "../data/mnist.h5" 14 | dataset_name: "test" 15 | data_type: HDF5 16 | } 17 | batch_size : 100 18 | } 19 | -------------------------------------------------------------------------------- /examples/mnist-ff/test_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "test" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "test_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | -------------------------------------------------------------------------------- /examples/mnist-ff/train_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "train" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "train_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | randomize_cpu: true 15 | randomize_gpu: true 16 | -------------------------------------------------------------------------------- /examples/mnist-ff/train_plus_val_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "train_full" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "train_full_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | randomize_cpu: true 15 | randomize_gpu: true 16 | -------------------------------------------------------------------------------- /examples/mnist-ff/val_data.pbtxt: -------------------------------------------------------------------------------- 1 | data_config { 2 | file_pattern: "../data/mnist.h5" 3 | layer_name: "input" 4 | dataset_name: "validation" 5 | data_type: HDF5 6 | } 7 | data_config { 8 | file_pattern: "../data/mnist.h5" 9 | layer_name: "output" 10 | dataset_name: "validation_labels" 11 | data_type: HDF5 12 | } 13 | batch_size : 100 14 | -------------------------------------------------------------------------------- /obj/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file and cpu folder 4 | !.gitignore 5 | !cpu 6 | -------------------------------------------------------------------------------- /obj/cpu/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /src/downsample_edge.h: -------------------------------------------------------------------------------- 1 | #ifndef DOWNSAMPLE_EDGE_H_ 2 | #define DOWNSAMPLE_EDGE_H_ 3 | #include "edge.h" 4 | 5 | /** Implements a down-sampling edge. 6 | * Only integer down-sampling factors are supported. 7 | */ 8 | class DownSampleEdge : public Edge { 9 | public: 10 | DownSampleEdge(const config::Edge& edge_config); 11 | virtual std::string GetDescription(); 12 | virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite, bool train); 13 | virtual void ComputeDown(Matrix& deriv_output, Matrix& input, 14 | Matrix& output, Matrix& deriv_input, bool overwrite); 15 | virtual void SetImageSize(int image_size_y, int image_size_x, int image_size_t); 16 | 17 | private: 18 | const int sample_factor_; 19 | }; 20 | #endif 21 | -------------------------------------------------------------------------------- /src/fc_edge.h: -------------------------------------------------------------------------------- 1 | #ifndef FC_EDGE_H_ 2 | #define FC_EDGE_H_ 3 | #include "edge_with_weight.h" 4 | 5 | /** Implements a fully-connected edge.*/ 6 | class FCEdge : public EdgeWithWeight { 7 | public: 8 | FCEdge(const config::Edge& edge_config); 9 | virtual std::string GetDescription(); 10 | virtual void SetMemory(Matrix& p); 11 | virtual void SetGradMemory(Matrix& p); 12 | virtual size_t GetParameterMemoryRequirement(); 13 | virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite, bool train); 14 | virtual void ComputeDown(Matrix& deriv_output, Matrix& input, 15 | Matrix& output, Matrix& deriv_input, bool overwrite); 16 | virtual void ComputeOuter(Matrix& input, Matrix& deriv_output); 17 | }; 18 | #endif 19 | -------------------------------------------------------------------------------- /src/grad_check.h: -------------------------------------------------------------------------------- 1 | #ifndef GRAD_CHECK_H_ 2 | #define GRAD_CHECK_H_ 3 | #include "convnet.h" 4 | 5 | class GradChecker : public ConvNet { 6 | public: 7 | GradChecker(const std::string& model_file); 8 | void Run(const std::string& output_file); 9 | void ComputeNumericGrad(Matrix& w, float epsilon, 10 | std::vector& numerical_grad, int max_params=0); 11 | bool GradCheck(Matrix& w, std::vector& eps_values, int num_params, 12 | const float* analytical_g, const std::string& output_dset, 13 | hid_t& output_file); 14 | 15 | protected: 16 | virtual void GetLoss(std::vector& error); 17 | }; 18 | #endif 19 | -------------------------------------------------------------------------------- /src/multigpu_convnet.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTIGPU_CONVNET_H_ 2 | #define MULTIGPU_CONVNET_H_ 3 | #include "convnet.h" 4 | 5 | class MultiGPUConvNet : public ConvNet { 6 | public: 7 | MultiGPUConvNet(const std::string& model_file); 8 | 9 | protected: 10 | virtual void Fprop(bool train); 11 | virtual void ComputeDeriv(); 12 | virtual void GetLoss(std::vector& error); 13 | virtual void Bprop(bool update_weights); 14 | 15 | bool broadcast_; 16 | }; 17 | #endif 18 | -------------------------------------------------------------------------------- /src/rgb_to_yuv_edge.cc: -------------------------------------------------------------------------------- 1 | #include "rgb_to_yuv_edge.h" 2 | using namespace std; 3 | 4 | RGBToYUVEdge::RGBToYUVEdge(const config::Edge& edge_config) : 5 | Edge(edge_config) {} 6 | 7 | string RGBToYUVEdge::GetDescription() { 8 | stringstream ss; 9 | ss << name_ << " RGB to YUV " << image_size_y_ << "-" << image_size_x_; 10 | return ss.str(); 11 | } 12 | 13 | void RGBToYUVEdge::ComputeUp(Matrix& input, Matrix& output, bool overwrite, bool train) { 14 | Matrix::ConvRGBToYUV(input, output); 15 | } 16 | 17 | void RGBToYUVEdge::ComputeDown(Matrix& deriv_output, Matrix& input, 18 | Matrix& output, Matrix& deriv_input, 19 | bool overwrite) { 20 | cerr << "RGBtoYUV backprop Not implemented." << endl; 21 | exit(1); 22 | } 23 | -------------------------------------------------------------------------------- /src/rgb_to_yuv_edge.h: -------------------------------------------------------------------------------- 1 | #ifndef RGB_TO_YUV_EDGE_H_ 2 | #define RGB_TO_YUV_EDGE_H_ 3 | #include "edge.h" 4 | 5 | /** Implements an edge that maps RGB to YUV.*/ 6 | class RGBToYUVEdge : public Edge { 7 | public: 8 | RGBToYUVEdge(const config::Edge& edge_config); 9 | virtual std::string GetDescription(); 10 | virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite, bool train); 11 | virtual void ComputeDown(Matrix& deriv_output, Matrix& input, 12 | Matrix& output, Matrix& deriv_input, bool overwrite); 13 | }; 14 | #endif 15 | -------------------------------------------------------------------------------- /src/upsample_edge.h: -------------------------------------------------------------------------------- 1 | #ifndef UPSAMPLE_EDGE_H_ 2 | #define UPSAMPLE_EDGE_H_ 3 | #include "edge.h" 4 | 5 | /** Implements an up-sampling edge. 6 | * Only integer up-sampling factors are supported. 7 | */ 8 | class UpSampleEdge : public Edge { 9 | public: 10 | UpSampleEdge(const config::Edge& edge_config); 11 | virtual std::string GetDescription(); 12 | virtual void ComputeUp(Matrix& input, Matrix& output, bool overwrite, bool train); 13 | virtual void ComputeDown(Matrix& deriv_output, Matrix& input, 14 | Matrix& output, Matrix& deriv_input, bool overwrite); 15 | virtual void SetImageSize(int image_size_y, int image_size_x, int image_size_t); 16 | 17 | private: 18 | const int sample_factor_; 19 | }; 20 | #endif 21 | --------------------------------------------------------------------------------