├── 3rdparty ├── CMakeLists.txt ├── catch │ ├── Catch.cmake │ ├── catch.hpp │ ├── catch_and_extras.hpp │ └── main.cpp ├── coverity │ └── coverity_model.cpp ├── cxxtest │ ├── COPYING │ ├── CxxTest.cmake │ ├── README.additional │ ├── additional │ │ ├── driver │ │ │ ├── cxxtest │ │ │ │ └── TestDrive.h │ │ │ └── main.cpp │ │ └── generator │ │ │ └── macro │ │ │ ├── README │ │ │ ├── cxxtest │ │ │ └── TestGenerator.h │ │ │ └── test │ │ │ ├── example1 │ │ │ ├── Makefile │ │ │ └── main.cpp │ │ │ └── example2 │ │ │ ├── DummyTest.h │ │ │ ├── Makefile │ │ │ ├── SomeSuites.cpp │ │ │ └── main.cpp │ └── cxxtest │ │ ├── Descriptions.cpp │ │ ├── Descriptions.h │ │ ├── DummyDescriptions.cpp │ │ ├── DummyDescriptions.h │ │ ├── ErrorFormatter.h │ │ ├── ErrorPrinter.h │ │ ├── Flags.h │ │ ├── GlobalFixture.cpp │ │ ├── GlobalFixture.h │ │ ├── LinkedList.cpp │ │ ├── LinkedList.h │ │ ├── RealDescriptions.cpp │ │ ├── RealDescriptions.h │ │ ├── Root.cpp │ │ ├── SelfTest.h │ │ ├── StdHeaders.h │ │ ├── StdValueTraits.h │ │ ├── StdioFilePrinter.h │ │ ├── StdioPrinter.h │ │ ├── TestListener.h │ │ ├── TestRunner.h │ │ ├── TestSuite.cpp │ │ ├── TestSuite.h │ │ ├── TestTracker.cpp │ │ ├── TestTracker.h │ │ ├── ValueTraits.cpp │ │ └── ValueTraits.h ├── eigen3 │ ├── CMakeLists.txt │ ├── COPYING.BSD │ ├── COPYING.GPL │ ├── COPYING.LGPL │ ├── COPYING.MINPACK │ ├── COPYING.MPL2 │ ├── COPYING.README │ ├── Eigen │ │ ├── Array │ │ ├── CMakeLists.txt │ │ ├── Cholesky │ │ ├── CholmodSupport │ │ ├── Core │ │ ├── Dense │ │ ├── Eigen │ │ ├── Eigen2Support │ │ ├── Eigenvalues │ │ ├── Geometry │ │ ├── Householder │ │ ├── IterativeLinearSolvers │ │ ├── Jacobi │ │ ├── LU │ │ ├── LeastSquares │ │ ├── MetisSupport │ │ ├── OrderingMethods │ │ ├── PaStiXSupport │ │ ├── PardisoSupport │ │ ├── QR │ │ ├── QtAlignedMalloc │ │ ├── SPQRSupport │ │ ├── SVD │ │ ├── Sparse │ │ ├── SparseCholesky │ │ ├── SparseCore │ │ ├── SparseLU │ │ ├── SparseQR │ │ ├── StdDeque │ │ ├── StdList │ │ ├── StdVector │ │ ├── SuperLUSupport │ │ ├── UmfPackSupport │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── Cholesky │ │ │ ├── CMakeLists.txt │ │ │ ├── LDLT.h │ │ │ ├── LLT.h │ │ │ └── LLT_MKL.h │ │ │ ├── CholmodSupport │ │ │ ├── CMakeLists.txt │ │ │ └── CholmodSupport.h │ │ │ ├── Core │ │ │ ├── Array.h │ │ │ ├── ArrayBase.h │ │ │ ├── ArrayWrapper.h │ │ │ ├── Assign.h │ │ │ ├── Assign_MKL.h │ │ │ ├── BandMatrix.h │ │ │ ├── Block.h │ │ │ ├── BooleanRedux.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CommaInitializer.h │ │ │ ├── CoreIterators.h │ │ │ ├── CwiseBinaryOp.h │ │ │ ├── CwiseNullaryOp.h │ │ │ ├── CwiseUnaryOp.h │ │ │ ├── CwiseUnaryView.h │ │ │ ├── DenseBase.h │ │ │ ├── DenseCoeffsBase.h │ │ │ ├── DenseStorage.h │ │ │ ├── Diagonal.h │ │ │ ├── DiagonalMatrix.h │ │ │ ├── DiagonalProduct.h │ │ │ ├── Dot.h │ │ │ ├── EigenBase.h │ │ │ ├── Flagged.h │ │ │ ├── ForceAlignedAccess.h │ │ │ ├── Functors.h │ │ │ ├── Fuzzy.h │ │ │ ├── GeneralProduct.h │ │ │ ├── GenericPacketMath.h │ │ │ ├── GlobalFunctions.h │ │ │ ├── IO.h │ │ │ ├── Map.h │ │ │ ├── MapBase.h │ │ │ ├── MathFunctions.h │ │ │ ├── Matrix.h │ │ │ ├── MatrixBase.h │ │ │ ├── NestByValue.h │ │ │ ├── NoAlias.h │ │ │ ├── NumTraits.h │ │ │ ├── PermutationMatrix.h │ │ │ ├── PlainObjectBase.h │ │ │ ├── ProductBase.h │ │ │ ├── Random.h │ │ │ ├── Redux.h │ │ │ ├── Ref.h │ │ │ ├── Replicate.h │ │ │ ├── ReturnByValue.h │ │ │ ├── Reverse.h │ │ │ ├── Select.h │ │ │ ├── SelfAdjointView.h │ │ │ ├── SelfCwiseBinaryOp.h │ │ │ ├── SolveTriangular.h │ │ │ ├── StableNorm.h │ │ │ ├── Stride.h │ │ │ ├── Swap.h │ │ │ ├── Transpose.h │ │ │ ├── Transpositions.h │ │ │ ├── TriangularMatrix.h │ │ │ ├── VectorBlock.h │ │ │ ├── VectorwiseOp.h │ │ │ ├── Visitor.h │ │ │ ├── arch │ │ │ │ ├── AltiVec │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Complex.h │ │ │ │ │ └── PacketMath.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Default │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Settings.h │ │ │ │ ├── NEON │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Complex.h │ │ │ │ │ └── PacketMath.h │ │ │ │ └── SSE │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ └── PacketMath.h │ │ │ ├── products │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── CoeffBasedProduct.h │ │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ │ ├── GeneralMatrixMatrix.h │ │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ │ ├── GeneralMatrixMatrixTriangular_MKL.h │ │ │ │ ├── GeneralMatrixMatrix_MKL.h │ │ │ │ ├── GeneralMatrixVector.h │ │ │ │ ├── GeneralMatrixVector_MKL.h │ │ │ │ ├── Parallelizer.h │ │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ │ ├── SelfadjointMatrixMatrix_MKL.h │ │ │ │ ├── SelfadjointMatrixVector.h │ │ │ │ ├── SelfadjointMatrixVector_MKL.h │ │ │ │ ├── SelfadjointProduct.h │ │ │ │ ├── SelfadjointRank2Update.h │ │ │ │ ├── TriangularMatrixMatrix.h │ │ │ │ ├── TriangularMatrixMatrix_MKL.h │ │ │ │ ├── TriangularMatrixVector.h │ │ │ │ ├── TriangularMatrixVector_MKL.h │ │ │ │ ├── TriangularSolverMatrix.h │ │ │ │ ├── TriangularSolverMatrix_MKL.h │ │ │ │ └── TriangularSolverVector.h │ │ │ └── util │ │ │ │ ├── BlasUtil.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Constants.h │ │ │ │ ├── DisableStupidWarnings.h │ │ │ │ ├── ForwardDeclarations.h │ │ │ │ ├── MKL_support.h │ │ │ │ ├── Macros.h │ │ │ │ ├── Memory.h │ │ │ │ ├── Meta.h │ │ │ │ ├── NonMPL2.h │ │ │ │ ├── ReenableStupidWarnings.h │ │ │ │ ├── StaticAssert.h │ │ │ │ └── XprHelper.h │ │ │ ├── Eigen2Support │ │ │ ├── Block.h │ │ │ ├── CMakeLists.txt │ │ │ ├── Cwise.h │ │ │ ├── CwiseOperators.h │ │ │ ├── Geometry │ │ │ │ ├── AlignedBox.h │ │ │ │ ├── All.h │ │ │ │ ├── AngleAxis.h │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── Hyperplane.h │ │ │ │ ├── ParametrizedLine.h │ │ │ │ ├── Quaternion.h │ │ │ │ ├── Rotation2D.h │ │ │ │ ├── RotationBase.h │ │ │ │ ├── Scaling.h │ │ │ │ ├── Transform.h │ │ │ │ └── Translation.h │ │ │ ├── LU.h │ │ │ ├── Lazy.h │ │ │ ├── LeastSquares.h │ │ │ ├── Macros.h │ │ │ ├── MathFunctions.h │ │ │ ├── Memory.h │ │ │ ├── Meta.h │ │ │ ├── Minor.h │ │ │ ├── QR.h │ │ │ ├── SVD.h │ │ │ ├── TriangularSolver.h │ │ │ └── VectorBlock.h │ │ │ ├── Eigenvalues │ │ │ ├── CMakeLists.txt │ │ │ ├── ComplexEigenSolver.h │ │ │ ├── ComplexSchur.h │ │ │ ├── ComplexSchur_MKL.h │ │ │ ├── EigenSolver.h │ │ │ ├── GeneralizedEigenSolver.h │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ │ ├── HessenbergDecomposition.h │ │ │ ├── MatrixBaseEigenvalues.h │ │ │ ├── RealQZ.h │ │ │ ├── RealSchur.h │ │ │ ├── RealSchur_MKL.h │ │ │ ├── SelfAdjointEigenSolver.h │ │ │ ├── SelfAdjointEigenSolver_MKL.h │ │ │ └── Tridiagonalization.h │ │ │ ├── Geometry │ │ │ ├── AlignedBox.h │ │ │ ├── AngleAxis.h │ │ │ ├── CMakeLists.txt │ │ │ ├── EulerAngles.h │ │ │ ├── Homogeneous.h │ │ │ ├── Hyperplane.h │ │ │ ├── OrthoMethods.h │ │ │ ├── ParametrizedLine.h │ │ │ ├── Quaternion.h │ │ │ ├── Rotation2D.h │ │ │ ├── RotationBase.h │ │ │ ├── Scaling.h │ │ │ ├── Transform.h │ │ │ ├── Translation.h │ │ │ ├── Umeyama.h │ │ │ └── arch │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Geometry_SSE.h │ │ │ ├── Householder │ │ │ ├── BlockHouseholder.h │ │ │ ├── CMakeLists.txt │ │ │ ├── Householder.h │ │ │ └── HouseholderSequence.h │ │ │ ├── IterativeLinearSolvers │ │ │ ├── BasicPreconditioners.h │ │ │ ├── BiCGSTAB.h │ │ │ ├── CMakeLists.txt │ │ │ ├── ConjugateGradient.h │ │ │ ├── IncompleteLUT.h │ │ │ └── IterativeSolverBase.h │ │ │ ├── Jacobi │ │ │ ├── CMakeLists.txt │ │ │ └── Jacobi.h │ │ │ ├── LU │ │ │ ├── CMakeLists.txt │ │ │ ├── Determinant.h │ │ │ ├── FullPivLU.h │ │ │ ├── Inverse.h │ │ │ ├── PartialPivLU.h │ │ │ ├── PartialPivLU_MKL.h │ │ │ └── arch │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── Inverse_SSE.h │ │ │ ├── MetisSupport │ │ │ ├── CMakeLists.txt │ │ │ └── MetisSupport.h │ │ │ ├── OrderingMethods │ │ │ ├── Amd.h │ │ │ ├── CMakeLists.txt │ │ │ ├── Eigen_Colamd.h │ │ │ └── Ordering.h │ │ │ ├── PaStiXSupport │ │ │ ├── CMakeLists.txt │ │ │ └── PaStiXSupport.h │ │ │ ├── PardisoSupport │ │ │ ├── CMakeLists.txt │ │ │ └── PardisoSupport.h │ │ │ ├── QR │ │ │ ├── CMakeLists.txt │ │ │ ├── ColPivHouseholderQR.h │ │ │ ├── ColPivHouseholderQR_MKL.h │ │ │ ├── FullPivHouseholderQR.h │ │ │ ├── HouseholderQR.h │ │ │ └── HouseholderQR_MKL.h │ │ │ ├── SPQRSupport │ │ │ ├── CMakeLists.txt │ │ │ └── SuiteSparseQRSupport.h │ │ │ ├── SVD │ │ │ ├── CMakeLists.txt │ │ │ ├── JacobiSVD.h │ │ │ ├── JacobiSVD_MKL.h │ │ │ └── UpperBidiagonalization.h │ │ │ ├── SparseCholesky │ │ │ ├── CMakeLists.txt │ │ │ ├── SimplicialCholesky.h │ │ │ └── SimplicialCholesky_impl.h │ │ │ ├── SparseCore │ │ │ ├── AmbiVector.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CompressedStorage.h │ │ │ ├── ConservativeSparseSparseProduct.h │ │ │ ├── MappedSparseMatrix.h │ │ │ ├── SparseBlock.h │ │ │ ├── SparseColEtree.h │ │ │ ├── SparseCwiseBinaryOp.h │ │ │ ├── SparseCwiseUnaryOp.h │ │ │ ├── SparseDenseProduct.h │ │ │ ├── SparseDiagonalProduct.h │ │ │ ├── SparseDot.h │ │ │ ├── SparseFuzzy.h │ │ │ ├── SparseMatrix.h │ │ │ ├── SparseMatrixBase.h │ │ │ ├── SparsePermutation.h │ │ │ ├── SparseProduct.h │ │ │ ├── SparseRedux.h │ │ │ ├── SparseSelfAdjointView.h │ │ │ ├── SparseSparseProductWithPruning.h │ │ │ ├── SparseTranspose.h │ │ │ ├── SparseTriangularView.h │ │ │ ├── SparseUtil.h │ │ │ ├── SparseVector.h │ │ │ ├── SparseView.h │ │ │ └── TriangularSolver.h │ │ │ ├── SparseLU │ │ │ ├── CMakeLists.txt │ │ │ ├── SparseLU.h │ │ │ ├── SparseLUImpl.h │ │ │ ├── SparseLU_Memory.h │ │ │ ├── SparseLU_Structs.h │ │ │ ├── SparseLU_SupernodalMatrix.h │ │ │ ├── SparseLU_Utils.h │ │ │ ├── SparseLU_column_bmod.h │ │ │ ├── SparseLU_column_dfs.h │ │ │ ├── SparseLU_copy_to_ucol.h │ │ │ ├── SparseLU_gemm_kernel.h │ │ │ ├── SparseLU_heap_relax_snode.h │ │ │ ├── SparseLU_kernel_bmod.h │ │ │ ├── SparseLU_panel_bmod.h │ │ │ ├── SparseLU_panel_dfs.h │ │ │ ├── SparseLU_pivotL.h │ │ │ ├── SparseLU_pruneL.h │ │ │ └── SparseLU_relax_snode.h │ │ │ ├── SparseQR │ │ │ ├── CMakeLists.txt │ │ │ └── SparseQR.h │ │ │ ├── StlSupport │ │ │ ├── CMakeLists.txt │ │ │ ├── StdDeque.h │ │ │ ├── StdList.h │ │ │ ├── StdVector.h │ │ │ └── details.h │ │ │ ├── SuperLUSupport │ │ │ ├── CMakeLists.txt │ │ │ └── SuperLUSupport.h │ │ │ ├── UmfPackSupport │ │ │ ├── CMakeLists.txt │ │ │ └── UmfPackSupport.h │ │ │ ├── misc │ │ │ ├── CMakeLists.txt │ │ │ ├── Image.h │ │ │ ├── Kernel.h │ │ │ ├── Solve.h │ │ │ ├── SparseSolve.h │ │ │ └── blas.h │ │ │ └── plugins │ │ │ ├── ArrayCwiseBinaryOps.h │ │ │ ├── ArrayCwiseUnaryOps.h │ │ │ ├── BlockMethods.h │ │ │ ├── CMakeLists.txt │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ ├── CommonCwiseUnaryOps.h │ │ │ ├── MatrixCwiseBinaryOps.h │ │ │ └── MatrixCwiseUnaryOps.h │ ├── Eigen_openma │ │ ├── Core │ │ │ └── Cumtrapz.h │ │ ├── Interpolation │ │ │ ├── Interp1.h │ │ │ ├── Interp1_base.h │ │ │ ├── Interp1_cubic.h │ │ │ └── Interp1_linear.h │ │ ├── Optimization │ │ │ └── NM.h │ │ ├── Plugin │ │ │ ├── DenseBaseAddons.h │ │ │ ├── ForwardDeclarations.h │ │ │ ├── Functors.h │ │ │ └── VectorOpAddons.h │ │ ├── SignalProcessing │ │ │ ├── FiltFilt.h │ │ │ ├── Filter.h │ │ │ └── IIRFilterDesign.h │ │ └── Utils │ │ │ ├── comb.h │ │ │ ├── gammaln.h │ │ │ └── sign.h │ ├── Eigen_unsupported │ │ ├── FFT │ │ └── src │ │ │ └── FFT │ │ │ ├── CMakeLists.txt │ │ │ ├── ei_fftw_impl.h │ │ │ └── ei_kissfft_impl.h │ ├── README.OPENMA │ └── test │ │ ├── CMakeLists.txt │ │ ├── combTest.cpp │ │ ├── cumtrapzTest.cpp │ │ ├── filterTest.cpp │ │ ├── filterTest_def.h │ │ ├── filtfiltTest.cpp │ │ ├── gammalnTest.cpp │ │ ├── iirFilterDesignTest.cpp │ │ ├── interp1Test.cpp │ │ ├── medianTest.cpp │ │ ├── percentileTest.cpp │ │ ├── signTest.cpp │ │ ├── stdTest.cpp │ │ └── test_eigen_config.h └── pugixml │ ├── CMakeLists.txt │ ├── README.OPENMA │ ├── readme.txt │ └── src │ ├── pugiconfig.hpp │ ├── pugixml.cpp │ └── pugixml.hpp ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake ├── COPYING-CMAKE-SCRIPTS ├── CoverallsGenerateGcov.cmake ├── ExtraCXXFlagsDebug.cmake ├── FindMatlab.cmake ├── FindNumPy.cmake ├── OpenMACoverallsCustomTarget.cmake ├── OpenMACoverityCustomTarget.cmake ├── OpenMALanguageBindings.cmake └── templates │ ├── MatlabTestDriver.m.in │ ├── OpenMAConfig.cmake.in │ ├── PythonTestDriver.py.in │ ├── config.h.in │ └── staticiopluginloader.h.in ├── doc ├── CMakeLists.txt └── doxygen │ ├── CMakeLists.txt │ ├── doxy-coverage.py │ └── doxyfile_C++.in └── modules ├── CMakeLists.txt ├── base ├── CMakeLists.txt ├── doc │ └── base.dox ├── include │ └── openma │ │ ├── base.h │ │ └── base │ │ ├── any.h │ │ ├── any.tpp │ │ ├── date.h │ │ ├── enums.h │ │ ├── event.h │ │ ├── event_p.h │ │ ├── exception.h │ │ ├── hardware.h │ │ ├── hardware_p.h │ │ ├── logger.h │ │ ├── macros.h │ │ ├── node.h │ │ ├── node_p.h │ │ ├── nodeid.h │ │ ├── object.h │ │ ├── object_p.h │ │ ├── opaque.h │ │ ├── pluginmanager.h │ │ ├── property.h │ │ ├── subject.h │ │ ├── timesequence.h │ │ ├── timesequence_p.h │ │ ├── trial.h │ │ ├── trial_p.h │ │ ├── type_traits.h │ │ ├── typeid.h │ │ └── utils.h ├── src │ ├── any.cpp │ ├── date.cpp │ ├── event.cpp │ ├── hardware.cpp │ ├── logger.cpp │ ├── node.cpp │ ├── object.cpp │ ├── subject.cpp │ ├── timesequence.cpp │ ├── trial.cpp │ ├── typeid.cpp │ └── utils.cpp ├── swig │ ├── CMakeLists.txt │ ├── base │ │ ├── any.i │ │ ├── event.i │ │ ├── hardware.i │ │ ├── logger.i │ │ ├── node.i │ │ ├── object.i │ │ ├── subject.i │ │ ├── timesequence.i │ │ └── trial.i │ ├── ma.i │ ├── ma_matlab.i │ └── ma_python.i └── test │ ├── CMakeLists.txt │ ├── c++ │ ├── CMakeLists.txt │ ├── anyTest.cpp │ ├── anyTest_def.h │ ├── dateTest.cpp │ ├── eventTest.cpp │ ├── loggerTest.cpp │ ├── loggerTest_def.h │ ├── nodeTest.cpp │ ├── nodeTest_def.h │ ├── objectTest.cpp │ ├── objectTest_def.h │ ├── subjectTest.cpp │ ├── timesequenceTest.cpp │ └── trialTest.cpp │ ├── matlab │ ├── AnyTest.m │ ├── CMakeLists.txt │ ├── EventTest.m │ ├── NodeTest.m │ ├── TimeSequenceTest.m │ └── TrialTest.m │ └── python │ ├── CMakeLists.txt │ ├── anyTest.py │ ├── eventTest.py │ ├── nodeTest.py │ ├── timeSequenceTest.py │ └── trialTest.py ├── bindings ├── CMakeLists.txt ├── include │ └── openma │ │ ├── bindings.h │ │ ├── bindings │ │ ├── loggerdevice.h │ │ └── templatehelper.h │ │ └── matlab │ │ ├── fixwinchar16.h │ │ └── mexFunction.def ├── src │ ├── loggerdevice.cpp │ └── referencecounting.cpp └── swig │ └── openma │ ├── common.swg │ ├── macros.i │ ├── matlab.swg │ └── python.swg ├── body ├── CMakeLists.txt ├── doc │ └── body.dox ├── include │ └── openma │ │ ├── body.h │ │ └── body │ │ ├── anchor.h │ │ ├── chain.h │ │ ├── chain_p.h │ │ ├── dempstertable.h │ │ ├── descriptor.h │ │ ├── descriptor_p.h │ │ ├── dumasmcconvilleyoungtable.h │ │ ├── dynamicdescriptor.h │ │ ├── enums.h │ │ ├── eulerdescriptor.h │ │ ├── eulerdescriptor_p.h │ │ ├── externalwrenchassigner.h │ │ ├── externalwrenchassigner_p.h │ │ ├── inertialparameters.h │ │ ├── inertialparameters_p.h │ │ ├── inertialparametersestimator.h │ │ ├── inversedynamicsmatrix.h │ │ ├── inversedynamicsprocessor.h │ │ ├── inversedynamicsprocessor_p.h │ │ ├── joint.h │ │ ├── joint_p.h │ │ ├── landmarksregistrar.h │ │ ├── landmarksregistrar_p.h │ │ ├── landmarkstranslator.h │ │ ├── landmarkstranslator_p.h │ │ ├── lyonwholebodymodel.h │ │ ├── lyonwholebodymodel_p.h │ │ ├── model.h │ │ ├── model_p.h │ │ ├── plugingait.h │ │ ├── plugingait_p.h │ │ ├── point.h │ │ ├── point_p.h │ │ ├── poseestimator.h │ │ ├── poseestimator_p.h │ │ ├── referenceframe.h │ │ ├── referenceframe_p.h │ │ ├── segment.h │ │ ├── segment_p.h │ │ ├── simplegaitforceplatetofeetassigner.h │ │ ├── skeletonhelper.h │ │ ├── skeletonhelper_p.h │ │ ├── skeletonhelperposeestimator.h │ │ ├── unitquaternionposeestimator.h │ │ └── utils.h ├── src │ ├── _body.cpp │ ├── anchor.cpp │ ├── chain.cpp │ ├── dempstertable.cpp │ ├── descriptor.cpp │ ├── dumasmcconvilleyoungtable.cpp │ ├── dynamicdescriptor.cpp │ ├── eulerdescriptor.cpp │ ├── externalwrenchassigner.cpp │ ├── inertialparameters.cpp │ ├── inertialparametersestimator.cpp │ ├── inversedynamicsmatrix.cpp │ ├── inversedynamicsprocessor.cpp │ ├── joint.cpp │ ├── landmarksregistrar.cpp │ ├── landmarkstranslator.cpp │ ├── lyonwholebodymodel.cpp │ ├── model.cpp │ ├── plugingait.cpp │ ├── point.cpp │ ├── poseestimator.cpp │ ├── referenceframe.cpp │ ├── segment.cpp │ ├── simplegaitforceplatetofeetassigner.cpp │ ├── skeletonhelper.cpp │ ├── skeletonhelperposeestimator.cpp │ ├── unitquaternionposeestimator.cpp │ └── utils.cpp ├── swig │ ├── CMakeLists.txt │ ├── body.i │ ├── body │ │ ├── enums.i │ │ ├── externalwrenchassigner.i │ │ ├── landmarkstranslator.i │ │ ├── lyonwholebodymodel.i │ │ ├── plugingait.i │ │ ├── simplegaitforceplatetofeetassigner.i │ │ └── skeletonhelper.i │ ├── body_matlab.i │ └── body_python.i └── test │ ├── CMakeLists.txt │ ├── c++ │ ├── CMakeLists.txt │ ├── anchorTest.cpp │ ├── chainTest.cpp │ ├── dempstertableTest.cpp │ ├── dynamicdescriptorTest.cpp │ ├── eulerdescriptorTest.cpp │ ├── inertialparametersTest.cpp │ ├── inversedynamicsmatrixTest.cpp │ ├── jointTest.cpp │ ├── landmarksregistrarTest.cpp │ ├── landmarkstranslatorTest.cpp │ ├── lyonwholebodymodelTest_calibration.cpp │ ├── lyonwholebodymodelTest_def.h │ ├── lyonwholebodymodelTest_kinematics.cpp │ ├── lyonwholebodymodelTest_kinetics.cpp │ ├── lyonwholebodymodelTest_reconstruction.cpp │ ├── modelTest.cpp │ ├── plugingaitTest.cpp │ ├── plugingaitTest_calibration.cpp │ ├── plugingaitTest_def.h │ ├── plugingaitTest_kinematics.cpp │ ├── plugingaitTest_kinetics.cpp │ ├── plugingaitTest_reconstruction.cpp │ ├── pointTest.cpp │ ├── referenceframeTest.cpp │ ├── registermarkerclusterTest.cpp │ ├── registermarkerclusterTest_def.h │ ├── segmentTest.cpp │ ├── simplegaitforceplatetofeetassignerTest.cpp │ ├── skeletonhelperTest.cpp │ ├── unitquaternionposeestimatorTest.cpp │ └── utilsTest.cpp │ ├── matlab │ ├── CMakeLists.txt │ ├── LandmarksTranslatorTest.m │ └── PluginGaitTest.m │ └── python │ ├── CMakeLists.txt │ ├── landmarkstranslatorTest.py │ └── plugingaitTest.py ├── instrument ├── CMakeLists.txt ├── doc │ └── instrument.dox ├── include │ └── openma │ │ ├── instrument.h │ │ └── instrument │ │ ├── enums.h │ │ ├── forceplate.h │ │ ├── forceplate_p.h │ │ ├── forceplatetype2.h │ │ ├── forceplatetype3.h │ │ ├── forceplatetype3_p.h │ │ ├── forceplatetype4.h │ │ └── forceplatetype5.h ├── src │ ├── forceplate.cpp │ ├── forceplatetype2.cpp │ ├── forceplatetype3.cpp │ ├── forceplatetype4.cpp │ └── forceplatetype5.cpp ├── swig │ ├── CMakeLists.txt │ ├── instrument.i │ ├── instrument │ │ ├── forceplate.i │ │ ├── forceplatetype2.i │ │ ├── forceplatetype3.i │ │ ├── forceplatetype4.i │ │ └── forceplatetype5.i │ ├── instrument_matlab.i │ └── instrument_python.i └── test │ ├── CMakeLists.txt │ ├── c++ │ ├── CMakeLists.txt │ ├── forceplateTest_def.h │ ├── forceplatetype2Test.cpp │ ├── forceplatetype3Test.cpp │ ├── forceplatetype4Test.cpp │ └── forceplatetype5Test.cpp │ ├── matlab │ ├── CMakeLists.txt │ ├── ForcePlateType3Test.m │ └── ForcePlateType5Test.m │ └── python │ ├── CMakeLists.txt │ ├── forceplatetype3Test.py │ └── forceplatetype5Test.py ├── io ├── CMakeLists.txt ├── doc │ └── io.dox ├── include │ └── openma │ │ ├── io.h │ │ └── io │ │ ├── binarystream.h │ │ ├── binarystream_p.h │ │ ├── buffer.h │ │ ├── buffer_p.h │ │ ├── device.h │ │ ├── device_p.h │ │ ├── enums.h │ │ ├── file.h │ │ ├── file_p.h │ │ ├── handler.h │ │ ├── handler_p.h │ │ ├── handlerplugin.h │ │ ├── handlerreader.h │ │ ├── handlerwriter.h │ │ └── utils.h ├── plugins │ ├── CMakeLists.txt │ └── trialformats │ │ ├── bsf │ │ ├── CMakeLists.txt │ │ ├── bsfhandler.cpp │ │ ├── bsfhandler.h │ │ ├── bsfplugin.cpp │ │ └── bsfplugin.h │ │ ├── c3d │ │ ├── CMakeLists.txt │ │ ├── c3ddatastream.cpp │ │ ├── c3ddatastream.h │ │ ├── c3dhandler.cpp │ │ ├── c3dhandler.h │ │ ├── c3dplugin.cpp │ │ └── c3dplugin.h │ │ └── hpf │ │ ├── CMakeLists.txt │ │ ├── hpfhandler.cpp │ │ ├── hpfhandler.h │ │ ├── hpfplugin.cpp │ │ └── hpfplugin.h ├── src │ ├── _io.cpp │ ├── binarystream.cpp │ ├── buffer.cpp │ ├── device.cpp │ ├── file.cpp │ ├── handler.cpp │ ├── handlerplugin.cpp │ ├── handlerreader.cpp │ └── handlerwriter.cpp ├── swig │ ├── CMakeLists.txt │ └── io.i └── test │ ├── CMakeLists.txt │ ├── c++ │ ├── CMakeLists.txt │ ├── binarystreamTest.cpp │ ├── binarystreamTest_def.h │ ├── bufferTest.cpp │ ├── fileTest.cpp │ ├── handlerpluginTest.cpp │ ├── handlerpluginTest_def.h │ ├── ioTest.cpp │ ├── test_file_path.h.in │ └── trial │ │ ├── bsfreaderTest.cpp │ │ ├── c3dhandlerTest_def.h │ │ ├── c3dreaderTest.cpp │ │ ├── c3dwriterTest.cpp │ │ ├── hpfhandlerTest_def.h │ │ └── hpfreaderTest.cpp │ ├── matlab │ ├── CMakeLists.txt │ ├── IOTest.m │ ├── OpenMATDDPathIn.m.in │ └── OpenMATDDPathOut.m.in │ └── python │ ├── CMakeLists.txt │ ├── ioTest.py │ └── test_file_path.py.in ├── math ├── CMakeLists.txt ├── doc │ └── math.dox ├── include │ └── openma │ │ ├── math.h │ │ └── math │ │ ├── array.h │ │ ├── arraybase.h │ │ ├── binaryop.h │ │ ├── blockop.h │ │ ├── forwarddeclarations.h │ │ ├── map.h │ │ ├── returnbyvalue.h │ │ ├── traits.h │ │ ├── unaryop.h │ │ ├── utils.h │ │ └── xprbase.h ├── src │ └── utils.cpp └── test │ ├── CMakeLists.txt │ └── c++ │ ├── CMakeLists.txt │ ├── arrayTest.cpp │ ├── blockopTest.cpp │ ├── mapTest.cpp │ ├── mixTest.cpp │ └── poseTest.cpp └── processing ├── CmakeLists.txt ├── doc └── processing.dox ├── include └── openma │ ├── processing.h │ └── processing │ └── enums.h ├── src └── _processing.cpp ├── swig ├── CMakeLists.txt ├── processing.i ├── processing_matlab.i └── processing_python.i └── test ├── CMakeLists.txt ├── c++ ├── CMakeLists.txt └── butterzerolaglowpassTest.cpp ├── matlab ├── CMakeLists.txt └── ProcessingTest.m └── python ├── CMakeLists.txt └── processingTest.py /3rdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(eigen3) 2 | 3 | ADD_SUBDIRECTORY(pugixml) -------------------------------------------------------------------------------- /3rdparty/catch/Catch.cmake: -------------------------------------------------------------------------------- 1 | GET_FILENAME_COMPONENT(CATCH_ROOT ${CMAKE_CURRENT_LIST_FILE} PATH) 2 | 3 | SET(CATCH_INCLUDES "${CATCH_ROOT}") 4 | 5 | SET(CATCH_TEST_MAIN_SRC "${CATCH_ROOT}/main.cpp") 6 | 7 | FUNCTION(ADD_CXX_CATCH_DRIVER) 8 | # Parse the arguments 9 | SET(options ) 10 | SET(oneValueArgs NAME) 11 | SET(multiValueArgs SOURCES INCLUDES LIBRARIES) 12 | CMAKE_PARSE_ARGUMENTS(_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) 13 | # Extra unparsed arguments? 14 | LIST(LENGTH _TEST_UNPARSED_ARGUMENTS _TEST_NUM_UNPARSED_ARGUMENTS) 15 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 0) 16 | IF (NOT _TEST_NAME) 17 | LIST(GET _TEST_UNPARSED_ARGUMENTS 0 _TEST_NAME) 18 | ENDIF() 19 | ENDIF() 20 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 1) 21 | IF (NOT _TEST_SOURCES) 22 | LIST(GET _TEST_UNPARSED_ARGUMENTS 1 _TEST_SOURCES) 23 | ENDIF() 24 | ENDIF() 25 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 2) 26 | IF (NOT _TEST_LIBRARIES) 27 | LIST(GET _TEST_UNPARSED_ARGUMENTS 2 _TEST_LIBRARIES) 28 | ENDIF() 29 | ENDIF () 30 | # Create the test and register it 31 | SET(_TEST_SRCS ${CATCH_TEST_MAIN_SRC} ${_TEST_SOURCES}) 32 | ADD_EXECUTABLE(test_${_TEST_NAME} ${_TEST_SRCS}) 33 | SET_TARGET_PROPERTIES(test_${_TEST_NAME} PROPERTIES TARGET_MESSAGES OFF) 34 | ADD_TEST(NAME ${_TEST_NAME} COMMAND test_${_TEST_NAME}) 35 | TARGET_INCLUDE_DIRECTORIES(test_${_TEST_NAME} PRIVATE ${CATCH_INCLUDES}) 36 | IF(_TEST_INCLUDES) 37 | TARGET_INCLUDE_DIRECTORIES(test_${_TEST_NAME} PRIVATE ${_TEST_INCLUDES}) 38 | ENDIF() 39 | IF(_TEST_LIBRARIES) 40 | TARGET_LINK_LIBRARIES(test_${_TEST_NAME} ${_TEST_LIBRARIES}) 41 | ENDIF() 42 | ENDFUNCTION() -------------------------------------------------------------------------------- /3rdparty/catch/catch_and_extras.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __catch_extras_h 2 | #define __catch_extras_h 3 | 4 | #include "catch.hpp" 5 | 6 | #define AROUND(value, absTol) \ 7 | Approx(value).epsilon(0.).margin(absTol) 8 | 9 | #endif // __catch_extras_h -------------------------------------------------------------------------------- /3rdparty/catch/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define CATCH_CONFIG_MAIN 3 | #include "catch.hpp" -------------------------------------------------------------------------------- /3rdparty/coverity/coverity_model.cpp: -------------------------------------------------------------------------------- 1 | /* Coverity Scan model 2 | * 3 | * This is a modeling file for Coverity Scan. Modeling helps to avoid false 4 | * positives. 5 | * 6 | * - A model file can't import any header files. 7 | * - Therefore only some built-in primitives like int, char and void are 8 | * available but not wchar_t, NULL etc. 9 | * - Modeling doesn't need full structs and typedefs. Rudimentary structs 10 | * and similar types are sufficient. 11 | * - An uninitialized local pointer is not an error. It signifies that the 12 | * variable could be either NULL or have some data. 13 | * 14 | * Coverity Scan doesn't pick up modifications automatically. The model file 15 | * must be uploaded by an admin in the analysis settings of 16 | * https://scan.coverity.com/projects/5271 17 | */ 18 | 19 | // --------------------- CURRENTLY THIS FILE IS EMPTY ---------------------- // -------------------------------------------------------------------------------- /3rdparty/cxxtest/CxxTest.cmake: -------------------------------------------------------------------------------- 1 | # Simple CMake script which include paths of CxxTest and additional content. 2 | # The variable for the source files is not provided as they are all included in 3 | # one file 'cxxtest/Root.cpp'. This file is included at the end of the main.cpp 4 | # file. 5 | 6 | # NOTE: The CxxTest library included was modified. 7 | # This version uses C/C++ Macros instead of Python/Perl test generator. 8 | 9 | GET_FILENAME_COMPONENT(CXXTEST_ROOT ${CMAKE_CURRENT_LIST_FILE} PATH) 10 | 11 | SET(CXXTEST_INCLUDES 12 | "${CXXTEST_ROOT}" 13 | "${CXXTEST_ROOT}/additional/generator/macro" 14 | "${CXXTEST_ROOT}/additional/driver" 15 | ) 16 | 17 | SET(CXXTEST_TEST_MAIN_SRC "${CXXTEST_ROOT}/additional/driver/main.cpp") 18 | 19 | FUNCTION(ADD_CXX_CXXTEST_DRIVER) 20 | # Parse the arguments 21 | SET(options ) 22 | SET(oneValueArgs NAME) 23 | SET(multiValueArgs SOURCES INCLUDES LIBRARIES) 24 | CMAKE_PARSE_ARGUMENTS(_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) 25 | # Extra unparsed arguments? 26 | LIST(LENGTH _TEST_UNPARSED_ARGUMENTS _TEST_NUM_UNPARSED_ARGUMENTS) 27 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 0) 28 | IF (NOT _TEST_NAME) 29 | LIST(GET _TEST_UNPARSED_ARGUMENTS 0 _TEST_NAME) 30 | ENDIF() 31 | ENDIF() 32 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 1) 33 | IF (NOT _TEST_SOURCES) 34 | LIST(GET _TEST_UNPARSED_ARGUMENTS 1 _TEST_SOURCES) 35 | ENDIF() 36 | ENDIF() 37 | IF (${_TEST_NUM_UNPARSED_ARGUMENTS} GREATER 2) 38 | IF (NOT _TEST_LIBRARIES) 39 | LIST(GET _TEST_UNPARSED_ARGUMENTS 2 _TEST_LIBRARIES) 40 | ENDIF() 41 | ENDIF () 42 | # Create the test and register it 43 | SET(_TEST_SRCS ${CXXTEST_TEST_MAIN_SRC} ${_TEST_SOURCES}) 44 | ADD_EXECUTABLE(test_${_TEST_NAME} ${_TEST_SRCS}) 45 | SET_TARGET_PROPERTIES(test_${_TEST_NAME} PROPERTIES TARGET_MESSAGES OFF) 46 | ADD_TEST(NAME ${_TEST_NAME} COMMAND test_${_TEST_NAME}) 47 | TARGET_INCLUDE_DIRECTORIES(test_${_TEST_NAME} PRIVATE ${CXXTEST_INCLUDES}) 48 | IF(_TEST_INCLUDES) 49 | TARGET_INCLUDE_DIRECTORIES(test_${_TEST_NAME} PRIVATE ${_TEST_INCLUDES}) 50 | ENDIF() 51 | IF(_TEST_LIBRARIES) 52 | TARGET_LINK_LIBRARIES(test_${_TEST_NAME} ${_TEST_LIBRARIES}) 53 | ENDIF() 54 | ENDFUNCTION() -------------------------------------------------------------------------------- /3rdparty/cxxtest/README.additional: -------------------------------------------------------------------------------- 1 | The additional folder is not embedded is the standard package of CxxTest. 2 | The content of this folder adds additional functions to CxxTest. 3 | Check in each subfolder for more information. 4 | 5 | Note: The license of each additional part may be different than the original license used by CxxTest. -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/driver/cxxtest/TestDrive.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest_testdrive_h 2 | #define __cxxtest_testdrive_h 3 | 4 | #ifndef CXXTEST_RUNNING 5 | #define CXXTEST_RUNNING 6 | #endif 7 | 8 | #define _CXXTEST_HAVE_STD 9 | #define _CXXTEST_HAVE_EH 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define TS_ASSERT_EIGEN_DELTA(lhs,rhs,prec) \ 20 | TS_ASSERT((lhs - rhs).cwiseAbs().maxCoeff() <= prec) 21 | 22 | #define TSM_ASSERT_EIGEN_DELTA(msg,lhs,rhs,prec) \ 23 | TSM_ASSERT(msg + " (" + std::to_string((lhs - rhs).cwiseAbs().maxCoeff()) + " > " + std::to_string(prec) + ")", (lhs - rhs).cwiseAbs().maxCoeff() <= prec) 24 | 25 | #endif // __cxxtest_testdrive_h -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/driver/main.cpp: -------------------------------------------------------------------------------- 1 | #include "cxxtest/TestDrive.h" 2 | 3 | int main() 4 | { 5 | return CxxTest::ErrorPrinter().run(); 6 | }; 7 | 8 | #include -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/README: -------------------------------------------------------------------------------- 1 | 2013-08-17, Arnaud Barré 2 | =============================================================================== 3 | 4 | Compared to the standard way proposed by CxxTest (i.e. Python and Perl generators), this generator based on macros doesn't need extra software to generate the code which will be compiled (i.e., the main() function, and extra static classes). On the other hand, this need to add lines to register the suites and the tests you want to execute. These steps are simplified with the use of macros which significantly reduce the extra lines to add. 5 | 6 | To use this generator you need only to include one file (cxxtestgen.h) and create another file which will contain the command to run the tests. 7 | 8 | The file 'cxxtest/TestGenerator.h' includes the headers used by CxxTest and the macros required by this generator. This file has only to be included in the compiled file (see test/example2 for more information). 9 | 10 | The main() function with the printer to use must be also implemented. The examples in the subfolder 'tests' show how to do it. 11 | 12 | Note: Some compiler limits the number of symbols by compiled file (e.g. NMake 64-bit). If this happens, you need to split your tests in different CPP files (see test/example2 for more information). 13 | 14 | Note: This generator was tested with CxxTest 3.10.1. It might be used with a greater version of CxxTest. -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/test/example1/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | g++ main.cpp -o example1 -I ../.. -I ../../../../.. 3 | 4 | clear: 5 | rm -rf *o example1 -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/test/example2/DummyTest.h: -------------------------------------------------------------------------------- 1 | // Note: This is exactly the same suite and tests than in 'example1' but in 2 | // another file. The type of file to use (H, CPP, FOO, etc.) is not important 3 | // as its content will be included in another file which will be compiled. 4 | 5 | // You can give any name for the suite 6 | CXXTEST_SUITE(DummyTest) 7 | { 8 | // You can give any name for the suite 9 | CXXTEST_TEST(equal) 10 | { 11 | TS_ASSERT_EQUALS(a, 0); 12 | }; 13 | 14 | CXXTEST_TEST(differ) 15 | { 16 | int b = 3; 17 | TS_ASSERT_DIFFERS(a, b); 18 | }; 19 | 20 | // OPTIONAL 21 | // You can add test fixtures (setup, teardown) if necessary 22 | // These method must be added in the declaration of the suite, but can be 23 | // added before or after the tests. 24 | CXXTEST_SUITE_SETUP() 25 | { 26 | a = 0; 27 | }; 28 | 29 | CXXTEST_SUITE_TEARDOWN() 30 | { 31 | a += 1; 32 | }; 33 | 34 | private: 35 | int a; 36 | }; 37 | 38 | // To activate the suite, you to register it 39 | CXXTEST_SUITE_REGISTRATION(DummyTest); 40 | // Same for the test. You only need to comment the next line to unactive the test 41 | CXXTEST_TEST_REGISTRATION(DummyTest, equal); 42 | CXXTEST_TEST_REGISTRATION(DummyTest, differ); -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/test/example2/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | g++ main.cpp SomeSuites.cpp -o example2 -I. -I ../.. -I ../../../../.. 3 | 4 | clear: 5 | rm -rf *o example2 -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/test/example2/SomeSuites.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "DummyTest.h" -------------------------------------------------------------------------------- /3rdparty/cxxtest/additional/generator/macro/test/example2/main.cpp: -------------------------------------------------------------------------------- 1 | // This is only an example to use the CxxTest generator based on macros 2 | // In this example, only the CxxTest options are defined and the main() function implemented 3 | 4 | #define _CXXTEST_HAVE_STD // Standard library used 5 | #define _CXXTEST_HAVE_EH // Exceptions managed by CxxTest 6 | 7 | #include 8 | 9 | int main() 10 | { 11 | return CxxTest::ErrorPrinter().run(); 12 | }; 13 | 14 | #include -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/Descriptions.cpp: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__Descriptions_cpp__ 2 | #define __cxxtest__Descriptions_cpp__ 3 | 4 | #include 5 | 6 | namespace CxxTest 7 | { 8 | TestDescription::~TestDescription() {} 9 | SuiteDescription::~SuiteDescription() {} 10 | WorldDescription::~WorldDescription() {} 11 | 12 | // 13 | // Convert total tests to string 14 | // 15 | #ifndef _CXXTEST_FACTOR 16 | char *WorldDescription::strTotalTests( char *s ) const 17 | { 18 | numberToString( numTotalTests(), s ); 19 | return s; 20 | } 21 | #else // _CXXTEST_FACTOR 22 | char *WorldDescription::strTotalTests( char *s ) const 23 | { 24 | char *p = numberToString( numTotalTests(), s ); 25 | 26 | if ( numTotalTests() <= 1 ) 27 | return s; 28 | 29 | unsigned n = numTotalTests(); 30 | unsigned numFactors = 0; 31 | 32 | for ( unsigned factor = 2; (factor * factor) <= n; factor += (factor == 2) ? 1 : 2 ) { 33 | unsigned power; 34 | 35 | for ( power = 0; (n % factor) == 0; n /= factor ) 36 | ++ power; 37 | 38 | if ( !power ) 39 | continue; 40 | 41 | p = numberToString( factor, copyString( p, (numFactors == 0) ? " = " : " * " ) ); 42 | if ( power > 1 ) 43 | p = numberToString( power, copyString( p, "^" ) ); 44 | ++ numFactors; 45 | } 46 | 47 | if ( n > 1 ) { 48 | if ( !numFactors ) 49 | copyString( p, tracker().failedTests() ? " :(" : tracker().warnedTest() ? " :|" : " :)" ); 50 | else 51 | numberToString( n, copyString( p, " * " ) ); 52 | } 53 | return s; 54 | } 55 | #endif // _CXXTEST_FACTOR 56 | }; 57 | 58 | #endif // __cxxtest__Descriptions_cpp__ 59 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/ErrorPrinter.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__ErrorPrinter_h__ 2 | #define __cxxtest__ErrorPrinter_h__ 3 | 4 | // 5 | // The ErrorPrinter is a simple TestListener that 6 | // just prints "OK" if everything goes well, otherwise 7 | // reports the error in the format of compiler messages. 8 | // The ErrorPrinter uses std::cout 9 | // 10 | 11 | #include 12 | 13 | #ifndef _CXXTEST_HAVE_STD 14 | # define _CXXTEST_HAVE_STD 15 | #endif // _CXXTEST_HAVE_STD 16 | 17 | #include 18 | #include 19 | 20 | #ifdef _CXXTEST_OLD_STD 21 | # include 22 | #else // !_CXXTEST_OLD_STD 23 | # include 24 | #endif // _CXXTEST_OLD_STD 25 | 26 | namespace CxxTest 27 | { 28 | class ErrorPrinter : public ErrorFormatter 29 | { 30 | public: 31 | ErrorPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout), const char *preLine = ":", const char *postLine = "" ) : 32 | ErrorFormatter( new Adapter(o), preLine, postLine ) {} 33 | virtual ~ErrorPrinter() { delete outputStream(); } 34 | 35 | private: 36 | class Adapter : public OutputStream 37 | { 38 | CXXTEST_STD(ostream) &_o; 39 | public: 40 | Adapter( CXXTEST_STD(ostream) &o ) : _o(o) {} 41 | void flush() { _o.flush(); } 42 | OutputStream &operator<<( const char *s ) { _o << s; return *this; } 43 | OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } 44 | OutputStream &operator<<( unsigned i ) 45 | { 46 | char s[1 + 3 * sizeof(unsigned)]; 47 | numberToString( i, s ); 48 | _o << s; 49 | return *this; 50 | } 51 | }; 52 | }; 53 | } 54 | 55 | #endif // __cxxtest__ErrorPrinter_h__ 56 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/GlobalFixture.cpp: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__GlobalFixture_cpp__ 2 | #define __cxxtest__GlobalFixture_cpp__ 3 | 4 | #include 5 | 6 | namespace CxxTest 7 | { 8 | bool GlobalFixture::setUpWorld() { return true; } 9 | bool GlobalFixture::tearDownWorld() { return true; } 10 | bool GlobalFixture::setUp() { return true; } 11 | bool GlobalFixture::tearDown() { return true; } 12 | 13 | GlobalFixture::GlobalFixture() { attach( _list ); } 14 | GlobalFixture::~GlobalFixture() { detach( _list ); } 15 | 16 | GlobalFixture *GlobalFixture::firstGlobalFixture() { return (GlobalFixture *)_list.head(); } 17 | GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); } 18 | GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); } 19 | GlobalFixture *GlobalFixture::prevGlobalFixture() { return (GlobalFixture *)prev(); } 20 | } 21 | 22 | #endif // __cxxtest__GlobalFixture_cpp__ 23 | 24 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/GlobalFixture.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__GlobalFixture_h__ 2 | #define __cxxtest__GlobalFixture_h__ 3 | 4 | #include 5 | 6 | namespace CxxTest 7 | { 8 | class GlobalFixture : public Link 9 | { 10 | public: 11 | virtual bool setUpWorld(); 12 | virtual bool tearDownWorld(); 13 | virtual bool setUp(); 14 | virtual bool tearDown(); 15 | 16 | GlobalFixture(); 17 | ~GlobalFixture(); 18 | 19 | static GlobalFixture *firstGlobalFixture(); 20 | static GlobalFixture *lastGlobalFixture(); 21 | GlobalFixture *nextGlobalFixture(); 22 | GlobalFixture *prevGlobalFixture(); 23 | 24 | private: 25 | static List _list; 26 | }; 27 | } 28 | 29 | #endif // __cxxtest__GlobalFixture_h__ 30 | 31 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/LinkedList.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__LinkedList_h__ 2 | #define __cxxtest__LinkedList_h__ 3 | 4 | #include 5 | 6 | namespace CxxTest 7 | { 8 | struct List; 9 | class Link; 10 | 11 | struct List 12 | { 13 | Link *_head; 14 | Link *_tail; 15 | 16 | void initialize(); 17 | 18 | Link *head(); 19 | const Link *head() const; 20 | Link *tail(); 21 | const Link *tail() const; 22 | 23 | bool empty() const; 24 | unsigned size() const; 25 | Link *nth( unsigned n ); 26 | 27 | void activateAll(); 28 | void leaveOnly( const Link &link ); 29 | }; 30 | 31 | class Link 32 | { 33 | public: 34 | Link(); 35 | virtual ~Link(); 36 | 37 | bool active() const; 38 | void setActive( bool value = true ); 39 | 40 | Link *justNext(); 41 | Link *justPrev(); 42 | 43 | Link *next(); 44 | Link *prev(); 45 | const Link *next() const; 46 | const Link *prev() const; 47 | 48 | virtual bool setUp() = 0; 49 | virtual bool tearDown() = 0; 50 | 51 | void attach( List &l ); 52 | void detach( List &l ); 53 | 54 | private: 55 | Link *_next; 56 | Link *_prev; 57 | bool _active; 58 | 59 | Link( const Link & ); 60 | Link &operator=( const Link & ); 61 | }; 62 | } 63 | 64 | #endif // __cxxtest__LinkedList_h__ 65 | 66 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/Root.cpp: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__Root_cpp__ 2 | #define __cxxtest__Root_cpp__ 3 | 4 | // 5 | // This file holds the "root" of CxxTest, i.e. 6 | // the parts that must be in a source file file. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #endif // __cxxtest__Root_cpp__ 19 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/SelfTest.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest_SelfTest_h__ 2 | #define __cxxtest_SelfTest_h__ 3 | 4 | #define CXXTEST_SUITE(name) 5 | #define CXXTEST_CODE(member) 6 | 7 | #endif // __cxxtest_SelfTest_h__ 8 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/StdHeaders.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest_StdHeaders_h__ 2 | #define __cxxtest_StdHeaders_h__ 3 | 4 | // 5 | // This file basically #includes the STL headers. 6 | // It exists to support warning level 4 in Visual C++ 7 | // 8 | 9 | #ifdef _MSC_VER 10 | # pragma warning( push, 1 ) 11 | #endif // _MSC_VER 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #ifdef _MSC_VER 22 | # pragma warning( pop ) 23 | #endif // _MSC_VER 24 | 25 | #endif // __cxxtest_StdHeaders_h__ 26 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/StdioFilePrinter.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__StdioFilePrinter_h__ 2 | #define __cxxtest__StdioFilePrinter_h__ 3 | 4 | // 5 | // The StdioFilePrinter is a simple TestListener that 6 | // just prints "OK" if everything goes well, otherwise 7 | // reports the error in the format of compiler messages. 8 | // This class uses , i.e. FILE * and fprintf(). 9 | // 10 | 11 | #include 12 | #include 13 | 14 | namespace CxxTest 15 | { 16 | class StdioFilePrinter : public ErrorFormatter 17 | { 18 | public: 19 | StdioFilePrinter( FILE *o, const char *preLine = ":", const char *postLine = "" ) : 20 | ErrorFormatter( new Adapter(o), preLine, postLine ) {} 21 | virtual ~StdioFilePrinter() { delete outputStream(); } 22 | 23 | private: 24 | class Adapter : public OutputStream 25 | { 26 | Adapter( const Adapter & ); 27 | Adapter &operator=( const Adapter & ); 28 | 29 | FILE *_o; 30 | 31 | public: 32 | Adapter( FILE *o ) : _o(o) {} 33 | void flush() { fflush( _o ); } 34 | OutputStream &operator<<( unsigned i ) { fprintf( _o, "%u", i ); return *this; } 35 | OutputStream &operator<<( const char *s ) { fputs( s, _o ); return *this; } 36 | OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } 37 | }; 38 | }; 39 | } 40 | 41 | #endif // __cxxtest__StdioFilePrinter_h__ 42 | -------------------------------------------------------------------------------- /3rdparty/cxxtest/cxxtest/StdioPrinter.h: -------------------------------------------------------------------------------- 1 | #ifndef __cxxtest__StdioPrinter_h__ 2 | #define __cxxtest__StdioPrinter_h__ 3 | 4 | // 5 | // The StdioPrinter is an StdioFilePrinter which defaults to stdout. 6 | // This should have been called StdOutPrinter or something, but the name 7 | // has been historically used. 8 | // 9 | 10 | #include 11 | 12 | namespace CxxTest 13 | { 14 | class StdioPrinter : public StdioFilePrinter 15 | { 16 | public: 17 | StdioPrinter( FILE *o = stdout, const char *preLine = ":", const char *postLine = "" ) : 18 | StdioFilePrinter( o, preLine, postLine ) {} 19 | }; 20 | } 21 | 22 | #endif // __cxxtest__StdioPrinter_h__ 23 | -------------------------------------------------------------------------------- /3rdparty/eigen3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | IF(BUILD_UNIT_TESTS) 2 | ADD_SUBDIRECTORY(test) 3 | ENDIF() 4 | 5 | # Eigen 6 | INSTALL(DIRECTORY ${OPENMA_SOURCE_DIR}/3rdparty/eigen3/Eigen 7 | DESTINATION include/eigen3/Eigen 8 | COMPONENT dev 9 | PATTERN ".DS_Store" EXCLUDE 10 | PATTERN "CMakeLists.txt" EXCLUDE 11 | PATTERN ".cpp" EXCLUDE) 12 | # Eigen_unsupported (extra modules) 13 | INSTALL(DIRECTORY ${OPENMA_SOURCE_DIR}/3rdparty/eigen3/Eigen_unsupported 14 | DESTINATION include/eigen3/Eigen_unsupported 15 | COMPONENT dev 16 | PATTERN ".DS_Store" EXCLUDE 17 | PATTERN "CMakeLists.txt" EXCLUDE 18 | PATTERN ".cpp" EXCLUDE) 19 | # Eigen_openma (plugins and extras) 20 | INSTALL(DIRECTORY ${OPENMA_SOURCE_DIR}/3rdparty/eigen3/Eigen_openma 21 | DESTINATION include/eigen3/Eigen_openma 22 | COMPONENT dev 23 | PATTERN ".DS_Store" EXCLUDE) -------------------------------------------------------------------------------- /3rdparty/eigen3/COPYING.BSD: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ -------------------------------------------------------------------------------- /3rdparty/eigen3/COPYING.README: -------------------------------------------------------------------------------- 1 | Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: 2 | http://www.mozilla.org/MPL/2.0/ 3 | http://www.mozilla.org/MPL/2.0/FAQ.html 4 | 5 | Some files contain third-party code under BSD or LGPL licenses, whence the other 6 | COPYING.* files here. 7 | 8 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. 9 | For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. 10 | 11 | If you want to guarantee that the Eigen code that you are #including is licensed 12 | under the MPL2 and possibly more permissive licenses (like BSD), #define this 13 | preprocessor symbol: 14 | EIGEN_MPL2_ONLY 15 | For example, with most compilers, you could add this to your project CXXFLAGS: 16 | -DEIGEN_MPL2_ONLY 17 | This will cause a compilation error to be generated if you #include any code that is 18 | LGPL licensed. 19 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(RegexUtils) 2 | test_escape_string_as_regex() 3 | 4 | file(GLOB Eigen_directory_files "*") 5 | 6 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 7 | 8 | foreach(f ${Eigen_directory_files}) 9 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") 10 | list(APPEND Eigen_directory_files_to_install ${f}) 11 | endif() 12 | endforeach(f ${Eigen_directory_files}) 13 | 14 | install(FILES 15 | ${Eigen_directory_files_to_install} 16 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel 17 | ) 18 | 19 | add_subdirectory(src) 20 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup Cholesky_Module Cholesky module 9 | * 10 | * 11 | * 12 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 13 | * Those decompositions are accessible via the following MatrixBase methods: 14 | * - MatrixBase::llt(), 15 | * - MatrixBase::ldlt() 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | */ 21 | 22 | #include "src/misc/Solve.h" 23 | #include "src/Cholesky/LLT.h" 24 | #include "src/Cholesky/LDLT.h" 25 | #ifdef EIGEN_USE_LAPACKE 26 | #include "src/Cholesky/LLT_MKL.h" 27 | #endif 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_CHOLESKY_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/CholmodSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLMODSUPPORT_MODULE_H 2 | #define EIGEN_CHOLMODSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup CholmodSupport_Module CholmodSupport module 14 | * 15 | * This module provides an interface to the Cholmod library which is part of the suitesparse package. 16 | * It provides the two following main factorization classes: 17 | * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. 18 | * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). 19 | * 20 | * For the sake of completeness, this module also propose the two following classes: 21 | * - class CholmodSimplicialLLT 22 | * - class CholmodSimplicialLDLT 23 | * Note that these classes does not bring any particular advantage compared to the built-in 24 | * SimplicialLLT and SimplicialLDLT factorization classes. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. 31 | * The dependencies depend on how cholmod has been compiled. 32 | * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/misc/Solve.h" 37 | #include "src/misc/SparseSolve.h" 38 | 39 | #include "src/CholmodSupport/CholmodSupport.h" 40 | 41 | 42 | #include "src/Core/util/ReenableStupidWarnings.h" 43 | 44 | #endif // EIGEN_CHOLMODSUPPORT_MODULE_H 45 | 46 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | //#include "Sparse" 3 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | #include "Geometry" 13 | 14 | /** \defgroup Eigenvalues_Module Eigenvalues module 15 | * 16 | * 17 | * 18 | * This module mainly provides various eigenvalue solvers. 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::eigenvalues(), 21 | * - MatrixBase::operatorNorm() 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | */ 27 | 28 | #include "src/Eigenvalues/Tridiagonalization.h" 29 | #include "src/Eigenvalues/RealSchur.h" 30 | #include "src/Eigenvalues/EigenSolver.h" 31 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 32 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/HessenbergDecomposition.h" 34 | #include "src/Eigenvalues/ComplexSchur.h" 35 | #include "src/Eigenvalues/ComplexEigenSolver.h" 36 | #include "src/Eigenvalues/RealQZ.h" 37 | #include "src/Eigenvalues/GeneralizedEigenSolver.h" 38 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 39 | #ifdef EIGEN_USE_LAPACKE 40 | #include "src/Eigenvalues/RealSchur_MKL.h" 41 | #include "src/Eigenvalues/ComplexSchur_MKL.h" 42 | #include "src/Eigenvalues/SelfAdjointEigenSolver_MKL.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_EIGENVALUES_MODULE_H 48 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 49 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | /** \defgroup Geometry_Module Geometry module 17 | * 18 | * 19 | * 20 | * This module provides support for: 21 | * - fixed-size homogeneous transformations 22 | * - translation, scaling, 2D and 3D rotations 23 | * - quaternions 24 | * - \ref MatrixBase::cross() "cross product" 25 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 26 | * - some linear components: parametrized-lines and hyperplanes 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #include "src/Geometry/OrthoMethods.h" 34 | #include "src/Geometry/EulerAngles.h" 35 | 36 | #if EIGEN2_SUPPORT_STAGE > STAGE20_RESOLVE_API_CONFLICTS 37 | #include "src/Geometry/Homogeneous.h" 38 | #include "src/Geometry/RotationBase.h" 39 | #include "src/Geometry/Rotation2D.h" 40 | #include "src/Geometry/Quaternion.h" 41 | #include "src/Geometry/AngleAxis.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | #endif 54 | 55 | #ifdef EIGEN2_SUPPORT 56 | #include "src/Eigen2Support/Geometry/All.h" 57 | #endif 58 | 59 | #include "src/Core/util/ReenableStupidWarnings.h" 60 | 61 | #endif // EIGEN_GEOMETRY_MODULE_H 62 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 63 | 64 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/IterativeLinearSolvers: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 2 | #define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | 7 | #include "src/Core/util/DisableStupidWarnings.h" 8 | 9 | /** 10 | * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module 11 | * 12 | * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. 13 | * Those solvers are accessible via the following classes: 14 | * - ConjugateGradient for selfadjoint (hermitian) matrices, 15 | * - BiCGSTAB for general square matrices. 16 | * 17 | * These iterative solvers are associated with some preconditioners: 18 | * - IdentityPreconditioner - not really useful 19 | * - DiagonalPreconditioner - also called JAcobi preconditioner, work very well on diagonal dominant matrices. 20 | * - IncompleteILUT - incomplete LU factorization with dual thresholding 21 | * 22 | * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/IterativeLinearSolvers/IterativeSolverBase.h" 33 | #include "src/IterativeLinearSolvers/BasicPreconditioners.h" 34 | #include "src/IterativeLinearSolvers/ConjugateGradient.h" 35 | #include "src/IterativeLinearSolvers/BiCGSTAB.h" 36 | #include "src/IterativeLinearSolvers/IncompleteLUT.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H 41 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup LU_Module LU module 9 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 10 | * This module defines the following MatrixBase methods: 11 | * - MatrixBase::inverse() 12 | * - MatrixBase::determinant() 13 | * 14 | * \code 15 | * #include 16 | * \endcode 17 | */ 18 | 19 | #include "src/misc/Solve.h" 20 | #include "src/misc/Kernel.h" 21 | #include "src/misc/Image.h" 22 | #include "src/LU/FullPivLU.h" 23 | #include "src/LU/PartialPivLU.h" 24 | #ifdef EIGEN_USE_LAPACKE 25 | #include "src/LU/PartialPivLU_MKL.h" 26 | #endif 27 | #include "src/LU/Determinant.h" 28 | #include "src/LU/Inverse.h" 29 | 30 | #if defined EIGEN_VECTORIZE_SSE 31 | #include "src/LU/arch/Inverse_SSE.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/LU.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_LU_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/LeastSquares: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_REGRESSION_MODULE_H 2 | #define EIGEN_REGRESSION_MODULE_H 3 | 4 | #ifndef EIGEN2_SUPPORT 5 | #error LeastSquares is only available in Eigen2 support mode (define EIGEN2_SUPPORT) 6 | #endif 7 | 8 | // exclude from normal eigen3-only documentation 9 | #ifdef EIGEN2_SUPPORT 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Eigenvalues" 16 | #include "Geometry" 17 | 18 | /** \defgroup LeastSquares_Module LeastSquares module 19 | * This module provides linear regression and related features. 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/Eigen2Support/LeastSquares.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN2_SUPPORT 31 | 32 | #endif // EIGEN_REGRESSION_MODULE_H 33 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_METISSUPPORT_MODULE_H 2 | #define EIGEN_METISSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | 13 | /** \ingroup Support_modules 14 | * \defgroup MetisSupport_Module MetisSupport module 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 20 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 21 | */ 22 | 23 | 24 | #include "src/MetisSupport/MetisSupport.h" 25 | 26 | #include "src/Core/util/ReenableStupidWarnings.h" 27 | 28 | #endif // EIGEN_METISSUPPORT_MODULE_H 29 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/PaStiXSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PASTIXSUPPORT_MODULE_H 2 | #define EIGEN_PASTIXSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | extern "C" { 10 | #include 11 | #include 12 | } 13 | 14 | #ifdef complex 15 | #undef complex 16 | #endif 17 | 18 | /** \ingroup Support_modules 19 | * \defgroup PaStiXSupport_Module PaStiXSupport module 20 | * 21 | * This module provides an interface to the PaSTiX library. 22 | * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. 23 | * It provides the two following main factorization classes: 24 | * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. 25 | * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. 26 | * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | * 32 | * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. 33 | * The dependencies depend on how PaSTiX has been compiled. 34 | * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. 35 | * 36 | */ 37 | 38 | #include "src/misc/Solve.h" 39 | #include "src/misc/SparseSolve.h" 40 | 41 | #include "src/PaStiXSupport/PaStiXSupport.h" 42 | 43 | 44 | #include "src/Core/util/ReenableStupidWarnings.h" 45 | 46 | #endif // EIGEN_PASTIXSUPPORT_MODULE_H 47 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 2 | #define EIGEN_PARDISOSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | 10 | #include 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup PardisoSupport_Module PardisoSupport module 14 | * 15 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 22 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 23 | * 24 | */ 25 | 26 | #include "src/PardisoSupport/PardisoSupport.h" 27 | 28 | #include "src/Core/util/ReenableStupidWarnings.h" 29 | 30 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 31 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | /** \defgroup QR_Module QR module 13 | * 14 | * 15 | * 16 | * This module provides various QR decompositions 17 | * This module also provides some MatrixBase methods, including: 18 | * - MatrixBase::qr(), 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/QR/HouseholderQR.h" 27 | #include "src/QR/FullPivHouseholderQR.h" 28 | #include "src/QR/ColPivHouseholderQR.h" 29 | #ifdef EIGEN_USE_LAPACKE 30 | #include "src/QR/HouseholderQR_MKL.h" 31 | #include "src/QR/ColPivHouseholderQR_MKL.h" 32 | #endif 33 | 34 | #ifdef EIGEN2_SUPPORT 35 | #include "src/Eigen2Support/QR.h" 36 | #endif 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #ifdef EIGEN2_SUPPORT 41 | #include "Eigenvalues" 42 | #endif 43 | 44 | #endif // EIGEN_QR_MODULE_H 45 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 46 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 2 | #define EIGEN_SPQRSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include "SuiteSparseQR.hpp" 9 | 10 | /** \ingroup Support_modules 11 | * \defgroup SPQRSupport_Module SuiteSparseQR module 12 | * 13 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 14 | * 15 | * \code 16 | * #include 17 | * \endcode 18 | * 19 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 20 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | #include "src/CholmodSupport/CholmodSupport.h" 27 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableStupidWarnings.h" 9 | 10 | /** \defgroup SVD_Module SVD module 11 | * 12 | * 13 | * 14 | * This module provides SVD decomposition for matrices (both real and complex). 15 | * This decomposition is accessible via the following MatrixBase method: 16 | * - MatrixBase::jacobiSvd() 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/SVD/JacobiSVD.h" 25 | #if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) 26 | #include "src/SVD/JacobiSVD_MKL.h" 27 | #endif 28 | #include "src/SVD/UpperBidiagonalization.h" 29 | 30 | #ifdef EIGEN2_SUPPORT 31 | #include "src/Eigen2Support/SVD.h" 32 | #endif 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_SVD_MODULE_H 37 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 38 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/misc/Solve.h" 38 | #include "src/misc/SparseSolve.h" 39 | #include "src/SparseCholesky/SimplicialCholesky.h" 40 | 41 | #ifndef EIGEN_MPL2_ONLY 42 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 43 | #endif 44 | 45 | #include "src/Core/util/ReenableStupidWarnings.h" 46 | 47 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 48 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SparseCore: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSECORE_MODULE_H 2 | #define EIGEN_SPARSECORE_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /** 15 | * \defgroup SparseCore_Module SparseCore module 16 | * 17 | * This module provides a sparse matrix representation, and basic associated matrix manipulations 18 | * and operations. 19 | * 20 | * See the \ref TutorialSparse "Sparse tutorial" 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * This module depends on: Core. 27 | */ 28 | 29 | namespace Eigen { 30 | 31 | /** The type used to identify a general sparse storage. */ 32 | struct Sparse {}; 33 | 34 | } 35 | 36 | #include "src/SparseCore/SparseUtil.h" 37 | #include "src/SparseCore/SparseMatrixBase.h" 38 | #include "src/SparseCore/CompressedStorage.h" 39 | #include "src/SparseCore/AmbiVector.h" 40 | #include "src/SparseCore/SparseMatrix.h" 41 | #include "src/SparseCore/MappedSparseMatrix.h" 42 | #include "src/SparseCore/SparseVector.h" 43 | #include "src/SparseCore/SparseBlock.h" 44 | #include "src/SparseCore/SparseTranspose.h" 45 | #include "src/SparseCore/SparseCwiseUnaryOp.h" 46 | #include "src/SparseCore/SparseCwiseBinaryOp.h" 47 | #include "src/SparseCore/SparseDot.h" 48 | #include "src/SparseCore/SparsePermutation.h" 49 | #include "src/SparseCore/SparseRedux.h" 50 | #include "src/SparseCore/SparseFuzzy.h" 51 | #include "src/SparseCore/ConservativeSparseSparseProduct.h" 52 | #include "src/SparseCore/SparseSparseProductWithPruning.h" 53 | #include "src/SparseCore/SparseProduct.h" 54 | #include "src/SparseCore/SparseDenseProduct.h" 55 | #include "src/SparseCore/SparseDiagonalProduct.h" 56 | #include "src/SparseCore/SparseTriangularView.h" 57 | #include "src/SparseCore/SparseSelfAdjointView.h" 58 | #include "src/SparseCore/TriangularSolver.h" 59 | #include "src/SparseCore/SparseView.h" 60 | 61 | #include "src/Core/util/ReenableStupidWarnings.h" 62 | 63 | #endif // EIGEN_SPARSECORE_MODULE_H 64 | 65 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SparseLU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2012 Désiré Nuentsa-Wakam 5 | // Copyright (C) 2012 Gael Guennebaud 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_SPARSELU_MODULE_H 12 | #define EIGEN_SPARSELU_MODULE_H 13 | 14 | #include "SparseCore" 15 | 16 | /** 17 | * \defgroup SparseLU_Module SparseLU module 18 | * This module defines a supernodal factorization of general sparse matrices. 19 | * The code is fully optimized for supernode-panel updates with specialized kernels. 20 | * Please, see the documentation of the SparseLU class for more details. 21 | */ 22 | 23 | #include "src/misc/Solve.h" 24 | #include "src/misc/SparseSolve.h" 25 | 26 | // Ordering interface 27 | #include "OrderingMethods" 28 | 29 | #include "src/SparseLU/SparseLU_gemm_kernel.h" 30 | 31 | #include "src/SparseLU/SparseLU_Structs.h" 32 | #include "src/SparseLU/SparseLU_SupernodalMatrix.h" 33 | #include "src/SparseLU/SparseLUImpl.h" 34 | #include "src/SparseCore/SparseColEtree.h" 35 | #include "src/SparseLU/SparseLU_Memory.h" 36 | #include "src/SparseLU/SparseLU_heap_relax_snode.h" 37 | #include "src/SparseLU/SparseLU_relax_snode.h" 38 | #include "src/SparseLU/SparseLU_pivotL.h" 39 | #include "src/SparseLU/SparseLU_panel_dfs.h" 40 | #include "src/SparseLU/SparseLU_kernel_bmod.h" 41 | #include "src/SparseLU/SparseLU_panel_bmod.h" 42 | #include "src/SparseLU/SparseLU_column_dfs.h" 43 | #include "src/SparseLU/SparseLU_column_bmod.h" 44 | #include "src/SparseLU/SparseLU_copy_to_ucol.h" 45 | #include "src/SparseLU/SparseLU_pruneL.h" 46 | #include "src/SparseLU/SparseLU_Utils.h" 47 | #include "src/SparseLU/SparseLU.h" 48 | 49 | #endif // EIGEN_SPARSELU_MODULE_H 50 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSEQR_MODULE_H 2 | #define EIGEN_SPARSEQR_MODULE_H 3 | 4 | #include "SparseCore" 5 | #include "OrderingMethods" 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | /** \defgroup SparseQR_Module SparseQR module 9 | * \brief Provides QR decomposition for sparse matrices 10 | * 11 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 12 | * The columns of the input matrix should be reordered to limit the fill-in during the 13 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 14 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 15 | * of built-in and external ordering methods. 16 | * 17 | * \code 18 | * #include 19 | * \endcode 20 | * 21 | * 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/misc/SparseSolve.h" 26 | 27 | #include "OrderingMethods" 28 | #include "src/SparseCore/SparseColEtree.h" 29 | #include "src/SparseQR/SparseQR.h" 30 | 31 | #include "src/Core/util/ReenableStupidWarnings.h" 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/SuperLUSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H 2 | #define EIGEN_SUPERLUSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | #ifdef EMPTY 9 | #define EIGEN_EMPTY_WAS_ALREADY_DEFINED 10 | #endif 11 | 12 | typedef int int_t; 13 | #include 14 | #include 15 | #include 16 | 17 | // slu_util.h defines a preprocessor token named EMPTY which is really polluting, 18 | // so we remove it in favor of a SUPERLU_EMPTY token. 19 | // If EMPTY was already defined then we don't undef it. 20 | 21 | #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) 22 | # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED 23 | #elif defined(EMPTY) 24 | # undef EMPTY 25 | #endif 26 | 27 | #define SUPERLU_EMPTY (-1) 28 | 29 | namespace Eigen { struct SluMatrix; } 30 | 31 | /** \ingroup Support_modules 32 | * \defgroup SuperLUSupport_Module SuperLUSupport module 33 | * 34 | * This module provides an interface to the SuperLU library. 35 | * It provides the following factorization class: 36 | * - class SuperLU: a supernodal sequential LU factorization. 37 | * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). 38 | * 39 | * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. 40 | * 41 | * \code 42 | * #include 43 | * \endcode 44 | * 45 | * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. 46 | * The dependencies depend on how superlu has been compiled. 47 | * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. 48 | * 49 | */ 50 | 51 | #include "src/misc/Solve.h" 52 | #include "src/misc/SparseSolve.h" 53 | 54 | #include "src/SuperLUSupport/SuperLUSupport.h" 55 | 56 | 57 | #include "src/Core/util/ReenableStupidWarnings.h" 58 | 59 | #endif // EIGEN_SUPERLUSUPPORT_MODULE_H 60 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 2 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 3 | 4 | #include "SparseCore" 5 | 6 | #include "src/Core/util/DisableStupidWarnings.h" 7 | 8 | extern "C" { 9 | #include 10 | } 11 | 12 | /** \ingroup Support_modules 13 | * \defgroup UmfPackSupport_Module UmfPackSupport module 14 | * 15 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 16 | * It provides the following factorization class: 17 | * - class UmfPackLU: a multifrontal sequential LU factorization. 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | * 23 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 24 | * The dependencies depend on how umfpack has been compiled. 25 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 26 | * 27 | */ 28 | 29 | #include "src/misc/Solve.h" 30 | #include "src/misc/SparseSolve.h" 31 | 32 | #include "src/UmfPackSupport/UmfPackSupport.h" 33 | 34 | #include "src/Core/util/ReenableStupidWarnings.h" 35 | 36 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 37 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") 3 | foreach(f ${Eigen_src_subdirectories}) 4 | if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" ) 5 | add_subdirectory(${f}) 6 | endif() 7 | endforeach() 8 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/CholmodSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_CholmodSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_CholmodSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/CholmodSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/CoreIterators.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_COREITERATORS_H 11 | #define EIGEN_COREITERATORS_H 12 | 13 | namespace Eigen { 14 | 15 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 16 | */ 17 | 18 | /** \ingroup SparseCore_Module 19 | * \class InnerIterator 20 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 21 | * 22 | * todo 23 | */ 24 | 25 | // generic version for dense matrix and expressions 26 | template class DenseBase::InnerIterator 27 | { 28 | protected: 29 | typedef typename Derived::Scalar Scalar; 30 | typedef typename Derived::Index Index; 31 | 32 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 33 | public: 34 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 35 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 36 | {} 37 | 38 | EIGEN_STRONG_INLINE Scalar value() const 39 | { 40 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 41 | : m_expression.coeff(m_inner, m_outer); 42 | } 43 | 44 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 45 | 46 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 47 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 48 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 49 | 50 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 51 | 52 | protected: 53 | const Derived& m_expression; 54 | Index m_inner; 55 | const Index m_outer; 56 | const Index m_end; 57 | }; 58 | 59 | } // end namespace Eigen 60 | 61 | #endif // EIGEN_COREITERATORS_H 62 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | 12 | /* All the parameters defined in this file can be specialized in the 13 | * architecture specific files, and/or by the user. 14 | * More to come... */ 15 | 16 | #ifndef EIGEN_DEFAULT_SETTINGS_H 17 | #define EIGEN_DEFAULT_SETTINGS_H 18 | 19 | /** Defines the maximal loop size to enable meta unrolling of loops. 20 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 21 | * it does not correspond to the number of iterations or the number of instructions 22 | */ 23 | #ifndef EIGEN_UNROLLING_LIMIT 24 | #define EIGEN_UNROLLING_LIMIT 100 25 | #endif 26 | 27 | /** Defines the threshold between a "small" and a "large" matrix. 28 | * This threshold is mainly used to select the proper product implementation. 29 | */ 30 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 31 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 32 | #endif 33 | 34 | /** Defines the maximal width of the blocks used in the triangular product and solver 35 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 36 | */ 37 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 38 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 39 | #endif 40 | 41 | 42 | /** Defines the default number of registers available for that architecture. 43 | * Currently it must be 8 or 16. Other values will fail. 44 | */ 45 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 46 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 47 | #endif 48 | 49 | #endif // EIGEN_DEFAULT_SETTINGS_H 50 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(Geometry) -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigen2Support/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support/Geometry 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/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 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigen2Support/Memory.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2011 Benoit Jacob 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN2_MEMORY_H 11 | #define EIGEN2_MEMORY_H 12 | 13 | namespace Eigen { 14 | 15 | inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); } 16 | inline void ei_aligned_free(void *ptr) { internal::aligned_free(ptr); } 17 | inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); } 18 | inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); } 19 | inline void ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); } 20 | 21 | template inline void* ei_conditional_aligned_malloc(size_t size) 22 | { 23 | return internal::conditional_aligned_malloc(size); 24 | } 25 | template inline void ei_conditional_aligned_free(void *ptr) 26 | { 27 | internal::conditional_aligned_free(ptr); 28 | } 29 | template inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size) 30 | { 31 | return internal::conditional_aligned_realloc(ptr, new_size, old_size); 32 | } 33 | 34 | template inline T* ei_aligned_new(size_t size) 35 | { 36 | return internal::aligned_new(size); 37 | } 38 | template inline void ei_aligned_delete(T *ptr, size_t size) 39 | { 40 | return internal::aligned_delete(ptr, size); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN2_MACROS_H 46 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigen2Support/QR.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2011 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN2_QR_H 12 | #define EIGEN2_QR_H 13 | 14 | namespace Eigen { 15 | 16 | template 17 | class QR : public HouseholderQR 18 | { 19 | public: 20 | 21 | typedef HouseholderQR Base; 22 | typedef Block MatrixRBlockType; 23 | 24 | QR() : Base() {} 25 | 26 | template 27 | explicit QR(const T& t) : Base(t) {} 28 | 29 | template 30 | bool solve(const MatrixBase& b, ResultType *result) const 31 | { 32 | *result = static_cast(this)->solve(b); 33 | return true; 34 | } 35 | 36 | MatrixType matrixQ(void) const { 37 | MatrixType ret = MatrixType::Identity(this->rows(), this->cols()); 38 | ret = this->householderQ() * ret; 39 | return ret; 40 | } 41 | 42 | bool isFullRank() const { 43 | return true; 44 | } 45 | 46 | const TriangularView 47 | matrixR(void) const 48 | { 49 | int cols = this->cols(); 50 | return MatrixRBlockType(this->matrixQR(), 0, 0, cols, cols).template triangularView(); 51 | } 52 | }; 53 | 54 | /** \return the QR decomposition of \c *this. 55 | * 56 | * \sa class QR 57 | */ 58 | template 59 | const QR::PlainObject> 60 | MatrixBase::qr() const 61 | { 62 | return QR(eval()); 63 | } 64 | 65 | } // end namespace Eigen 66 | 67 | #endif // EIGEN2_QR_H 68 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 11 | #define EIGEN_TRIANGULAR_SOLVER2_H 12 | 13 | namespace Eigen { 14 | 15 | const unsigned int UnitDiagBit = UnitDiag; 16 | const unsigned int SelfAdjointBit = SelfAdjoint; 17 | const unsigned int UpperTriangularBit = Upper; 18 | const unsigned int LowerTriangularBit = Lower; 19 | 20 | const unsigned int UpperTriangular = Upper; 21 | const unsigned int LowerTriangular = Lower; 22 | const unsigned int UnitUpperTriangular = UnitUpper; 23 | const unsigned int UnitLowerTriangular = UnitLower; 24 | 25 | template 26 | template 27 | typename ExpressionType::PlainObject 28 | Flagged::solveTriangular(const MatrixBase& other) const 29 | { 30 | return m_matrix.template triangularView().solve(other.derived()); 31 | } 32 | 33 | template 34 | template 35 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 36 | { 37 | m_matrix.template triangularView().solveInPlace(other.derived()); 38 | } 39 | 40 | } // end namespace Eigen 41 | 42 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 43 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/IterativeLinearSolvers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_IterativeLinearSolvers_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_IterativeLinearSolvers_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/IterativeLinearSolvers COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/MetisSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_MetisSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_MetisSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/MetisSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/OrderingMethods/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_OrderingMethods_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_OrderingMethods_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/OrderingMethods COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/PaStiXSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PastixSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PastixSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PaStiXSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/PardisoSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_PardisoSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_PardisoSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/PardisoSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SPQRSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SPQRSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SPQRSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SPQRSupport/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseCholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseCore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseCore_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseCore_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseCore COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | // template 14 | // template 15 | // bool SparseMatrixBase::isApprox( 16 | // const OtherDerived& other, 17 | // typename NumTraits::Real prec 18 | // ) const 19 | // { 20 | // const typename internal::nested::type nested(derived()); 21 | // const typename internal::nested::type otherNested(other.derived()); 22 | // return (nested - otherNested).cwise().abs2().sum() 23 | // <= prec * prec * (std::min)(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 24 | // } 25 | 26 | #endif // EIGEN_SPARSE_FUZZY_H 27 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseCore/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSEREDUX_H 11 | #define EIGEN_SPARSEREDUX_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | typename internal::traits::Scalar 17 | SparseMatrixBase::sum() const 18 | { 19 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 20 | Scalar res(0); 21 | for (Index j=0; j 28 | typename internal::traits >::Scalar 29 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 30 | { 31 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 32 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 33 | } 34 | 35 | template 36 | typename internal::traits >::Scalar 37 | SparseVector<_Scalar,_Options,_Index>::sum() const 38 | { 39 | eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 40 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 41 | } 42 | 43 | } // end namespace Eigen 44 | 45 | #endif // EIGEN_SPARSEREDUX_H 46 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseLU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseLU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseLU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseLU COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SparseQR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SparseQR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SparseQR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SparseQR/ COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/SuperLUSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SuperLUSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SuperLUSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SuperLUSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/UmfPackSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_UmfPackSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_UmfPackSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/UmfPackSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing common coefficient wise functions. 12 | 13 | /** \returns an expression of the difference of \c *this and \a other 14 | * 15 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 16 | * 17 | * \sa class CwiseBinaryOp, operator-=() 18 | */ 19 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,internal::scalar_difference_op) 20 | 21 | /** \returns an expression of the sum of \c *this and \a other 22 | * 23 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 24 | * 25 | * \sa class CwiseBinaryOp, operator+=() 26 | */ 27 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op) 28 | 29 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 30 | * 31 | * The template parameter \a CustomBinaryOp is the type of the functor 32 | * of the custom operator (see class CwiseBinaryOp for an example) 33 | * 34 | * Here is an example illustrating the use of custom functors: 35 | * \include class_CwiseBinaryOp.cpp 36 | * Output: \verbinclude class_CwiseBinaryOp.out 37 | * 38 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 39 | */ 40 | template 41 | EIGEN_STRONG_INLINE const CwiseBinaryOp 42 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 43 | { 44 | return CwiseBinaryOp(derived(), other.derived(), func); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | // This file is a base class plugin containing matrix specifics coefficient wise functions. 12 | 13 | /** \returns an expression of the coefficient-wise absolute value of \c *this 14 | * 15 | * Example: \include MatrixBase_cwiseAbs.cpp 16 | * Output: \verbinclude MatrixBase_cwiseAbs.out 17 | * 18 | * \sa cwiseAbs2() 19 | */ 20 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 21 | cwiseAbs() const { return derived(); } 22 | 23 | /** \returns an expression of the coefficient-wise squared absolute value of \c *this 24 | * 25 | * Example: \include MatrixBase_cwiseAbs2.cpp 26 | * Output: \verbinclude MatrixBase_cwiseAbs2.out 27 | * 28 | * \sa cwiseAbs() 29 | */ 30 | EIGEN_STRONG_INLINE const CwiseUnaryOp, const Derived> 31 | cwiseAbs2() const { return derived(); } 32 | 33 | /** \returns an expression of the coefficient-wise square root of *this. 34 | * 35 | * Example: \include MatrixBase_cwiseSqrt.cpp 36 | * Output: \verbinclude MatrixBase_cwiseSqrt.out 37 | * 38 | * \sa cwisePow(), cwiseSquare() 39 | */ 40 | inline const CwiseUnaryOp, const Derived> 41 | cwiseSqrt() const { return derived(); } 42 | 43 | /** \returns an expression of the coefficient-wise inverse of *this. 44 | * 45 | * Example: \include MatrixBase_cwiseInverse.cpp 46 | * Output: \verbinclude MatrixBase_cwiseInverse.out 47 | * 48 | * \sa cwiseProduct() 49 | */ 50 | inline const CwiseUnaryOp, const Derived> 51 | cwiseInverse() const { return derived(); } 52 | 53 | -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen_openma/Utils/sign.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef __eigen_openma_sign_h 36 | #define __eigen_openma_sign_h 37 | 38 | template 39 | inline int sign(const T &val) 40 | { 41 | return (val > T(0)) - (val < T(0)); 42 | }; 43 | 44 | #endif // __eigen_openma_sign_h -------------------------------------------------------------------------------- /3rdparty/eigen3/Eigen_unsupported/src/FFT/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_FFT_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_FFT_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/unsupported/Eigen/src/FFT COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /3rdparty/eigen3/README.OPENMA: -------------------------------------------------------------------------------- 1 | 09.24.2013 (Arnaud Barré) 2 | ========================= 3 | To be able to add plugin file support to Eigen::VectorOp it was necessary to 4 | modify the original source code (Eigen/src/Core/VectorwiseOp.h). 5 | 6 | If the current code is replaced by an update of Eigen, the next lines must be 7 | added in the file VectorwiseOp.h (line 585) to be able to use extra vector 8 | operations in the folder Eigen_openma/Plugin/VectorOpAddons.h. 9 | 10 | // allow to extend VectorOp outside Eigen 11 | #ifdef EIGEN_VECTOROP_PLUGIN 12 | #include EIGEN_VECTOROP_PLUGIN 13 | #endif -------------------------------------------------------------------------------- /3rdparty/eigen3/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(EIGEN_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/3rdparty/eigen3") 2 | 3 | ADD_CXX_CATCH_DRIVER(eigen_comb combTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 4 | ADD_CXX_CATCH_DRIVER(eigen_cumtrapz cumtrapzTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 5 | ADD_CXX_CXXTEST_DRIVER(eigen_filter filterTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 6 | ADD_CXX_CXXTEST_DRIVER(eigen_filtfilt filtfiltTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 7 | ADD_CXX_CXXTEST_DRIVER(eigen_gammalb gammalnTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 8 | ADD_CXX_CXXTEST_DRIVER(eigen_iirfilterdesign iirFilterDesignTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 9 | ADD_CXX_CXXTEST_DRIVER(eigen_interp1 interp1Test.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 10 | ADD_CXX_CXXTEST_DRIVER(eigen_median medianTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 11 | ADD_CXX_CXXTEST_DRIVER(eigen_percentile percentileTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 12 | ADD_CXX_CXXTEST_DRIVER(eigen_sign signTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) 13 | ADD_CXX_CXXTEST_DRIVER(eigen_std stdTest.cpp INCLUDES ${EIGEN_INCLUDE_DIR}) -------------------------------------------------------------------------------- /3rdparty/eigen3/test/combTest.cpp: -------------------------------------------------------------------------------- 1 | #include "catch_and_extras.hpp" 2 | 3 | #include 4 | 5 | TEST_CASE("comb function", "[eigen][comb]") 6 | { 7 | SECTION("floats") 8 | { 9 | CHECK( comb(2.0f, 4.0f) == AROUND(0.0f, 1e-5) ); 10 | CHECK( comb(4.0f, 2.0f) == AROUND(6.0f, 1e-5) ); 11 | CHECK( comb(0.0f, 0.0f) == AROUND(1.0f, 1e-5) ); 12 | CHECK( comb(3.0f, 2.0f) == AROUND(2.9999999999999996f, 1e-5) ); 13 | CHECK( comb(3.5f, 2.45f) == AROUND(3.6167234401282293f, 1e-5) ); 14 | CHECK( comb(25.0f, 78.0f) == AROUND(0.0f, 1e-5) ); 15 | CHECK( comb(25.0f, 25.0f) == AROUND(1.0f, 1e-5) ); 16 | CHECK( comb(25.0f, 22.0f) == AROUND(2299.9999999999886f, 1e-1) ); // Less accurate ... 17 | CHECK( comb(25.4589653f, 22.4567891235f) == AROUND(2444.6161943794596f, 1e-1) ); // Less accurate ... 18 | } 19 | 20 | SECTION("doubles") 21 | { 22 | CHECK( comb(2.0, 4.0) == AROUND(0.0, 1e-15) ); 23 | CHECK( comb(4.0, 2.0) == AROUND(6.0, 5e-15) ); 24 | CHECK( comb(0.0, 0.0) == AROUND(1.0, 1e-15) ); 25 | CHECK( comb(3.0, 2.0) == AROUND(2.9999999999999996, 1e-13) ); 26 | CHECK( comb(3.5, 2.45) == AROUND(3.6167234401282293, 1e-13) ); 27 | CHECK( comb(25.0, 78.0) == AROUND(0.0, 1e-15) ); 28 | CHECK( comb(25.0, 25.0) == AROUND(1.0, 1e-15) ); 29 | CHECK( comb(25.0, 22.0) == AROUND(2299.9999999999886, 5e-11) ); // The difference is due to the method used in the computation of gammaln 30 | CHECK( comb(25.4589653, 22.4567891235) == AROUND(2444.6161943794596, 5e-11) ); // The difference is due to the method used in the computation of gammaln 31 | } 32 | 33 | SECTION("integers") 34 | { 35 | CHECK( comb(2, 4) == 0); 36 | CHECK( comb(4, 2) == 6); 37 | CHECK( comb(0, 0) == 1); 38 | CHECK( comb(25, 78) == 0); 39 | CHECK( comb(25, 25) == 1); 40 | CHECK( comb(25, 22) == 2300); 41 | } 42 | } -------------------------------------------------------------------------------- /3rdparty/eigen3/test/filterTest_def.h: -------------------------------------------------------------------------------- 1 | #ifndef filterTest_def_h 2 | #define filterTest_def_h 3 | 4 | void generateRawData(Eigen::Matrix& data) 5 | { 6 | data = Eigen::Matrix(81, 1); 7 | data << 0.269703731206477, 0.463280352306786, 0.930563768125370, 1.078946949549231, 1.194295283530987, 1.175770334809470, 1.335570597453283, 1.138179593691140, 0.591985025074901, 0.365663688246287, 8 | 0.193123934193130,-0.076769620993745,-0.470589666696020,-0.633470208144097,-0.791750441513157,-0.945077807755366,-0.569951832837199,-0.664999127882868,-0.252994289383051,-0.292482704101055, 9 | 0.169532235220944, 0.339272182430294, 0.713311203218805, 1.187410054950967, 1.292857898102664, 1.069412447168154, 1.165409951864472, 0.926972676760604, 0.948934113981400, 0.341571958093224, 10 | 0.314989959999267,-0.239253596594917,-0.299790071595336,-0.716214329883650,-0.868201523175111,-0.913547156190190,-0.560388298310784,-0.656277391823677,-0.333669693713655,-0.290391378754740, 11 | 0.092827351802466, 0.658953145958277, 0.771842271516818, 0.810242424037818, 1.137033026731125, 1.329628757264276, 1.299810744975812, 0.929446804806652, 0.682187335043924, 0.641648299466557, 12 | 0.175101042347375,-0.106182071823457,-0.513595421199354,-0.748417564782247,-0.588334265353110,-0.602900038579538,-0.795023940560176,-0.478292774132147,-0.206162179418395, 0.048519829365884, 13 | 0.336402502123166, 0.582330657355051, 0.656503756869407, 0.904037516602165, 1.124770579730638, 1.010024873900500, 1.058515153260482, 1.201080732412561, 0.712862233995693, 0.537717651352272, 14 | 0.244665286955628, 0.051598231788180, -0.429369284137859,-0.531910332049587,-0.869262186495577,-0.974858885406200,-0.702102159441466,-0.533809163655190,-0.469071199013479,-0.080392258002275, 15 | 0.126489024340900; 16 | }; 17 | 18 | #endif // filterTest_def_h -------------------------------------------------------------------------------- /3rdparty/eigen3/test/signTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(SignTest) 6 | { 7 | CXXTEST_TEST(positive) 8 | { 9 | TS_ASSERT_EQUALS(sign(1292) > 0, true); 10 | TS_ASSERT_EQUALS(sign(9999) > 0, true); 11 | TS_ASSERT_EQUALS(sign(1) > 0, true); 12 | }; 13 | 14 | CXXTEST_TEST(negative) 15 | { 16 | TS_ASSERT_EQUALS(sign(-11) < 0, true); 17 | TS_ASSERT_EQUALS(sign(-5000) < 0, true); 18 | TS_ASSERT_EQUALS(sign(-1) < 0, true); 19 | }; 20 | 21 | CXXTEST_TEST(null) 22 | { 23 | TS_ASSERT_EQUALS(sign(+0) == 0, true); 24 | TS_ASSERT_EQUALS(sign(-0) == 0, true); 25 | TS_ASSERT_EQUALS(sign(0) == 0, true); 26 | }; 27 | }; 28 | 29 | CXXTEST_SUITE_REGISTRATION(SignTest) 30 | CXXTEST_TEST_REGISTRATION(SignTest, positive) 31 | CXXTEST_TEST_REGISTRATION(SignTest, negative) 32 | CXXTEST_TEST_REGISTRATION(SignTest, null) 33 | -------------------------------------------------------------------------------- /3rdparty/eigen3/test/test_eigen_config.h: -------------------------------------------------------------------------------- 1 | // Addons for Eigen 2 | #ifdef EIGEN_CORE_H 3 | #error This header must be included before the inclusion of any Eigen headers to integrate the implemented Eigen plugins 4 | #endif 5 | // Need to be defined before the inclusion of the Eigen headers 6 | #define EIGEN_DENSEBASE_PLUGIN 7 | #define EIGEN_VECTOROP_PLUGIN 8 | #include 9 | #include 10 | #include -------------------------------------------------------------------------------- /3rdparty/pugixml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PUGIXML_SRCS 2 | src/pugixml.cpp 3 | ) 4 | 5 | # DUE TO THE USE OF THE LGPL LICENSE BY FFPMEG, THIS LIBRARY MUST BE COMPILED 6 | # EVERYTIME AS A SHARED LIBRARY 7 | ADD_LIBRARY(pugixml SHARED ${PUGIXML_SRCS}) 8 | 9 | TARGET_INCLUDE_DIRECTORIES(pugixml PUBLIC 10 | $ 11 | $ 12 | ) 13 | 14 | GENERATE_EXPORT_HEADER(pugixml 15 | EXPORT_MACRO_NAME PUGIXML_API 16 | EXPORT_FILE_NAME pugixml_export.h) 17 | 18 | INSTALL(TARGETS pugixml EXPORT OpenMATargets 19 | LIBRARY DESTINATION lib 20 | ARCHIVE DESTINATION lib 21 | RUNTIME DESTINATION bin 22 | INCLUDES DESTINATION include 23 | ) -------------------------------------------------------------------------------- /3rdparty/pugixml/README.OPENMA: -------------------------------------------------------------------------------- 1 | In case the library pugixml is updated, it is important to patch the file src/pugiconfig.hpp around the line 17 with the following code: 2 | 3 | #include "pugixml_export.h" 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | -------------------------------------------------------------------------------- /cmake/COPYING-CMAKE-SCRIPTS: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions 3 | are met: 4 | 5 | 1. Redistributions of source code must retain the copyright 6 | notice, this list of conditions and the following disclaimer. 7 | 2. Redistributions in binary form must reproduce the copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 3. The name of the author may not be used to endorse or promote products 11 | derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /cmake/FindNumPy.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find the Python module NumPy 2 | # 3 | # This module defines: 4 | # NUMPY_INCLUDE_DIR: include path for arrayobject.h 5 | 6 | # Copyright (c) 2009-2014 Arnaud Barré 7 | # Redistribution and use is allowed according to the terms of the BSD license. 8 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 9 | 10 | IF (NUMPY_INCLUDE_DIR) 11 | SET(NUMPY_FIND_QUIETLY TRUE) 12 | endif (NUMPY_INCLUDE_DIR) 13 | 14 | # To set the variables PYTHON_EXECUTABLE 15 | FIND_PACKAGE(PythonInterp REQUIRED) 16 | 17 | # Look for the include path 18 | # WARNING: The variable PYTHON_EXECUTABLE is defined by the script FindPythonInterp.cmake 19 | EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" -c "import numpy; print(numpy.get_include()); print(numpy.version.version)" 20 | OUTPUT_VARIABLE NUMPY_OUTPUT 21 | ERROR_VARIABLE NUMPY_ERROR) 22 | 23 | IF(NOT NUMPY_ERROR) 24 | STRING(REPLACE "\n" ";" NUMPY_OUTPUT ${NUMPY_OUTPUT}) 25 | LIST(GET NUMPY_OUTPUT 0 NUMPY_INCLUDE_DIR) 26 | LIST(GET NUMPY_OUTPUT 1 NUMPY_VERSION) 27 | ENDIF(NOT NUMPY_ERROR) 28 | 29 | INCLUDE(FindPackageHandleStandardArgs) 30 | 31 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(NumPy DEFAULT_MSG NUMPY_VERSION NUMPY_INCLUDE_DIR) 32 | 33 | MARK_AS_ADVANCED(NUMPY_INCLUDE_DIR) 34 | -------------------------------------------------------------------------------- /cmake/OpenMACoverallsCustomTarget.cmake: -------------------------------------------------------------------------------- 1 | IF(WITH_COVERALLS_ENABLED) 2 | IF (NOT BUILD_UNIT_TESTS OR NOT CMAKE_BUILD_TYPE STREQUAL "Debug") 3 | MESSAGE(FATAL_ERROR "Coveralls can be only be activated if the code is compiled in debug mode with unit tests enabled.") 4 | ENDIF() 5 | # Adapt the CXX flags 6 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") 7 | # Create a custom target which generate the files required by Coveralls 8 | SET(COVERALLS_FILE "${PROJECT_BINARY_DIR}/coveralls.json") 9 | ADD_CUSTOM_TARGET(coveralls 10 | # Generate the output 11 | COMMAND ${CMAKE_COMMAND} 12 | -DCOVERAGE_SRC_PATH="${PROJECT_SOURCE_DIR}/modules" 13 | -DCOVERAGE_SRC_EXCLUDED=".*_p.h::.*test.*::.*bindings.*::.*plugins.*" 14 | -DCOVERAGE_BIN_EXCLUDED=".*3rdparty.*" 15 | -DCOVERALLS_OUTPUT_FILE="${COVERALLS_FILE}" 16 | -DCOV_PATH="${PROJECT_BINARY_DIR}" 17 | -DPROJECT_ROOT="${PROJECT_SOURCE_DIR}" 18 | -P "${CMAKE_MODULE_PATH}/CoverallsGenerateGcov.cmake" 19 | # Upload the result 20 | COMMAND curl -S -F json_file=@${COVERALLS_FILE} https://coveralls.io/api/v1/jobs && echo 21 | COMMENT "Generating and uploading coveralls output...") 22 | ELSE() 23 | ADD_CUSTOM_TARGET(coveralls COMMAND echo "Nothing to do.") 24 | ENDIF() -------------------------------------------------------------------------------- /cmake/OpenMACoverityCustomTarget.cmake: -------------------------------------------------------------------------------- 1 | IF(WITH_COVERITY_ENABLED) 2 | ADD_CUSTOM_TARGET(coverity COMMAND "${CMAKE_COMMAND}" --build .) 3 | ELSE() 4 | ADD_CUSTOM_TARGET(coverity COMMAND echo "Nothing to do.") 5 | ENDIF() -------------------------------------------------------------------------------- /cmake/templates/MatlabTestDriver.m.in: -------------------------------------------------------------------------------- 1 | function out = test_@_TEST_NAME@() 2 | 3 | out = 0; 4 | if (verLessThan('matlab','8,1')) 5 | warning('OpenMAUnitTest:MatlabVersionTooOld','At least Matlab 8.1 (R2013a) is required to use the matlab.unittest framework.'); 6 | return; 7 | end 8 | 9 | import matlab.unittest.TestSuite; 10 | 11 | test_include_paths = {@_TEST_INCLUDE_PATHS@}; 12 | for i = 1:length(test_include_paths) 13 | addpath(test_include_paths{i}); 14 | end 15 | 16 | test_file_paths = {@_TEST_SOURCE_FILES@}; 17 | for i = 1:length(test_file_paths) 18 | suiteFile = TestSuite.fromFile(test_file_paths{i}); 19 | result = run(suiteFile); 20 | for j = 1:length(result) 21 | out = out + result(j).Failed + result(j).Incomplete; 22 | end 23 | end 24 | 25 | end -------------------------------------------------------------------------------- /cmake/templates/OpenMAConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # - Config file for the OpenMA package 2 | # It defines the following variables 3 | # OPENMA_INCLUDE_DIRS - include directories for OpenMA 4 | # OPENMA_LIBRARIES - libraries to link against 5 | 6 | @PACKAGE_INIT@ 7 | 8 | SET_AND_CHECK(OPENMA_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@") 9 | 10 | # # Compute paths 11 | # get_filename_component(OPENMA_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) 12 | # set(OPENMA_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") 13 | # 14 | # # Our library dependencies (contains definitions for IMPORTED targets) 15 | # if(NOT TARGET foo AND NOT OPENMA_BINARY_DIR) 16 | # include("${OPENMA_CMAKE_DIR}/OpenMATargets.cmake") 17 | # endif() 18 | 19 | include("${CMAKE_CURRENT_LIST_DIR}/OpenMATargets.cmake") -------------------------------------------------------------------------------- /cmake/templates/PythonTestDriver.py.in: -------------------------------------------------------------------------------- 1 | import sys 2 | import importlib 3 | import unittest 4 | 5 | for include_path in [@_TEST_INCLUDE_PATHS@]: 6 | sys.path.append(include_path); 7 | 8 | if __name__ == '__main__': 9 | out = True 10 | for source in [@_TEST_SOURCE_NAMES@]: 11 | module = importlib.import_module(source) 12 | for name in dir(module): 13 | attribute = getattr(module, name) 14 | if name.endswith('Test') and callable(attribute): 15 | suite = unittest.TestLoader().loadTestsFromTestCase(attribute) 16 | result = unittest.TextTestRunner().run(suite) 17 | out &= result.wasSuccessful() 18 | if out: 19 | sys.exit(0) 20 | else: 21 | sys.exit(1) -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Build API documentation option 2 | OPTION(BUILD_DOCUMENTATION "Build project documentation" OFF) 3 | IF(BUILD_DOCUMENTATION) 4 | ADD_SUBDIRECTORY(doxygen) 5 | ENDIF() -------------------------------------------------------------------------------- /doc/doxygen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(DOXYGEN_SKIP_DOT TRUE) 2 | FIND_PACKAGE(Doxygen REQUIRED) 3 | FIND_PACKAGE(PythonInterp QUIET) 4 | 5 | CONFIGURE_FILE( 6 | ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile_C++.in 7 | ${CMAKE_CURRENT_BINARY_DIR}/doxyfile_C++) 8 | 9 | ADD_CUSTOM_TARGET(doxygen_cpp 10 | COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/doc/_doxygen 11 | COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxyfile_C++ > doxy-coverage.detail.txt 2>&1 12 | WORKING_DIRECTORY ${PROJECT_BINARY_DIR} 13 | COMMENT "Generate C++ Doxygen XML output..." 14 | ) 15 | 16 | IF(PYTHONINTERP_FOUND) 17 | ADD_CUSTOM_COMMAND(TARGET doxygen_cpp POST_BUILD 18 | COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/doc/doxygen/doxy-coverage.py --badge --noerror ${PROJECT_BINARY_DIR}/doc/_doxygen/xml > doxy-coverage.resume.txt 19 | WORKING_DIRECTORY ${PROJECT_BINARY_DIR} 20 | ) 21 | ENDIF() -------------------------------------------------------------------------------- /modules/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB MODULES_PATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*") 2 | FOREACH(_module_path ${MODULES_PATHS}) 3 | IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_module_path}) 4 | FIND_FILE(CMAKELISTS_FOUND "CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}/${_module_path}" NO_DEFAULT_PATH) 5 | IF (CMAKELISTS_FOUND) 6 | ADD_SUBDIRECTORY(${_module_path}) 7 | ENDIF() 8 | ENDIF() 9 | UNSET(CMAKELISTS_FOUND CACHE) 10 | ENDFOREACH() -------------------------------------------------------------------------------- /modules/base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_BASE_SRCS 2 | src/any.cpp 3 | src/date.cpp 4 | src/event.cpp 5 | src/hardware.cpp 6 | src/logger.cpp 7 | src/node.cpp 8 | src/object.cpp 9 | src/subject.cpp 10 | src/timesequence.cpp 11 | src/trial.cpp 12 | src/typeid.cpp 13 | src/utils.cpp 14 | ) 15 | 16 | ADD_LIBRARY(base ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_BASE_SRCS}) 17 | TARGET_INCLUDE_DIRECTORIES(base PUBLIC 18 | $ 19 | $ 20 | $ 21 | $ 22 | ) 23 | GENERATE_EXPORT_HEADER(base 24 | BASE_NAME OPENMA_BASE 25 | EXPORT_FILE_NAME include/openma/base_export.h) 26 | 27 | SET_TARGET_PROPERTIES(base PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 28 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 29 | SET_TARGET_PROPERTIES(base PROPERTIES COMPILE_FLAGS -DOPENMA_BASE_STATIC_DEFINE) 30 | ENDIF() 31 | 32 | IF(BUILD_LANGUAGE_BINDINGS) 33 | ADD_SUBDIRECTORY(swig) 34 | ENDIF() 35 | 36 | IF(BUILD_UNIT_TESTS) 37 | ADD_SUBDIRECTORY(test) 38 | ENDIF() 39 | 40 | INSTALL(TARGETS base EXPORT OpenMATargets 41 | LIBRARY DESTINATION lib 42 | ARCHIVE DESTINATION lib 43 | RUNTIME DESTINATION bin 44 | ) 45 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 46 | DESTINATION . 47 | PATTERN "_p.h" EXCLUDE 48 | ) -------------------------------------------------------------------------------- /modules/base/doc/base.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_base ma::base 3 | * @brief Base of the project with common classes and utilities 4 | * 5 | * This module corresponds to the library @c openma_base. It does not use a nested namespace. As a consequence all the types proposed in this module use only the @c ma:: namespace. For example: 6 | * 7 | * @code{.unparsed} 8 | * ma::Any a(6); 9 | * auto b = ma::Any("b"); 10 | * auto root = ma::Node("root"); 11 | * @endcode 12 | */ -------------------------------------------------------------------------------- /modules/base/include/openma/base/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef __openma_base_utils_h 36 | #define __openma_base_utils_h 37 | 38 | #include 39 | 40 | bool _ma_strcmpi(unsigned char a, unsigned char b); 41 | 42 | namespace ma 43 | { 44 | inline bool strcmpi(const std::string& a, const std::string& b) 45 | { 46 | return (a.length() == b.length()) && std::equal(b.begin(), b.end(), a.begin(), _ma_strcmpi); 47 | } 48 | }; 49 | 50 | #endif -------------------------------------------------------------------------------- /modules/base/src/utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #include "openma/base/utils.h" 36 | 37 | #include // std::tolower 38 | 39 | bool _ma_strcmpi(unsigned char a, unsigned char b) 40 | { 41 | return std::tolower(a) == std::tolower(b); 42 | } -------------------------------------------------------------------------------- /modules/base/swig/base/logger.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | namespace ma 36 | { 37 | %nodefaultctor; 38 | class Logger 39 | { 40 | public: 41 | static void mute(bool active); 42 | }; 43 | %clearnodefaultctor; 44 | }; 45 | -------------------------------------------------------------------------------- /modules/base/swig/base/object.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | namespace ma 36 | { 37 | %nodefaultctor; 38 | class Object 39 | { 40 | public: 41 | ~Object(); 42 | unsigned long timestamp() const; 43 | void modified(); 44 | protected: 45 | void setTimestamp(unsigned long ts); 46 | }; 47 | %clearnodefaultctor; 48 | }; -------------------------------------------------------------------------------- /modules/base/swig/base/subject.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | namespace ma 36 | { 37 | SWIG_TYPEMAP_NODE_OUT(ma, Subject) 38 | SWIG_CREATE_TEMPLATE_HELPER_1(ma, Subject, SWIGTYPE) 39 | 40 | %nodefaultctor; 41 | class Subject : public Node 42 | { 43 | public: 44 | Subject(const std::string& name, std::unordered_map&& properties = std::unordered_map(), Node* parent = nullptr); 45 | ~Subject(); 46 | }; 47 | %clearnodefaultctor; 48 | }; 49 | -------------------------------------------------------------------------------- /modules/base/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | IF(BUILD_MATLAB_BINDINGS) 4 | ADD_SUBDIRECTORY("matlab") 5 | ENDIF() 6 | 7 | IF(BUILD_PYTHON_BINDINGS) 8 | ADD_SUBDIRECTORY("python") 9 | ENDIF() -------------------------------------------------------------------------------- /modules/base/test/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_CXX_CXXTEST_DRIVER(openma_base_any anyTest.cpp base) 2 | ADD_CXX_CXXTEST_DRIVER(openma_base_date dateTest.cpp base) 3 | ADD_CXX_CXXTEST_DRIVER(openma_base_event eventTest.cpp base) 4 | ADD_CXX_CXXTEST_DRIVER(openma_base_logger loggerTest.cpp base) 5 | ADD_CXX_CXXTEST_DRIVER(openma_base_node nodeTest.cpp base) 6 | ADD_CXX_CXXTEST_DRIVER(openma_base_object objectTest.cpp base) 7 | ADD_CXX_CXXTEST_DRIVER(openma_base_subject subjectTest.cpp base) 8 | ADD_CXX_CXXTEST_DRIVER(openma_base_timesequence timesequenceTest.cpp base) 9 | ADD_CXX_CXXTEST_DRIVER(openma_base_trial trialTest.cpp base) -------------------------------------------------------------------------------- /modules/base/test/c++/anyTest_def.h: -------------------------------------------------------------------------------- 1 | #ifndef anyTest_def_h 2 | #define anyTest_def_h 3 | 4 | #include 5 | 6 | #include 7 | 8 | struct Date 9 | { 10 | int Year, Month, Day; 11 | friend bool operator==(const Date& lhs,const Date& rhs) {return ((lhs.Year == rhs.Year) && (lhs.Month == rhs.Month) && (lhs.Day == rhs.Day));}; 12 | }; 13 | 14 | struct Foo 15 | { 16 | int Bar1, Bar2; 17 | friend bool operator==(const Foo& lhs,const Foo& rhs) {return ((lhs.Bar1 == rhs.Bar1) && (lhs.Bar2 == rhs.Bar2));}; 18 | }; 19 | 20 | // THE SPECIALIZATION MUST BE WRAPPED IN THE NAMESPACE. THE LATER CANNOT BE PASSED DIRECTLY IN THE FUNCTION DEFINITION 21 | namespace ma 22 | { 23 | template<> 24 | struct Any::Helper 25 | { 26 | static inline Date convert(const std::string& ) {return Date{2009,05,02};}; 27 | }; 28 | 29 | template<> 30 | struct ma::Any::Helper 31 | { 32 | static inline std::string convert(const Date& val) {return std::to_string(val.Year) + "-" + std::to_string(val.Month) + "-" + std::to_string(val.Day);}; 33 | }; 34 | }; 35 | 36 | #endif // anyTest_classdef_h -------------------------------------------------------------------------------- /modules/base/test/c++/dateTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(DateTest) 6 | { 7 | CXXTEST_TEST(accessors) 8 | { 9 | auto d = ma::Date(2016,02,27); 10 | TS_ASSERT_EQUALS(d.year(),2016u); 11 | TS_ASSERT_EQUALS(d.month(),02u); 12 | TS_ASSERT_EQUALS(d.day(),27u); 13 | }; 14 | 15 | CXXTEST_TEST(mutators) 16 | { 17 | auto d = ma::Date(2016,02,27); 18 | d.setDay(01); 19 | d.setMonth(05); 20 | d.setYear(2009); 21 | TS_ASSERT_EQUALS(d.day(),01u); 22 | TS_ASSERT_EQUALS(d.month(),05u); 23 | TS_ASSERT_EQUALS(d.year(),2009u); 24 | }; 25 | 26 | CXXTEST_TEST(equality) 27 | { 28 | auto d1 = ma::Date(2016,02,27); 29 | auto d2 = ma::Date(2016,02,27); 30 | auto d3 = ma::Date(); 31 | TS_ASSERT_EQUALS(d1 == d2, true); 32 | TS_ASSERT_EQUALS(d1, d2); 33 | TS_ASSERT_EQUALS(d1 != d3, true); 34 | TS_ASSERT_DIFFERS(d1, d3); 35 | } 36 | }; 37 | 38 | CXXTEST_SUITE_REGISTRATION(DateTest) 39 | CXXTEST_TEST_REGISTRATION(DateTest, accessors) 40 | CXXTEST_TEST_REGISTRATION(DateTest, mutators) 41 | CXXTEST_TEST_REGISTRATION(DateTest, equality) -------------------------------------------------------------------------------- /modules/base/test/c++/loggerTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "loggerTest_def.h" 4 | 5 | CXXTEST_SUITE(LoggerTest) 6 | { 7 | CXXTEST_TEST(variadicArguments) 8 | { 9 | Verifier* verifier = new Verifier; 10 | ma::Logger::setDevice(verifier); // deleted by the logger 11 | 12 | verifier->ref = "foo"; 13 | ma::info("foo"); 14 | ma::warning("foo"); 15 | ma::error("foo"); 16 | 17 | verifier->ref = "I have an integer 12345 included."; 18 | ma::info("I have an integer %i included.",12345); 19 | ma::warning("I have an integer %i included.",12345); 20 | ma::error("I have an integer %i included.",12345); 21 | 22 | verifier->ref = "tiny at the beginning but huge after the variadic expansion. 1.54"; 23 | ma::info("tiny %s. %0.2f","at the beginning but huge after the variadic expansion",1.54f); 24 | ma::warning("tiny %s. %0.2f","at the beginning but huge after the variadic expansion",1.54f); 25 | ma::error("tiny %s. %0.2f","at the beginning but huge after the variadic expansion",1.54f); 26 | 27 | ma::Logger::setDevice(nullptr); // Reset the device 28 | }; 29 | }; 30 | 31 | CXXTEST_SUITE_REGISTRATION(LoggerTest) 32 | CXXTEST_TEST_REGISTRATION(LoggerTest, variadicArguments) -------------------------------------------------------------------------------- /modules/base/test/c++/loggerTest_def.h: -------------------------------------------------------------------------------- 1 | #ifndef loggerTest_def_h 2 | #define loggerTest_def_h 3 | 4 | #include 5 | 6 | #include // strcmp 7 | 8 | struct Verifier : ma::Logger::Device 9 | { 10 | Verifier() : ma::Logger::Device(), ref(nullptr) {}; 11 | ~Verifier() = default; 12 | 13 | virtual void write(ma::Message , const char* msg) _OPENMA_NOEXCEPT 14 | { 15 | TSM_ASSERT_EQUALS(msg,strcmp(msg,this->ref),0); 16 | }; 17 | 18 | const char* ref; 19 | }; 20 | 21 | #endif // loggerTest_def_h -------------------------------------------------------------------------------- /modules/base/test/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(TOOLBOX_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/matlab/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(MTD_DIRS ${TOOLBOX_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_MATLAB_UNITTEST_DRIVER(matlab_base_any AnyTest.m INCLUDES ${MTD_DIRS}) 6 | ADD_MATLAB_UNITTEST_DRIVER(matlab_base_event EventTest.m INCLUDES ${MTD_DIRS}) 7 | ADD_MATLAB_UNITTEST_DRIVER(matlab_base_node NodeTest.m INCLUDES ${MTD_DIRS}) 8 | ADD_MATLAB_UNITTEST_DRIVER(matlab_base_timesequence TimeSequenceTest.m INCLUDES ${MTD_DIRS}) 9 | ADD_MATLAB_UNITTEST_DRIVER(matlab_base_trial TrialTest.m INCLUDES ${MTD_DIRS}) -------------------------------------------------------------------------------- /modules/base/test/matlab/TimeSequenceTest.m: -------------------------------------------------------------------------------- 1 | classdef TimeSequenceTest < matlab.unittest.TestCase 2 | methods (Test) 3 | 4 | function constructorWithTwoDims(testCase) 5 | a = ma.TimeSequence('ba',[3,3],10,200,0.0,-1,'foo'); 6 | testCase.verifyEqual(a.elements(), 90); 7 | a = ma.TimeSequence('ba',single([3,3]),10,200,0.0,-1,'foo'); 8 | testCase.verifyEqual(a.elements(), 90); 9 | a = ma.TimeSequence('ba',int16([3,3]),10,200,0.0,-1,'foo'); 10 | testCase.verifyEqual(a.elements(), 90); 11 | testCase.verifyError(@()ma.TimeSequence('ba',[3.4,3.1],10,200,0.0,-1,'foo'), 'SWIG:ValueError'); 12 | end 13 | 14 | function range(testCase) 15 | a = ma.TimeSequence('ba',4,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 16 | testCase.verifyEqual(a.range(), [-Inf Inf]); 17 | a.setRange([-10,10]); 18 | testCase.verifyEqual(a.range(), [-10 10]); 19 | end 20 | 21 | function data(testCase) 22 | a = ma.TimeSequence('ba',4,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 23 | temp = rand(10,4); 24 | a.setData(temp); 25 | testCase.verifyEqual(a.data(), temp); 26 | end 27 | 28 | end 29 | end -------------------------------------------------------------------------------- /modules/base/test/matlab/TrialTest.m: -------------------------------------------------------------------------------- 1 | classdef TrialTest < matlab.unittest.TestCase 2 | methods (Test) 3 | 4 | function events(testCase) 5 | t = ma.Trial('trial'); 6 | evts = t.events(); 7 | testCase.verifyEqual(t.hasChildren(), true); 8 | testCase.verifyEqual(evts.hasParents(), true); 9 | testCase.verifyEqual(t.name(), 'trial'); 10 | testCase.verifyEqual(evts.name(), 'Events'); 11 | testCase.verifyEqual(double(t.refcount()), 1); 12 | testCase.verifyEqual(double(evts.refcount()), 2); 13 | delete(t); 14 | testCase.verifyEqual(evts.hasParents(), false); 15 | testCase.verifyEqual(double(evts.refcount()), 1); 16 | end 17 | 18 | function timesequences(testCase) 19 | t = ma.Trial('trial'); 20 | tss = t.timeSequences(); 21 | testCase.verifyEqual(t.hasChildren(), true); 22 | testCase.verifyEqual(tss.hasParents(), true); 23 | testCase.verifyEqual(t.name(), 'trial'); 24 | testCase.verifyEqual(tss.name(), 'TimeSequences'); 25 | testCase.verifyEqual(double(t.refcount()), 1); 26 | testCase.verifyEqual(double(tss.refcount()), 2); 27 | delete(t); 28 | testCase.verifyEqual(tss.hasParents(), false); 29 | testCase.verifyEqual(double(tss.refcount()), 1); 30 | end 31 | 32 | function hardwares(testCase) 33 | t = ma.Trial('trial'); 34 | hws = t.hardwares(); 35 | testCase.verifyEqual(t.hasChildren(), true); 36 | testCase.verifyEqual(hws.hasParents(), true); 37 | testCase.verifyEqual(t.name(), 'trial'); 38 | testCase.verifyEqual(hws.name(), 'Hardwares'); 39 | testCase.verifyEqual(double(t.refcount()), 1); 40 | testCase.verifyEqual(double(hws.refcount()), 2); 41 | delete(t); 42 | testCase.verifyEqual(hws.hasParents(), false); 43 | testCase.verifyEqual(double(hws.refcount()), 1); 44 | end 45 | 46 | end 47 | end -------------------------------------------------------------------------------- /modules/base/test/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/python/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(PTD_DIRS ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_PYTHON_UNITTEST_DRIVER(python_base_any anyTest INCLUDES ${PTD_DIRS}) 6 | ADD_PYTHON_UNITTEST_DRIVER(python_base_event eventTest INCLUDES ${PTD_DIRS}) 7 | ADD_PYTHON_UNITTEST_DRIVER(python_base_node nodeTest INCLUDES ${PTD_DIRS}) 8 | ADD_PYTHON_UNITTEST_DRIVER(python_base_timesequence timeSequenceTest INCLUDES ${PTD_DIRS}) 9 | ADD_PYTHON_UNITTEST_DRIVER(python_base_trial trialTest INCLUDES ${PTD_DIRS}) -------------------------------------------------------------------------------- /modules/base/test/python/timeSequenceTest.py: -------------------------------------------------------------------------------- 1 | import ma 2 | import numpy as np 3 | import unittest 4 | 5 | class TimeSequenceTest(unittest.TestCase): 6 | 7 | def test_constructor_with_one_dim(self): 8 | a = ma.TimeSequence('ba',1,10,200,0.0,-1,'foo'); 9 | self.assertEqual(a.elements(), 10); 10 | 11 | def test_constructor_with_two_dims(self): 12 | a = ma.TimeSequence('ba',[3,3],10,200,0.0,-1,'foo'); 13 | self.assertEqual(a.elements(), 90); 14 | a = ma.TimeSequence('ba',[int(3),int(3)],10,200,0.0,-1,'foo'); 15 | self.assertEqual(a.elements(), 90); 16 | self.assertRaises(ValueError, ma.TimeSequence, 'ba',[3.4,3.1],10,200,0.0,-1,'foo') 17 | 18 | def test_range(self): 19 | a = ma.TimeSequence('ba',4,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 20 | self.assertEqual(a.range(), [-np.inf, np.inf]); 21 | a.setRange([-10,10]); 22 | self.assertEqual(a.range(), [-10, 10]); 23 | 24 | def test_data(self): 25 | a = ma.TimeSequence('ba',1,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 26 | temp = np.random.rand(10,1); 27 | a.setData(temp); 28 | self.assertEqual(np.allclose(a.data(), temp), True) 29 | 30 | def test_data_bis(self): 31 | a = ma.TimeSequence('ba',4,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 32 | temp = np.random.rand(10,4); 33 | a.setData(temp); 34 | self.assertEqual(np.allclose(a.data(), temp), True) 35 | 36 | def test_data_wrong_dims(self): 37 | a = ma.TimeSequence('ba',4,10,200,0.0,ma.TimeSequence.Type_Position,'mm'); 38 | self.assertRaises(ValueError, a.setData, np.random.rand(2,2)) -------------------------------------------------------------------------------- /modules/base/test/python/trialTest.py: -------------------------------------------------------------------------------- 1 | import ma 2 | import unittest 3 | 4 | class TrialTest(unittest.TestCase): 5 | 6 | def test_events(self): 7 | t = ma.Trial('trial') 8 | evts = t.events() 9 | self.assertEqual(t.hasChildren(), True) 10 | self.assertEqual(evts.hasParents(), True) 11 | self.assertEqual(t.name(), 'trial') 12 | self.assertEqual(evts.name(), 'Events') 13 | self.assertEqual(t.refcount(), 1) 14 | self.assertEqual(evts.refcount(), 2) 15 | del t 16 | self.assertEqual(evts.hasParents(), False) 17 | self.assertEqual(evts.refcount(), 1) 18 | 19 | def test_timesequences(self): 20 | t = ma.Trial('trial') 21 | tss = t.timeSequences() 22 | self.assertEqual(t.hasChildren(), True) 23 | self.assertEqual(tss.hasParents(), True) 24 | self.assertEqual(t.name(), 'trial') 25 | self.assertEqual(tss.name(), 'TimeSequences') 26 | self.assertEqual(t.refcount(), 1) 27 | self.assertEqual(tss.refcount(), 2) 28 | del t 29 | self.assertEqual(tss.hasParents(), False) 30 | self.assertEqual(tss.refcount(), 1) 31 | 32 | def test_hardwares(self): 33 | t = ma.Trial('trial') 34 | hws = t.hardwares() 35 | self.assertEqual(t.hasChildren(), True) 36 | self.assertEqual(hws.hasParents(), True) 37 | self.assertEqual(t.name(), 'trial') 38 | self.assertEqual(hws.name(), 'Hardwares') 39 | self.assertEqual(t.refcount(), 1) 40 | self.assertEqual(hws.refcount(), 2) 41 | del t 42 | self.assertEqual(hws.hasParents(), False) 43 | self.assertEqual(hws.refcount(), 1) 44 | -------------------------------------------------------------------------------- /modules/bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | IF(BUILD_LANGUAGE_BINDINGS) 2 | 3 | SET(OPENMA_BINDINGS_SRCS 4 | src/loggerdevice.cpp 5 | src/referencecounting.cpp 6 | ) 7 | 8 | ADD_LIBRARY(bindings ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_BINDINGS_SRCS}) 9 | TARGET_LINK_LIBRARIES(bindings base) 10 | TARGET_INCLUDE_DIRECTORIES(bindings PUBLIC 11 | $ 12 | $ 13 | $ 14 | ) 15 | GENERATE_EXPORT_HEADER(bindings 16 | BASE_NAME OPENMA_BINDINGS 17 | EXPORT_FILE_NAME include/openma/bindings_export.h) 18 | 19 | SET_TARGET_PROPERTIES(bindings PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 20 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 21 | SET_TARGET_PROPERTIES(bindings PROPERTIES COMPILE_FLAGS -DOPENMA_BINDINGS_STATIC_DEFINE) 22 | ENDIF() 23 | 24 | INSTALL(TARGETS bindings EXPORT OpenMATargets 25 | LIBRARY DESTINATION lib 26 | ARCHIVE DESTINATION lib 27 | RUNTIME DESTINATION bin 28 | ) 29 | 30 | ENDIF() -------------------------------------------------------------------------------- /modules/bindings/include/openma/bindings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef __openma_bindings_h 36 | #define __openma_bindings_h 37 | 38 | #include "openma/bindings_export.h" 39 | #include "openma/base/node.h" 40 | 41 | OPENMA_BINDINGS_EXPORT void _ma_refcount_incr(ma::Node* node); 42 | OPENMA_BINDINGS_EXPORT void _ma_refcount_decr(ma::Node* node); 43 | 44 | #include "openma/bindings/templatehelper.h" 45 | #include "openma/bindings/loggerdevice.h" 46 | 47 | #endif // __openma_bindings_h -------------------------------------------------------------------------------- /modules/bindings/include/openma/matlab/fixwinchar16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef __openma_bindings_fixwinmatlabchar16_h 36 | #define __openma_bindings_fixwinmatlabchar16_h 37 | 38 | #if defined(_SWIG_MATLAB) && defined(_MSC_VER) 39 | // Workaround for the char16_t type defined in Matlab and MSVC 2010 40 | #include 41 | #if (_MSC_VER >= 1600) 42 | #define __STDC_UTF_16__ 43 | #endif 44 | #endif 45 | 46 | #endif // __openma_bindings_fixwinmatlabchar16_h -------------------------------------------------------------------------------- /modules/bindings/include/openma/matlab/mexFunction.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | mexFunction -------------------------------------------------------------------------------- /modules/bindings/src/referencecounting.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #include "openma/bindings.h" 36 | 37 | void _ma_refcount_incr(ma::Node* node) 38 | { 39 | node->refcount() += 1; 40 | }; 41 | 42 | void _ma_refcount_decr(ma::Node* node) 43 | { 44 | node->refcount() -= 1; 45 | if (node->refcount() < 1) 46 | delete node; 47 | }; -------------------------------------------------------------------------------- /modules/body/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_BODY_SRCS 2 | src/_body.cpp 3 | src/anchor.cpp 4 | src/chain.cpp 5 | src/dempstertable.cpp 6 | src/descriptor.cpp 7 | src/dumasmcconvilleyoungtable.cpp 8 | src/dynamicdescriptor.cpp 9 | src/eulerdescriptor.cpp 10 | src/externalwrenchassigner.cpp 11 | src/inertialparameters.cpp 12 | src/inertialparametersestimator.cpp 13 | src/lyonwholebodymodel.cpp 14 | src/inversedynamicsmatrix.cpp 15 | src/inversedynamicsprocessor.cpp 16 | src/joint.cpp 17 | src/landmarksregistrar.cpp 18 | src/landmarkstranslator.cpp 19 | src/model.cpp 20 | src/plugingait.cpp 21 | src/point.cpp 22 | src/poseestimator.cpp 23 | src/referenceframe.cpp 24 | src/segment.cpp 25 | src/simplegaitforceplatetofeetassigner.cpp 26 | src/skeletonhelper.cpp 27 | src/skeletonhelperposeestimator.cpp 28 | src/unitquaternionposeestimator.cpp 29 | src/utils.cpp 30 | ) 31 | 32 | ADD_LIBRARY(body ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_BODY_SRCS}) 33 | TARGET_LINK_LIBRARIES(body base instrument math) 34 | TARGET_INCLUDE_DIRECTORIES(body PUBLIC 35 | $ 36 | $ 37 | $ 38 | ) 39 | GENERATE_EXPORT_HEADER(body 40 | BASE_NAME OPENMA_BODY 41 | EXPORT_FILE_NAME include/openma/body_export.h) 42 | 43 | SET_TARGET_PROPERTIES(body PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 44 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 45 | SET_TARGET_PROPERTIES(body PROPERTIES COMPILE_FLAGS -DOPENMA_BODY_STATIC_DEFINE) 46 | ENDIF() 47 | SET_TARGET_PROPERTIES(body PROPERTIES COMPILE_DEFINITIONS "_USE_MATH_DEFINES") 48 | 49 | IF(BUILD_LANGUAGE_BINDINGS) 50 | ADD_SUBDIRECTORY(swig) 51 | ENDIF() 52 | 53 | IF(BUILD_UNIT_TESTS) 54 | ADD_SUBDIRECTORY(test) 55 | ENDIF() 56 | 57 | INSTALL(TARGETS body EXPORT OpenMATargets 58 | LIBRARY DESTINATION lib 59 | ARCHIVE DESTINATION lib 60 | RUNTIME DESTINATION bin 61 | ) 62 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 63 | DESTINATION . 64 | PATTERN "_p.h" EXCLUDE 65 | ) -------------------------------------------------------------------------------- /modules/body/doc/body.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_body ma::body 3 | * @brief Classes for the development of (bio)mechanical model. 4 | * 5 | * This module corresponds to the library @c openma_body. It uses the nested namespace @c body. As a consequence all the types proposed in this module use the @c ma::body namespace. 6 | * 7 | * The main goal of this module is to compute joint kinematics and joint kinetics. 8 | * 9 | * @todo Details the goal and usage of ma::body. 10 | */ -------------------------------------------------------------------------------- /modules/body/swig/body_matlab.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/matlab.swg" -------------------------------------------------------------------------------- /modules/body/swig/body_python.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/python.swg" -------------------------------------------------------------------------------- /modules/body/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | IF(BUILD_MATLAB_BINDINGS) 4 | ADD_SUBDIRECTORY("matlab") 5 | ENDIF() 6 | 7 | IF(BUILD_PYTHON_BINDINGS) 8 | ADD_SUBDIRECTORY("python") 9 | ENDIF() -------------------------------------------------------------------------------- /modules/body/test/c++/anchorTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | CXXTEST_SUITE(AnchorTest) 9 | { 10 | CXXTEST_TEST(point) 11 | { 12 | TS_WARN("TODO"); 13 | } 14 | 15 | CXXTEST_TEST(origin1) 16 | { 17 | TS_WARN("TODO"); 18 | } 19 | 20 | CXXTEST_TEST(origin2) 21 | { 22 | TS_WARN("TODO"); 23 | } 24 | 25 | CXXTEST_TEST(clone) 26 | { 27 | TS_WARN("Implement the method ma::body::Anchor::clone()"); 28 | }; 29 | 30 | CXXTEST_TEST(copy) 31 | { 32 | TS_WARN("Implement the method ma::body::Anchor::copy()"); 33 | }; 34 | }; 35 | 36 | CXXTEST_SUITE_REGISTRATION(AnchorTest) 37 | CXXTEST_TEST_REGISTRATION(AnchorTest, point) 38 | CXXTEST_TEST_REGISTRATION(AnchorTest, origin1) 39 | CXXTEST_TEST_REGISTRATION(AnchorTest, origin2) 40 | CXXTEST_TEST_REGISTRATION(AnchorTest, clone) 41 | CXXTEST_TEST_REGISTRATION(AnchorTest, copy) 42 | -------------------------------------------------------------------------------- /modules/body/test/c++/chainTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | CXXTEST_SUITE(AnchorTest) 8 | { 9 | CXXTEST_TEST(constructor) 10 | { 11 | TS_WARN("TODO"); 12 | } 13 | 14 | CXXTEST_TEST(setDefinition) 15 | { 16 | TS_WARN("Implement the method ma::body::Chain::setDefinition()"); 17 | } 18 | 19 | CXXTEST_TEST(clone) 20 | { 21 | TS_WARN("Implement the method ma::body::Chain::clone()"); 22 | }; 23 | 24 | CXXTEST_TEST(copy) 25 | { 26 | TS_WARN("Implement the method ma::body::Chain::copy()"); 27 | }; 28 | }; 29 | 30 | CXXTEST_SUITE_REGISTRATION(AnchorTest) 31 | CXXTEST_TEST_REGISTRATION(AnchorTest, constructor) 32 | CXXTEST_TEST_REGISTRATION(AnchorTest, setDefinition) 33 | CXXTEST_TEST_REGISTRATION(AnchorTest, clone) 34 | CXXTEST_TEST_REGISTRATION(AnchorTest, copy) 35 | -------------------------------------------------------------------------------- /modules/body/test/c++/dempstertableTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | CXXTEST_SUITE(DempsterTableTest) 8 | { 9 | CXXTEST_TEST(generate) 10 | { 11 | TS_WARN("TODO"); 12 | } 13 | 14 | CXXTEST_TEST(clone) 15 | { 16 | TS_WARN("Implement the method ma::body::DempsterTable::clone()"); 17 | }; 18 | 19 | CXXTEST_TEST(copy) 20 | { 21 | TS_WARN("Implement the method ma::body::DempsterTable::copy()"); 22 | }; 23 | }; 24 | 25 | CXXTEST_SUITE_REGISTRATION(DempsterTableTest) 26 | CXXTEST_TEST_REGISTRATION(DempsterTableTest, generate) 27 | CXXTEST_TEST_REGISTRATION(DempsterTableTest, clone) 28 | CXXTEST_TEST_REGISTRATION(DempsterTableTest, copy) 29 | -------------------------------------------------------------------------------- /modules/body/test/c++/dynamicdescriptorTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(EulerDescriptorTest) 6 | { 7 | CXXTEST_TEST(process) 8 | { 9 | TS_WARN("TODO"); 10 | } 11 | 12 | CXXTEST_TEST(clone) 13 | { 14 | TS_WARN("Implement the method ma::body::DynamicDescriptor::clone()"); 15 | }; 16 | 17 | CXXTEST_TEST(copy) 18 | { 19 | TS_WARN("Implement the method ma::body::DynamicDescriptor::copy()"); 20 | }; 21 | }; 22 | 23 | CXXTEST_SUITE_REGISTRATION(EulerDescriptorTest) 24 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, process) 25 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, clone) 26 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, copy) 27 | -------------------------------------------------------------------------------- /modules/body/test/c++/eulerdescriptorTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(EulerDescriptorTest) 6 | { 7 | CXXTEST_TEST(processConstructorOne) 8 | { 9 | TS_WARN("TODO"); 10 | } 11 | 12 | CXXTEST_TEST(processConstructorTwo) 13 | { 14 | TS_WARN("TODO"); 15 | } 16 | 17 | CXXTEST_TEST(processConstructorThree) 18 | { 19 | TS_WARN("TODO"); 20 | } 21 | 22 | CXXTEST_TEST(configure) 23 | { 24 | TS_WARN("TODO"); 25 | } 26 | 27 | CXXTEST_TEST(clone) 28 | { 29 | TS_WARN("Implement the method ma::body::EulerDescriptor::clone()"); 30 | }; 31 | 32 | CXXTEST_TEST(copy) 33 | { 34 | TS_WARN("Implement the method ma::body::EulerDescriptor::copy()"); 35 | }; 36 | }; 37 | 38 | CXXTEST_SUITE_REGISTRATION(EulerDescriptorTest) 39 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, processConstructorOne) 40 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, processConstructorTwo) 41 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, processConstructorThree) 42 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, configure) 43 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, clone) 44 | CXXTEST_TEST_REGISTRATION(EulerDescriptorTest, copy) 45 | -------------------------------------------------------------------------------- /modules/body/test/c++/inertialparametersTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(InertialParametersTest) 6 | { 7 | CXXTEST_TEST(constructor) 8 | { 9 | TS_WARN("TODO"); 10 | } 11 | 12 | CXXTEST_TEST(clone) 13 | { 14 | TS_WARN("Implement the method ma::body::InertialParameters::clone()"); 15 | }; 16 | 17 | CXXTEST_TEST(copy) 18 | { 19 | TS_WARN("Implement the method ma::body::InertialParameters::copy()"); 20 | }; 21 | }; 22 | 23 | CXXTEST_SUITE_REGISTRATION(InertialParametersTest) 24 | CXXTEST_TEST_REGISTRATION(InertialParametersTest, constructor) 25 | CXXTEST_TEST_REGISTRATION(InertialParametersTest, clone) 26 | CXXTEST_TEST_REGISTRATION(InertialParametersTest, copy) 27 | -------------------------------------------------------------------------------- /modules/body/test/c++/plugingaitTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "plugingaitTest_def.h" 4 | 5 | CXXTEST_SUITE(PluginGaitTest) 6 | { 7 | CXXTEST_TEST(clone) 8 | { 9 | ma::body::PluginGait helper(ma::body::Region::Full, ma::body::Side::Both); 10 | fill_parameters_with_fake_value(&helper); 11 | ma::Node root("root"); 12 | auto clonedhelper = helper.clone(&root); 13 | helper.setLeftWristWidth(24.0); 14 | compare_parameters_with_fake_value(clonedhelper); 15 | }; 16 | 17 | CXXTEST_TEST(copy) 18 | { 19 | ma::body::PluginGait helper(ma::body::Region::Full, ma::body::Side::Both); 20 | ma::body::PluginGait copyhelper(ma::body::Region::Lower, ma::body::Side::Right); 21 | fill_parameters_with_fake_value(&helper); 22 | copyhelper.setMarkerDiameter(16.0); 23 | copyhelper.setHeadOffsetEnabled(false); 24 | copyhelper.setLeftShoulderOffset(71.3); 25 | copyhelper.setRightElbowWidth(50.1); 26 | copyhelper.setLeftLegLength(942.0); 27 | copyhelper.setRightAsisTrochanterAPDistance(123.5); 28 | copyhelper.setRightKneeWidth(93.0); 29 | copyhelper.copy(&helper); 30 | compare_parameters_with_fake_value(&helper); 31 | compare_parameters_with_fake_value(©helper); 32 | }; 33 | }; 34 | 35 | CXXTEST_SUITE_REGISTRATION(PluginGaitTest) 36 | CXXTEST_TEST_REGISTRATION(PluginGaitTest, clone) 37 | CXXTEST_TEST_REGISTRATION(PluginGaitTest, copy) 38 | -------------------------------------------------------------------------------- /modules/body/test/c++/referenceframeTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(ReferenceFrameTest) 6 | { 7 | CXXTEST_TEST(setData) 8 | { 9 | 10 | } 11 | 12 | CXXTEST_TEST(clone) 13 | { 14 | }; 15 | 16 | CXXTEST_TEST(copy) 17 | { 18 | }; 19 | }; 20 | 21 | CXXTEST_SUITE_REGISTRATION(ReferenceFrameTest) 22 | CXXTEST_TEST_REGISTRATION(ReferenceFrameTest, setData) 23 | CXXTEST_TEST_REGISTRATION(ReferenceFrameTest, clone) 24 | CXXTEST_TEST_REGISTRATION(ReferenceFrameTest, copy) 25 | -------------------------------------------------------------------------------- /modules/body/test/c++/segmentTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | #include 5 | 6 | CXXTEST_SUITE(SegmentTest) 7 | { 8 | CXXTEST_TEST(clone) 9 | { 10 | ma::Node root("root"); 11 | ma::body::Segment seg("Doo", ma::body::Part::User, ma::body::Side::Left); 12 | auto clone = seg.clone(&root); 13 | TS_ASSERT_EQUALS(root.child(0), clone); 14 | TS_ASSERT_EQUALS(clone->name(), seg.name()); 15 | TS_ASSERT_EQUALS(clone->part(), seg.part()); 16 | TS_ASSERT_EQUALS(clone->side(), seg.side()); 17 | clone->setName("Clone"); 18 | clone->setSide(ma::body::Side::Right); 19 | clone->setPart(ma::body::Part::User + 1); 20 | TS_ASSERT_DIFFERS(clone->name(), seg.name()); 21 | TS_ASSERT_DIFFERS(clone->part(), seg.part()); 22 | TS_ASSERT_DIFFERS(clone->side(), seg.side()); 23 | }; 24 | 25 | CXXTEST_TEST(copy) 26 | { 27 | ma::body::Segment seg1("Doo", ma::body::Part::User, ma::body::Side::Left); 28 | ma::body::Segment seg2("Clone", ma::body::Part::User+1, ma::body::Side::Right); 29 | seg2.copy(&seg1); 30 | TS_ASSERT_EQUALS(seg1.name(), seg2.name()); 31 | TS_ASSERT_EQUALS(seg1.part(), seg2.part()); 32 | TS_ASSERT_EQUALS(seg1.side(), seg2.side()); 33 | seg2.setName("Clone"); 34 | seg2.setSide(ma::body::Side::Right); 35 | seg2.setPart(ma::body::Part::User + 1); 36 | TS_ASSERT_DIFFERS(seg1.name(), seg2.name()); 37 | TS_ASSERT_DIFFERS(seg1.part(), seg2.part()); 38 | TS_ASSERT_DIFFERS(seg1.side(), seg2.side()); 39 | }; 40 | }; 41 | 42 | CXXTEST_SUITE_REGISTRATION(SegmentTest) 43 | CXXTEST_TEST_REGISTRATION(SegmentTest, clone) 44 | CXXTEST_TEST_REGISTRATION(SegmentTest, copy) 45 | -------------------------------------------------------------------------------- /modules/body/test/c++/skeletonhelperTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | CXXTEST_SUITE(SkeletonHelperTest) 6 | { 7 | CXXTEST_TEST(process) 8 | { 9 | TS_WARN("TODO"); 10 | } 11 | 12 | CXXTEST_TEST(clone) 13 | { 14 | TS_WARN("Implement the method ma::body::SkeletonHelper::clone()"); 15 | }; 16 | 17 | CXXTEST_TEST(copy) 18 | { 19 | TS_WARN("Implement the method ma::body::SkeletonHelper::copy()"); 20 | }; 21 | }; 22 | 23 | CXXTEST_SUITE_REGISTRATION(SkeletonHelperTest) 24 | CXXTEST_TEST_REGISTRATION(SkeletonHelperTest, process) 25 | CXXTEST_TEST_REGISTRATION(SkeletonHelperTest, clone) 26 | CXXTEST_TEST_REGISTRATION(SkeletonHelperTest, copy) 27 | -------------------------------------------------------------------------------- /modules/body/test/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(TOOLBOX_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/matlab/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(MTD_DIRS ${TOOLBOX_DIRECTORY} ${TESTS_DIRECTORY} "${CMAKE_BINARY_DIR}/modules/io/test/matlab") 4 | 5 | ADD_MATLAB_UNITTEST_DRIVER(matlab_body_landmarkstranslator LandmarksTranslatorTest.m INCLUDES ${MTD_DIRS}) 6 | ADD_MATLAB_UNITTEST_DRIVER(matlab_body_plugingait PluginGaitTest.m INCLUDES ${MTD_DIRS}) -------------------------------------------------------------------------------- /modules/body/test/matlab/LandmarksTranslatorTest.m: -------------------------------------------------------------------------------- 1 | classdef LandmarksTranslatorTest < matlab.unittest.TestCase 2 | 3 | methods (Test) 4 | 5 | function convert(testCase) 6 | translator = ma.body.LandmarksTranslator('LandmarksTranslator',{ ... 7 | {'LFHD', 'L.HF'}, ... 8 | {'LBHD', 'L.HB'}, ... 9 | {'RFHD', 'R.HF'}, ... 10 | {'RBHD', 'R.HB'}, ... 11 | {'C7' , 'C7' }, ... 12 | }); 13 | testCase.verifyEqual(translator.convert('LFHD'), 'L.HF'); 14 | testCase.verifyEqual(translator.convert('LBHD'), 'L.HB'); 15 | testCase.verifyEqual(translator.convert('RFHD'), 'R.HF'); 16 | testCase.verifyEqual(translator.convert('RBHD'), 'R.HB'); 17 | testCase.verifyEqual(translator.convert('C7'), 'C7'); 18 | testCase.verifyEqual(translator.convert('RBHD_'), 'RBHD_'); 19 | testCase.verifyEqual(translator.convert('T10'), 'T10'); 20 | end 21 | 22 | function convertIfExists(testCase) 23 | translator = ma.body.LandmarksTranslator('LandmarksTranslator',{ 24 | {'LFHD', 'L.HF'}, ... 25 | {'LBHD', 'L.HB'}, ... 26 | {'RFHD', 'R.HF'}, ... 27 | {'RBHD', 'R.HB'}, ... 28 | {'C7' , 'C7' }, ... 29 | }); 30 | testCase.verifyEqual(translator.convertIfExists('LFHD'), 'L.HF'); 31 | testCase.verifyEqual(translator.convertIfExists('LBHD'), 'L.HB'); 32 | testCase.verifyEqual(translator.convertIfExists('RFHD'), 'R.HF'); 33 | testCase.verifyEqual(translator.convertIfExists('RBHD'), 'R.HB'); 34 | testCase.verifyEqual(translator.convertIfExists('C7'), 'C7'); 35 | testCase.verifyEqual(isempty(translator.convertIfExists('RBHD_')), true); 36 | testCase.verifyEqual(isempty(translator.convertIfExists('T10')), true); 37 | end 38 | 39 | end 40 | 41 | end -------------------------------------------------------------------------------- /modules/body/test/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/python/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(PTD_DIRS ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY} "${CMAKE_BINARY_DIR}/modules/io/test/python") 4 | 5 | ADD_PYTHON_UNITTEST_DRIVER(python_body_landmarkstranslator landmarkstranslatorTest INCLUDES ${PTD_DIRS}) 6 | ADD_PYTHON_UNITTEST_DRIVER(python_body_plugingait plugingaitTest INCLUDES ${PTD_DIRS}) -------------------------------------------------------------------------------- /modules/body/test/python/landmarkstranslatorTest.py: -------------------------------------------------------------------------------- 1 | import ma.body 2 | import unittest 3 | 4 | class LandmarksTranslatorTest(unittest.TestCase): 5 | def test_convert(self): 6 | translator = ma.body.LandmarksTranslator('LandmarksTranslator',[ 7 | ['LFHD', 'L.HF'], 8 | ['LBHD', 'L.HB'], 9 | ['RFHD', 'R.HF'], 10 | ['RBHD', 'R.HB'], 11 | ['C7' , 'C7' ], 12 | ]) 13 | self.assertEqual(translator.convert('LFHD'), 'L.HF') 14 | self.assertEqual(translator.convert('LBHD'), 'L.HB') 15 | self.assertEqual(translator.convert('RFHD'), 'R.HF') 16 | self.assertEqual(translator.convert('RBHD'), 'R.HB') 17 | self.assertEqual(translator.convert('C7'), 'C7') 18 | self.assertEqual(translator.convert('RBHD_'), 'RBHD_') 19 | self.assertEqual(translator.convert('T10'), 'T10') 20 | 21 | def test_convert_if_exists(self): 22 | translator = ma.body.LandmarksTranslator('LandmarksTranslator',[ 23 | ['LFHD', 'L.HF'], 24 | ['LBHD', 'L.HB'], 25 | ['RFHD', 'R.HF'], 26 | ['RBHD', 'R.HB'], 27 | ['C7' , 'C7' ], 28 | ]) 29 | self.assertEqual(translator.convertIfExists('LFHD'), 'L.HF') 30 | self.assertEqual(translator.convertIfExists('LBHD'), 'L.HB') 31 | self.assertEqual(translator.convertIfExists('RFHD'), 'R.HF') 32 | self.assertEqual(translator.convertIfExists('RBHD'), 'R.HB') 33 | self.assertEqual(translator.convertIfExists('C7'), 'C7') 34 | self.assertEqual(translator.convertIfExists('RBHD_'), '') 35 | self.assertEqual(translator.convertIfExists('T10'), '') -------------------------------------------------------------------------------- /modules/instrument/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_INSTRUMENT_SRCS 2 | src/forceplate.cpp 3 | src/forceplatetype2.cpp 4 | src/forceplatetype3.cpp 5 | src/forceplatetype4.cpp 6 | src/forceplatetype5.cpp 7 | ) 8 | 9 | ADD_LIBRARY(instrument ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_INSTRUMENT_SRCS}) 10 | TARGET_LINK_LIBRARIES(instrument base math) 11 | TARGET_INCLUDE_DIRECTORIES(instrument PUBLIC 12 | $ 13 | $ 14 | $ 15 | ) 16 | GENERATE_EXPORT_HEADER(instrument 17 | BASE_NAME OPENMA_INSTRUMENT 18 | EXPORT_FILE_NAME include/openma/instrument_export.h) 19 | 20 | SET_TARGET_PROPERTIES(instrument PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 21 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 22 | SET_TARGET_PROPERTIES(instrument PROPERTIES COMPILE_FLAGS -DOPENMA_INSTRUMENT_STATIC_DEFINE) 23 | ENDIF() 24 | 25 | IF(BUILD_LANGUAGE_BINDINGS) 26 | ADD_SUBDIRECTORY(swig) 27 | ENDIF() 28 | 29 | IF(BUILD_UNIT_TESTS) 30 | ADD_SUBDIRECTORY(test) 31 | ENDIF() 32 | 33 | INSTALL(TARGETS instrument EXPORT OpenMATargets 34 | LIBRARY DESTINATION lib 35 | ARCHIVE DESTINATION lib 36 | RUNTIME DESTINATION bin 37 | ) 38 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 39 | DESTINATION . 40 | PATTERN "_p.h" EXCLUDE 41 | ) -------------------------------------------------------------------------------- /modules/instrument/doc/instrument.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_instrument ma::instrument 3 | * @brief Classes for the management of measurement devices. 4 | * 5 | * This module corresponds to the library @c openma_instrument. It uses the nested namespace @c instrument. As a consequence all the types proposed in this module use the @c ma::instrument namespace. 6 | * 7 | * The main goal of this module is to define and manage measurement devices. 8 | * 9 | * @todo Details the goal and usage of ma::instrument. 10 | */ -------------------------------------------------------------------------------- /modules/instrument/include/openma/instrument.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef __openma_instrument_h 36 | #define __openma_instrument_h 37 | 38 | #include "openma/instrument/enums.h" 39 | #include "openma/instrument/forceplate.h" 40 | #include "openma/instrument/forceplatetype2.h" 41 | #include "openma/instrument/forceplatetype3.h" 42 | #include "openma/instrument/forceplatetype4.h" 43 | #include "openma/instrument/forceplatetype5.h" 44 | 45 | #endif // __openma_instrument_h -------------------------------------------------------------------------------- /modules/instrument/swig/instrument_matlab.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/matlab.swg" -------------------------------------------------------------------------------- /modules/instrument/swig/instrument_python.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/python.swg" 36 | -------------------------------------------------------------------------------- /modules/instrument/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | IF(BUILD_MATLAB_BINDINGS) 4 | ADD_SUBDIRECTORY("matlab") 5 | ENDIF() 6 | 7 | IF(BUILD_PYTHON_BINDINGS) 8 | ADD_SUBDIRECTORY("python") 9 | ENDIF() -------------------------------------------------------------------------------- /modules/instrument/test/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_CXX_CXXTEST_DRIVER(openma_instrument_forceplatetype2 forceplatetype2Test.cpp instrument) 2 | ADD_CXX_CXXTEST_DRIVER(openma_instrument_forceplatetype3 forceplatetype3Test.cpp instrument) 3 | ADD_CXX_CXXTEST_DRIVER(openma_instrument_forceplatetype4 forceplatetype4Test.cpp instrument) 4 | ADD_CXX_CXXTEST_DRIVER(openma_instrument_forceplatetype5 forceplatetype5Test.cpp instrument) -------------------------------------------------------------------------------- /modules/instrument/test/c++/forceplatetype3Test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "forceplateTest_def.h" 4 | 5 | #include 6 | 7 | 8 | 9 | CXXTEST_SUITE(ForcePlateType3Test) 10 | { 11 | CXXTEST_TEST(wrench_local) 12 | { 13 | ma::instrument::ForcePlateType3 fp("FP"); 14 | forceplatetest_fill_gaitfb1_type3(&fp); 15 | forceplatetest_compare_gaitfb1_type3_wrench_local(&fp); 16 | }; 17 | 18 | CXXTEST_TEST(wrench_global) 19 | { 20 | ma::instrument::ForcePlateType3 fp("FP"); 21 | forceplatetest_fill_gaitfb1_type3(&fp); 22 | forceplatetest_compare_gaitfb1_type3_wrench_global(&fp); 23 | }; 24 | 25 | CXXTEST_TEST(pointOfApplicationCrossVerification) 26 | { 27 | ma::instrument::ForcePlateType3 fp("FP"); 28 | forceplatetest_fill_gaitfb1_type3(&fp); 29 | forceplatetest_cross_verification_pwa(&fp, {1e-15,1.5e2,7.5e-1}); // 150Nmm, 0.75mm 30 | }; 31 | 32 | CXXTEST_TEST(clone) 33 | { 34 | ma::instrument::ForcePlateType3 fp("FP"); 35 | forceplatetest_fill_gaitfb1_type3(&fp); 36 | auto fp3_ = static_cast(fp.clone()); 37 | TS_ASSERT_EQUALS(fp3_->type(), 3); 38 | forceplatetest_compare_fp3_clone(&fp, fp3_); 39 | forceplatetest_compare_gaitfb1_type3_wrench_local(fp3_); 40 | forceplatetest_compare_gaitfb1_type3_wrench_global(fp3_); 41 | delete fp3_; 42 | }; 43 | 44 | CXXTEST_TEST(nodeid) 45 | { 46 | ma::Node root("root"); 47 | ma::instrument::ForcePlateType3 fp("FP", &root); 48 | TS_ASSERT_EQUALS(root.findChild(), &fp); 49 | }; 50 | }; 51 | 52 | CXXTEST_SUITE_REGISTRATION(ForcePlateType3Test) 53 | CXXTEST_TEST_REGISTRATION(ForcePlateType3Test, wrench_local) 54 | CXXTEST_TEST_REGISTRATION(ForcePlateType3Test, wrench_global) 55 | CXXTEST_TEST_REGISTRATION(ForcePlateType3Test, pointOfApplicationCrossVerification) 56 | CXXTEST_TEST_REGISTRATION(ForcePlateType3Test, clone) 57 | CXXTEST_TEST_REGISTRATION(ForcePlateType3Test, nodeid) -------------------------------------------------------------------------------- /modules/instrument/test/c++/forceplatetype4Test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "forceplateTest_def.h" 4 | 5 | #include 6 | 7 | CXXTEST_SUITE(ForcePlateType4Test) 8 | { 9 | CXXTEST_TEST(wrench) 10 | { 11 | ma::instrument::ForcePlateType4 fp("FP"); 12 | forceplatetest_fill_sample10_type4(&fp); 13 | forceplatetest_compare_sample10_wrench_at_origin(&fp, fp4dataout); 14 | }; 15 | 16 | CXXTEST_TEST(clone) 17 | { 18 | ma::instrument::ForcePlateType4 fp("FP"); 19 | forceplatetest_fill_sample10_type4(&fp); 20 | auto fp4_ = static_cast(fp.clone()); 21 | TS_ASSERT_EQUALS(fp4_->type(), 4); 22 | forceplatetest_compare_fp4_clone(&fp, fp4_); 23 | forceplatetest_compare_sample10_wrench_at_origin(fp4_, fp4dataout); 24 | delete fp4_; 25 | }; 26 | 27 | CXXTEST_TEST(nodeid) 28 | { 29 | ma::Node root("root"); 30 | ma::instrument::ForcePlateType4 fp("FP", &root); 31 | TS_ASSERT_EQUALS(root.findChild(), &fp); 32 | }; 33 | }; 34 | 35 | CXXTEST_SUITE_REGISTRATION(ForcePlateType4Test) 36 | CXXTEST_TEST_REGISTRATION(ForcePlateType4Test, wrench) 37 | CXXTEST_TEST_REGISTRATION(ForcePlateType4Test, clone) 38 | CXXTEST_TEST_REGISTRATION(ForcePlateType4Test, nodeid) -------------------------------------------------------------------------------- /modules/instrument/test/c++/forceplatetype5Test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "forceplateTest_def.h" 4 | 5 | #include 6 | 7 | CXXTEST_SUITE(ForcePlateType5Test) 8 | { 9 | CXXTEST_TEST(wrench) 10 | { 11 | ma::instrument::ForcePlateType5 fp("FP"); 12 | forceplatetest_fill_gait1_type5(&fp); 13 | forceplatetest_compare_gait1_wrench_at_origin(&fp); 14 | forceplatetest_compare_gait1_wrench_position_at_cop(&fp); 15 | }; 16 | 17 | 18 | CXXTEST_TEST(pointOfApplicationCrossVerification) 19 | { 20 | ma::instrument::ForcePlateType5 fp("FP"); 21 | forceplatetest_fill_gait1_type5(&fp); 22 | forceplatetest_cross_verification_pwa(&fp, {1e-15,7.5e1,2e0}); // 75Nmm, 2mm 23 | }; 24 | 25 | CXXTEST_TEST(clone) 26 | { 27 | ma::instrument::ForcePlateType5 fp("FP"); 28 | forceplatetest_fill_gait1_type5(&fp); 29 | auto fp5_ = static_cast(fp.clone()); 30 | TS_ASSERT_EQUALS(fp5_->type(), 5); 31 | forceplatetest_compare_fp5_clone(&fp, fp5_); 32 | forceplatetest_compare_gait1_wrench_at_origin(fp5_); 33 | forceplatetest_compare_gait1_wrench_position_at_cop(fp5_); 34 | delete fp5_; 35 | }; 36 | 37 | 38 | CXXTEST_TEST(nodeid) 39 | { 40 | ma::Node root("root"); 41 | ma::instrument::ForcePlateType5 fp("FP", &root); 42 | TS_ASSERT_EQUALS(root.findChild(), &fp); 43 | }; 44 | }; 45 | 46 | CXXTEST_SUITE_REGISTRATION(ForcePlateType5Test) 47 | CXXTEST_TEST_REGISTRATION(ForcePlateType5Test, wrench) 48 | CXXTEST_TEST_REGISTRATION(ForcePlateType5Test, pointOfApplicationCrossVerification) 49 | CXXTEST_TEST_REGISTRATION(ForcePlateType5Test, clone) 50 | CXXTEST_TEST_REGISTRATION(ForcePlateType5Test, nodeid) -------------------------------------------------------------------------------- /modules/instrument/test/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(TOOLBOX_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/matlab/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(MTD_DIRS ${TOOLBOX_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_MATLAB_UNITTEST_DRIVER(matlab_instrument_forceplatetype5 ForcePlateType5Test.m INCLUDES ${MTD_DIRS}) 6 | ADD_MATLAB_UNITTEST_DRIVER(matlab_instrument_forceplatetype3 ForcePlateType3Test.m INCLUDES ${MTD_DIRS}) -------------------------------------------------------------------------------- /modules/instrument/test/matlab/ForcePlateType3Test.m: -------------------------------------------------------------------------------- 1 | classdef ForcePlateType3Test < matlab.unittest.TestCase 2 | 3 | methods (Test) 4 | 5 | function setgetSensorOffsets(testCase) 6 | fp3 = ma.instrument.ForcePlateType3('FP'); 7 | fp3.setSensorOffsets([123.4, 456.7]); 8 | so = fp3.sensorOffsets(); 9 | testCase.verifyEqual(so(1), 123.4, 'AbsTol', 1e-15); 10 | testCase.verifyEqual(so(2), 456.7, 'AbsTol', 1e-15); 11 | end 12 | 13 | function setgetSoftReset(testCase) 14 | fp3 = ma.instrument.ForcePlateType3('FP'); 15 | testCase.verifyEqual(fp3.isSoftResetEnabled(), false); 16 | fp3.setSoftResetEnabled(true); 17 | testCase.verifyEqual(fp3.isSoftResetEnabled(), true); 18 | srs = fp3.softResetSamples(); 19 | testCase.verifyEqual(srs(1), 0); 20 | testCase.verifyEqual(srs(2), 0); 21 | fp3.setSoftResetSamples([0,9]); % WARNING : 0-based indices 22 | srs = fp3.softResetSamples(); 23 | testCase.verifyEqual(srs(1), 0); 24 | testCase.verifyEqual(srs(2), 9); 25 | fp3.setSoftResetSamples([9,19]); % WARNING : 0-based indices 26 | srs = fp3.softResetSamples(); 27 | testCase.verifyEqual(srs(1), 9); 28 | testCase.verifyEqual(srs(2), 19); 29 | end 30 | 31 | end 32 | 33 | end -------------------------------------------------------------------------------- /modules/instrument/test/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/python/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(PTD_DIRS ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_PYTHON_UNITTEST_DRIVER(python_instrument_forceplatetype5 forceplatetype5Test INCLUDES ${PTD_DIRS}) 6 | ADD_PYTHON_UNITTEST_DRIVER(python_instrument_forceplatetype3 forceplatetype3Test INCLUDES ${PTD_DIRS}) -------------------------------------------------------------------------------- /modules/instrument/test/python/forceplatetype3Test.py: -------------------------------------------------------------------------------- 1 | import ma.instrument 2 | import unittest 3 | 4 | class ForcePlateType3Test(unittest.TestCase): 5 | def test_setget_sensor_offsets(self): 6 | fp3 = ma.instrument.ForcePlateType3('FP') 7 | fp3.setSensorOffsets([123.4, 456.7]) 8 | so = fp3.sensorOffsets() 9 | self.assertAlmostEqual(so[0], 123.4, 15) 10 | self.assertAlmostEqual(so[1], 456.7, 15) 11 | 12 | 13 | def test_setget_soft_reset(self): 14 | fp3 = ma.instrument.ForcePlateType3('FP') 15 | self.assertEqual(fp3.isSoftResetEnabled(), False) 16 | fp3.setSoftResetEnabled(True) 17 | self.assertEqual(fp3.isSoftResetEnabled(), True) 18 | srs = fp3.softResetSamples() 19 | self.assertEqual(srs[0], 0) 20 | self.assertEqual(srs[1], 0) 21 | fp3.setSoftResetSamples([0,9]) 22 | srs = fp3.softResetSamples() 23 | self.assertEqual(srs[0], 0) 24 | self.assertEqual(srs[1], 9) 25 | fp3.setSoftResetSamples([9,19]) 26 | srs = fp3.softResetSamples() 27 | self.assertEqual(srs[0], 9) 28 | self.assertEqual(srs[1], 19) -------------------------------------------------------------------------------- /modules/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_IO_SRCS 2 | src/_io.cpp 3 | src/binarystream.cpp 4 | src/buffer.cpp 5 | src/device.cpp 6 | src/file.cpp 7 | src/handler.cpp 8 | src/handlerplugin.cpp 9 | src/handlerreader.cpp 10 | src/handlerwriter.cpp 11 | ) 12 | 13 | # Variable OPENMA_STATIC_IO_PLUGINS_SRCS is used for static build 14 | SET(OPENMA_STATIC_IO_PLUGINS_SRCS "" CACHE INTERNAL "") 15 | ADD_SUBDIRECTORY("plugins") 16 | 17 | ADD_LIBRARY(io ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_IO_SRCS} ${OPENMA_STATIC_IO_PLUGINS_SRCS}) 18 | TARGET_LINK_LIBRARIES(io instrument pugixml) 19 | TARGET_INCLUDE_DIRECTORIES(io PUBLIC 20 | $ 21 | $ 22 | $ 23 | $ 24 | $ 25 | ) 26 | GENERATE_EXPORT_HEADER(io 27 | BASE_NAME OPENMA_IO 28 | EXPORT_FILE_NAME include/openma/io_export.h) 29 | 30 | SET_TARGET_PROPERTIES(io PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 31 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 32 | SET_TARGET_PROPERTIES(io PROPERTIES COMPILE_FLAGS -DOPENMA_IO_STATIC_DEFINE) 33 | ENDIF() 34 | 35 | IF(BUILD_LANGUAGE_BINDINGS) 36 | ADD_SUBDIRECTORY(swig) 37 | ENDIF() 38 | 39 | IF(BUILD_UNIT_TESTS) 40 | ADD_SUBDIRECTORY(test) 41 | ENDIF() 42 | 43 | INSTALL(TARGETS io EXPORT OpenMATargets 44 | LIBRARY DESTINATION lib 45 | ARCHIVE DESTINATION lib 46 | RUNTIME DESTINATION bin 47 | ) 48 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 49 | DESTINATION . 50 | PATTERN "_p.h" EXCLUDE 51 | ) -------------------------------------------------------------------------------- /modules/io/doc/io.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_io ma::io 3 | * @brief Classes for input and output operations on devices. 4 | * 5 | * This module corresponds to the library @c openma_io. It uses the nested namespace @c io. As a consequence all the types proposed in this module use the @c ma::io namespace. 6 | * 7 | * The main goal of this module is to create handler to read/write data format used in movement analysis (like the C3D format) 8 | * 9 | * @todo Details the goal and usage of ma::io. 10 | */ -------------------------------------------------------------------------------- /modules/io/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # IF(OPENMA_BUILD_SHARED_LIBS) 2 | # MESSAGE(FATAL_ERROR "The IO handler dynamic loading mechanism is not yet implemented. You cannot build this module as a shared library.") 3 | # ENDIF() 4 | 5 | SET(OPENMA_STATIC_IO_PLUGINS_SRCS "") 6 | SET(OPENMA_STATIC_IO_PLUGIN_LOADER_INCLUDES "") 7 | SET(OPENMA_STATIC_IO_PLUGIN_LOADER_COMMANDS "") 8 | 9 | FILE(GLOB FORMATS_PATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*") 10 | FOREACH(_format_path ${FORMATS_PATHS}) 11 | SET(OPENMA_CURRENT_FORMAT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${_format_path}") 12 | IF(IS_DIRECTORY ${OPENMA_CURRENT_FORMAT_PATH}) 13 | FILE(GLOB HANDLERS_PATHS RELATIVE ${OPENMA_CURRENT_FORMAT_PATH} "${OPENMA_CURRENT_FORMAT_PATH}/*") 14 | FOREACH(_handler_path ${HANDLERS_PATHS}) 15 | IF(IS_DIRECTORY ${OPENMA_CURRENT_FORMAT_PATH}/${_handler_path}) 16 | SET(OPENMA_IO_PLUGIN_NAME "" CACHE INTERNAL "") 17 | SET(OPENMA_IO_PLUGIN_SRCS "" CACHE INTERNAL "") 18 | ADD_SUBDIRECTORY(${_format_path}/${_handler_path}) 19 | IF (NOT OPENMA_IO_PLUGIN_NAME OR NOT OPENMA_IO_PLUGIN_SRCS) 20 | MESSAGE(FATAL_ERROR "Missing plugin name or plugin sources. Please, verify the CMake configuration script") 21 | ENDIF() 22 | SET(OPENMA_STATIC_IO_PLUGINS_SRCS ${OPENMA_STATIC_IO_PLUGINS_SRCS} ${OPENMA_IO_PLUGIN_SRCS} CACHE INTERNAL "") 23 | STRING(TOLOWER ${OPENMA_IO_PLUGIN_NAME} OPENMA_IO_PLUGIN_HEADER) 24 | SET(OPENMA_STATIC_IO_PLUGIN_LOADER_INCLUDES 25 | "${OPENMA_STATIC_IO_PLUGIN_LOADER_INCLUDES}#include \"${_format_path}/${_handler_path}/${OPENMA_IO_PLUGIN_HEADER}.h\"\n") 26 | SET(OPENMA_STATIC_IO_PLUGIN_LOADER_COMMANDS 27 | "${OPENMA_STATIC_IO_PLUGIN_LOADER_COMMANDS} plugin = new ${OPENMA_IO_PLUGIN_NAME}; manager->add(plugin);\n") 28 | ENDIF() 29 | ENDFOREACH() 30 | ENDIF() 31 | ENDFOREACH() 32 | 33 | 34 | # IF(OPENMA_BUILD_SHARED_LIBS) 35 | # SET(OPENMA_STATIC_IO_PLUGIN_LOADER_INCLUDES "") 36 | # SET(OPENMA_STATIC_IO_PLUGIN_LOADER_COMMANDS "") 37 | # ENDIF() 38 | 39 | CONFIGURE_FILE(${OPENMA_CMAKE_MODULE_PATH}/templates/staticiopluginloader.h.in 40 | ${CMAKE_CURRENT_BINARY_DIR}/staticiopluginloader.h @ONLY IMMEDIATE) -------------------------------------------------------------------------------- /modules/io/plugins/trialformats/bsf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_IO_BSFPLUGIN_SRCS 2 | plugins/trialformats/bsf/bsfhandler.cpp 3 | plugins/trialformats/bsf/bsfplugin.cpp 4 | ) 5 | 6 | SET(OPENMA_IO_PLUGIN_NAME "BSFPlugin" CACHE INTERNAL "") 7 | SET(OPENMA_IO_PLUGIN_SRCS ${OPENMA_IO_BSFPLUGIN_SRCS} CACHE INTERNAL "") 8 | 9 | -------------------------------------------------------------------------------- /modules/io/plugins/trialformats/c3d/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_IO_C3DPLUGIN_SRCS 2 | plugins/trialformats/c3d/c3ddatastream.cpp 3 | plugins/trialformats/c3d/c3dhandler.cpp 4 | plugins/trialformats/c3d/c3dplugin.cpp 5 | ) 6 | 7 | SET(OPENMA_IO_PLUGIN_NAME "C3DPlugin" CACHE INTERNAL "") 8 | SET(OPENMA_IO_PLUGIN_SRCS ${OPENMA_IO_C3DPLUGIN_SRCS} CACHE INTERNAL "") 9 | 10 | -------------------------------------------------------------------------------- /modules/io/plugins/trialformats/hpf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_IO_HPFPLUGIN_SRCS 2 | plugins/trialformats/hpf/hpfhandler.cpp 3 | plugins/trialformats/hpf/hpfplugin.cpp 4 | ) 5 | 6 | SET(OPENMA_IO_PLUGIN_NAME "HPFPlugin" CACHE INTERNAL "") 7 | SET(OPENMA_IO_PLUGIN_SRCS ${OPENMA_IO_HPFPLUGIN_SRCS} CACHE INTERNAL "") 8 | 9 | -------------------------------------------------------------------------------- /modules/io/swig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET_SOURCE_FILES_PROPERTIES("io.i" PROPERTIES CPLUSPLUS ON) 2 | SET(SWIG_MODULE_io_EXTRA_SRCS ) 3 | SET(SWIG_MODULE_io_EXTRA_FLAGS 4 | # "-debug-tmsearch" 5 | "-I${PROJECT_SOURCE_DIR}/modules/base/swig" 6 | "-I${PROJECT_SOURCE_DIR}/modules/bindings/swig" 7 | "-I${SWIG_DIR}/Lib") 8 | 9 | IF(BUILD_MATLAB_BINDINGS) 10 | SET(IO_MATLAB_SRCS 11 | "io.i" 12 | "../../bindings/include/openma/matlab/mexFunction.def") 13 | SET(CMAKE_SWIG_OUTDIR "${OPENMA_EXECUTABLE_PATH}/swig/matlab/openma") 14 | SET_SOURCE_FILES_PROPERTIES("io.i" PROPERTIES CPLUSPLUS ON) 15 | SET(SWIG_MODULE_ioMEX_EXTRA_DEPS ${SWIG_MODULE_io_EXTRA_SRCS}) 16 | SET(SWIG_MODULE_ioMEX_EXTRA_FLAGS 17 | "-module" "ma.io" 18 | "-mexname" "ioMEX" 19 | ${SWIG_MODULE_io_EXTRA_FLAGS} 20 | "-I${SWIG_DIR}/Lib/matlab") 21 | SWIG_ADD_MODULE(ioMEX matlab "${IO_MATLAB_SRCS}") 22 | SWIG_LINK_LIBRARIES(ioMEX io bindings ${MATLAB_LIBRARIES}) 23 | TARGET_INCLUDE_DIRECTORIES(${SWIG_MODULE_ioMEX_REAL_NAME} PRIVATE "${MATLAB_INCLUDE_DIR}") 24 | SET_TARGET_PROPERTIES(${SWIG_MODULE_ioMEX_REAL_NAME} PROPERTIES 25 | COMPILE_DEFINITIONS "_SWIG_MATLAB" 26 | LIBRARY_OUTPUT_DIRECTORY "${OPENMA_EXECUTABLE_PATH}/swig/matlab/openma" 27 | PREFIX "" 28 | SUFFIX ".${MATLAB_MEXFILE_EXT}") 29 | ENDIF() 30 | 31 | IF(BUILD_PYTHON_BINDINGS) 32 | SET(IO_PYTHON_SRCS 33 | "io.i") 34 | SET(CMAKE_SWIG_OUTDIR "${OPENMA_EXECUTABLE_PATH}/swig/python/openma/ma") 35 | SET(SWIG_MODULE_ioPY_EXTRA_DEPS ${SWIG_MODULE_io_EXTRA_SRCS}) 36 | SET(SWIG_MODULE_ioPY_EXTRA_FLAGS 37 | ${SWIG_MODULE_io_EXTRA_FLAGS} 38 | "-I${SWIG_DIR}/Lib/python") 39 | SWIG_ADD_MODULE(ioPY python "${IO_PYTHON_SRCS}") 40 | SWIG_LINK_LIBRARIES(ioPY io bindings ${PYTHON_LIBRARY}) 41 | TARGET_INCLUDE_DIRECTORIES(${SWIG_MODULE_ioPY_REAL_NAME} PRIVATE "${PYTHON_INCLUDE_DIR}") 42 | SET_TARGET_PROPERTIES(${SWIG_MODULE_ioPY_REAL_NAME} PROPERTIES 43 | OUTPUT_NAME "_io" 44 | LIBRARY_OUTPUT_DIRECTORY "${OPENMA_EXECUTABLE_PATH}/swig/python/openma/ma") 45 | ENDIF() -------------------------------------------------------------------------------- /modules/io/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | IF(BUILD_MATLAB_BINDINGS) 4 | ADD_SUBDIRECTORY("matlab") 5 | ENDIF() 6 | 7 | IF(BUILD_PYTHON_BINDINGS) 8 | ADD_SUBDIRECTORY("python") 9 | ENDIF() -------------------------------------------------------------------------------- /modules/io/test/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Path for the files used in the unit/regression tests 2 | IF(NOT OPENMA_TESTING_DATA_PATH) 3 | SET(OPENMA_TESTING_DATA_PATH "${OPENMA_TESTING_DATA_PATH}" CACHE PATH "Path for the data used by the unit tests." FORCE) 4 | MESSAGE(FATAL_ERROR "You must set the path for the data used by the unit tests") 5 | ENDIF(NOT OPENMA_TESTING_DATA_PATH) 6 | 7 | FILE(TO_CMAKE_PATH "${OPENMA_TESTING_DATA_PATH}" OPENMA_TESTING_DATA_PATH) 8 | # Build the directories used to write files in some unit/regression tests 9 | EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory "${OPENMA_BINARY_DIR}/test/data/output/c3d") 10 | # Configure the file paths 11 | CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test_file_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/test_file_path.h) 12 | 13 | ADD_CXX_CXXTEST_DRIVER(openma_io ioTest.cpp io) 14 | ADD_CXX_CXXTEST_DRIVER(openma_io_binarystream binarystreamTest.cpp io) 15 | ADD_CXX_CXXTEST_DRIVER(openma_io_buffer bufferTest.cpp io) 16 | ADD_CXX_CXXTEST_DRIVER(openma_io_file fileTest.cpp io) 17 | ADD_CXX_CXXTEST_DRIVER(openma_io_handlerplugin handlerpluginTest.cpp io) 18 | ADD_CXX_CXXTEST_DRIVER(openma_io_handlerplugin_reader_bsf trial/bsfreaderTest.cpp io) 19 | ADD_CXX_CXXTEST_DRIVER(openma_io_handlerplugin_reader_c3d trial/c3dreaderTest.cpp io) 20 | ADD_CXX_CXXTEST_DRIVER(openma_io_handlerplugin_writer_c3d trial/c3dwriterTest.cpp io) 21 | ADD_CXX_CATCH_DRIVER(openma_io_handlerplugin_reader_hpf trial/hpfreaderTest.cpp io) -------------------------------------------------------------------------------- /modules/io/test/c++/binarystreamTest_def.h: -------------------------------------------------------------------------------- 1 | #ifndef binarystreamTest_def_h 2 | #define binarystreamTest_def_h 3 | 4 | #include 5 | #include 6 | #include // _OPENMA_NOEXCEPT 7 | #include // memcpy 8 | 9 | class DummyBufferPrivate : public ma::io::DevicePrivate 10 | { 11 | public: 12 | DummyBufferPrivate(char* d) : ma::io::DevicePrivate(), Data(d), Pos(0) {}; 13 | 14 | char* Data; 15 | ma::io::Device::Offset Pos; 16 | }; 17 | 18 | class DummyBuffer : public ma::io::Device 19 | { 20 | OPENMA_DECLARE_PIMPL_ACCESSOR(DummyBuffer) 21 | 22 | public: 23 | DummyBuffer(char* d) : ma::io::Device(*new DummyBufferPrivate(d)) 24 | {}; 25 | virtual bool isOpen() const _OPENMA_NOEXCEPT override {return true;}; 26 | virtual void close() override {}; 27 | virtual Size peek(char* s, Size n) const override 28 | { 29 | auto optr = this->pimpl(); 30 | memcpy(s,optr->Data + optr->Pos, n); 31 | return n; 32 | }; 33 | virtual void read(char* s, Size n) override 34 | { 35 | auto optr = this->pimpl(); 36 | optr->Pos += this->peek(s,n); 37 | }; 38 | virtual void write(const char* s, Size n) override 39 | { 40 | auto optr = this->pimpl(); 41 | memcpy(optr->Data + optr->Pos, s, n); 42 | optr->Pos += n; 43 | }; 44 | virtual void seek(Offset , ma::io::Origin ) override {}; // Not implemented 45 | virtual Position tell() const _OPENMA_NOEXCEPT override {return Position(Offset(-1));}; // Not implemented 46 | virtual bool isSequential() const _OPENMA_NOEXCEPT override {return true;}; 47 | virtual const char* data() const _OPENMA_NOEXCEPT override {return nullptr;}; 48 | virtual Size size() const _OPENMA_NOEXCEPT override {return 0;}; 49 | 50 | void setPos(Offset pos) 51 | { 52 | auto optr = this->pimpl(); 53 | optr->Pos = pos; 54 | } 55 | }; 56 | 57 | #endif // binarystreamTest_def_h -------------------------------------------------------------------------------- /modules/io/test/c++/ioTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "trial/c3dhandlerTest_def.h" 6 | #include "test_file_path.h" 7 | 8 | CXXTEST_SUITE(IoTest) 9 | { 10 | CXXTEST_TEST(readOne) 11 | { 12 | auto root = ma::io::read(OPENMA_TDD_PATH_IN("c3d/standard/sample01/Eb015pi.c3d")); 13 | c3dhandlertest_read_sample01("PI", "Eb015pi.c3d", root); 14 | }; 15 | 16 | CXXTEST_TEST(readTwo) 17 | { 18 | ma::Node root("root"); 19 | TS_ASSERT_EQUALS(ma::io::read(&root, OPENMA_TDD_PATH_IN("c3d/standard/sample01/Eb015pi.c3d")), true); 20 | c3dhandlertest_read_sample01("PI", "Eb015pi.c3d", &root); 21 | }; 22 | 23 | CXXTEST_TEST(writeOne) 24 | { 25 | ma::Node root("root"); 26 | TS_ASSERT_EQUALS(ma::io::read(&root, OPENMA_TDD_PATH_IN("c3d/standard/sample01/Eb015pi.c3d")), true); 27 | TS_ASSERT_EQUALS(ma::io::write(&root, OPENMA_TDD_PATH_OUT("c3d/sample01_Eb015pi.c3d")), true); 28 | root.clear(); 29 | TS_ASSERT_EQUALS(ma::io::read(&root, OPENMA_TDD_PATH_OUT("c3d/sample01_Eb015pi.c3d")), true); 30 | c3dhandlertest_read_sample01("PI", "sample01_Eb015pi.c3d", &root); 31 | }; 32 | }; 33 | 34 | CXXTEST_SUITE_REGISTRATION(IoTest) 35 | CXXTEST_TEST_REGISTRATION(IoTest, readOne) 36 | CXXTEST_TEST_REGISTRATION(IoTest, writeOne) -------------------------------------------------------------------------------- /modules/io/test/c++/test_file_path.h.in: -------------------------------------------------------------------------------- 1 | #ifndef test_file_path_h 2 | #define test_file_path_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #define OPENMA_TDD_PATH_IN(relpath) \ 11 | "${OPENMA_TESTING_DATA_PATH}/input/" relpath 12 | 13 | #define OPENMA_TDD_PATH_OUT(relpath) \ 14 | "${OPENMA_BINARY_DIR}/test/data/output/" relpath 15 | 16 | // TODO The following lines must be removed when all the unit test will use Catch (see openma/#78) 17 | #ifndef TS_ASSERT_EQUALS 18 | #define TS_ASSERT_EQUALS(a,b) 19 | #endif 20 | 21 | void generate_trial_from_c3d_file(ma::Node* root, const char* filename) 22 | { 23 | ma::io::File file; 24 | file.open(filename, ma::io::Mode::In); 25 | ma::io::HandlerReader reader(&file, "org.c3d"); 26 | TS_ASSERT_EQUALS(reader.read(root),true); 27 | TS_ASSERT_EQUALS(reader.errorCode(), ma::io::Error::None); 28 | TS_ASSERT_EQUALS(reader.errorMessage(), ""); 29 | assert(root->children().size() == 1u); 30 | }; 31 | 32 | #endif // test_file_path_h -------------------------------------------------------------------------------- /modules/io/test/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(TOOLBOX_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/matlab/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(MTD_DIRS ${TOOLBOX_DIRECTORY} ${TESTS_DIRECTORY} "${CMAKE_CURRENT_BINARY_DIR}") 4 | 5 | CONFIGURE_FILE(OpenMATDDPathIn.m.in ${CMAKE_CURRENT_BINARY_DIR}/OpenMATDDPathIn.m) 6 | CONFIGURE_FILE(OpenMATDDPathOut.m.in ${CMAKE_CURRENT_BINARY_DIR}/OpenMATDDPathOut.m) 7 | 8 | ADD_MATLAB_UNITTEST_DRIVER(matlab_io IOTest.m INCLUDES ${MTD_DIRS}) -------------------------------------------------------------------------------- /modules/io/test/matlab/IOTest.m: -------------------------------------------------------------------------------- 1 | classdef IOTest < matlab.unittest.TestCase 2 | methods (Test) 3 | 4 | function wrongPath(testCase) 5 | testCase.verifyError(@()ma.io.read('IDoNotExist.abc'), 'SWIG:RuntimeError'); 6 | end 7 | 8 | function forcePlateExtraction(testCase) 9 | root = ma.io.read(OpenMATDDPathIn('c3d/standard/sample01/Eb015vi.c3d')); 10 | forceplates = root.findChildren(ma.instrument.T_ForcePlate); 11 | testCase.verifyEqual(length(forceplates),2); 12 | for i = 1:2 13 | fp = forceplates{i}; 14 | testCase.verifyEqual(double(fp.type), 2); 15 | testCase.verifyEqual(fp.type, ma.instrument.ForcePlate.Type_Type2); 16 | testCase.verifyEqual(fp.type, ma.instrument.ForcePlate.Type_Raw6x6); 17 | channels = fp.channels().findChildren(ma.T_TimeSequence); 18 | testCase.verifyEqual(length(channels),6); 19 | testCase.verifyEqual(channels{1}.name, ['FX',num2str(i)]); 20 | testCase.verifyEqual(channels{2}.name, ['FY',num2str(i)]); 21 | testCase.verifyEqual(channels{3}.name, ['FZ',num2str(i)]); 22 | testCase.verifyEqual(channels{4}.name, ['MX',num2str(i)]); 23 | testCase.verifyEqual(channels{5}.name, ['MY',num2str(i)]); 24 | testCase.verifyEqual(channels{6}.name, ['MZ',num2str(i)]); 25 | end 26 | end 27 | 28 | end 29 | end -------------------------------------------------------------------------------- /modules/io/test/matlab/OpenMATDDPathIn.m.in: -------------------------------------------------------------------------------- 1 | function path = OpenMATDDPathIn(rel) 2 | path = ['${OPENMA_TESTING_DATA_PATH}/input/' , rel]; -------------------------------------------------------------------------------- /modules/io/test/matlab/OpenMATDDPathOut.m.in: -------------------------------------------------------------------------------- 1 | function path = OpenMATDDPathOut(rel) 2 | path = ['${PROJECT_BINARY_DIR}/test/data/output/' , rel]; -------------------------------------------------------------------------------- /modules/io/test/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/python/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(PTD_DIRS ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY} "${CMAKE_CURRENT_BINARY_DIR}") 4 | 5 | CONFIGURE_FILE(test_file_path.py.in ${CMAKE_CURRENT_BINARY_DIR}/test_file_path.py) 6 | 7 | ADD_PYTHON_UNITTEST_DRIVER(python_io ioTest INCLUDES ${PTD_DIRS}) -------------------------------------------------------------------------------- /modules/io/test/python/test_file_path.py.in: -------------------------------------------------------------------------------- 1 | def openma_tdd_path_in(rel): 2 | return '${OPENMA_TESTING_DATA_PATH}/input/' + rel 3 | 4 | def openma_tdd_path_out(rel): 5 | return '${PROJECT_BINARY_DIR}/test/data/output/' + rel -------------------------------------------------------------------------------- /modules/math/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_MATHS_SRCS 2 | src/utils.cpp 3 | ) 4 | 5 | ADD_LIBRARY(math ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_MATHS_SRCS}) 6 | TARGET_LINK_LIBRARIES(math base) 7 | TARGET_INCLUDE_DIRECTORIES(math PUBLIC 8 | $ 9 | $ 10 | $ 11 | $ 12 | $ 13 | ) 14 | GENERATE_EXPORT_HEADER(math 15 | BASE_NAME OPENMA_MATHS 16 | EXPORT_FILE_NAME include/openma/math_export.h) 17 | 18 | SET_TARGET_PROPERTIES(math PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 19 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 20 | SET_TARGET_PROPERTIES(math PROPERTIES COMPILE_FLAGS -DOPENMA_MATHS_STATIC_DEFINE) 21 | ENDIF() 22 | 23 | IF(BUILD_UNIT_TESTS) 24 | ADD_SUBDIRECTORY(test) 25 | ENDIF() 26 | 27 | INSTALL(TARGETS math EXPORT OpenMATargets 28 | LIBRARY DESTINATION lib 29 | ARCHIVE DESTINATION lib 30 | RUNTIME DESTINATION bin 31 | ) 32 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 33 | DESTINATION . 34 | PATTERN "_p.h" EXCLUDE 35 | ) -------------------------------------------------------------------------------- /modules/math/doc/math.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_math ma::math 3 | * @brief Linear algebra for reconstructed data 4 | * 5 | * This module corresponds to the library @c openma_math 6 | * 7 | * The usage of the library would be done only through the header @c openma/math.h. You should not include other (sub-)header as they are dependent between them. 8 | * 9 | * @todo Details the goal and usage or ma::math. 10 | */ -------------------------------------------------------------------------------- /modules/math/include/openma/math.h: -------------------------------------------------------------------------------- 1 | #ifndef __openma_math_h 2 | #define __openma_math_h 3 | 4 | #if defined(_MSC_VER) 5 | // Disable warning for too long decorated name 6 | // See: https://msdn.microsoft.com/en-us/library/074af4b6.aspx 7 | // NOTE: This warning is raised when complex ma::math expressions are used. 8 | #pragma warning(disable : 4503) 9 | #endif 10 | 11 | // Addons for Eigen 12 | #ifdef EIGEN_CORE_H 13 | #error The header maconfig.h must be included before the inclusion of any Eigen headers to integrate the implemented Eigen plugins 14 | #endif 15 | // Need to be defined before the inclusion of the Eigen headers 16 | #define EIGEN_DENSEBASE_PLUGIN 17 | #define EIGEN_VECTOROP_PLUGIN 18 | #include 19 | #include 20 | #include 21 | 22 | #include // std::declval 23 | #define OPENMA_MATHS_DECLVAL_NESTED(xpr) \ 24 | std::declval::type>() 25 | 26 | #include "openma/base/macros.h" // _OPENMA_CONSTEXPR, _OPENMA_NOEXCEPT 27 | 28 | #include "openma/math/forwarddeclarations.h" 29 | #include "openma/math/traits.h" 30 | #include "openma/math/xprbase.h" 31 | #include "openma/math/arraybase.h" 32 | #include "openma/math/array.h" 33 | #include "openma/math/map.h" 34 | #include "openma/math/returnbyvalue.h" 35 | #include "openma/math/blockop.h" 36 | #include "openma/math/utils.h" // Must be included before the operations 37 | #include "openma/math/unaryop.h" 38 | #include "openma/math/binaryop.h" 39 | 40 | #endif // __openma_math_h -------------------------------------------------------------------------------- /modules/math/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | # IF(BUILD_MATLAB_BINDINGS) 4 | # ADD_SUBDIRECTORY("matlab") 5 | # ENDIF() 6 | # 7 | # IF(BUILD_PYTHON_BINDINGS) 8 | # ADD_SUBDIRECTORY("python") 9 | # ENDIF() -------------------------------------------------------------------------------- /modules/math/test/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_CXX_CXXTEST_DRIVER(openma_math_array arrayTest.cpp math) 2 | ADD_CXX_CXXTEST_DRIVER(openma_math_pose poseTest.cpp math) 3 | ADD_CXX_CXXTEST_DRIVER(openma_math_map mapTest.cpp math) 4 | ADD_CXX_CXXTEST_DRIVER(openma_math_blockop blockopTest.cpp math) 5 | ADD_CXX_CXXTEST_DRIVER(openma_math_mix mixTest.cpp math) 6 | 7 | # To have access to the symbol M_PI 8 | SET_TARGET_PROPERTIES(test_openma_math_pose PROPERTIES COMPILE_DEFINITIONS "_USE_MATH_DEFINES") -------------------------------------------------------------------------------- /modules/processing/CmakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENMA_BODY_SRCS 2 | src/_processing.cpp 3 | ) 4 | 5 | ADD_LIBRARY(processing ${OPENMA_LIBS_BUILD_TYPE} ${OPENMA_BODY_SRCS}) 6 | TARGET_LINK_LIBRARIES(processing base math) 7 | TARGET_INCLUDE_DIRECTORIES(processing PUBLIC 8 | $ 9 | $ 10 | $ 11 | ) 12 | GENERATE_EXPORT_HEADER(processing 13 | BASE_NAME OPENMA_PROCESSING 14 | EXPORT_FILE_NAME include/openma/processing_export.h) 15 | 16 | SET_TARGET_PROPERTIES(processing PROPERTIES ${OPENMA_LIBRARY_PROPERTIES}) 17 | IF (NOT ${OPENMA_BUILD_SHARED_LIBS}) 18 | SET_TARGET_PROPERTIES(processing PROPERTIES COMPILE_FLAGS -DOPENMA_PROCESSING_STATIC_DEFINE) 19 | ENDIF() 20 | 21 | IF(BUILD_LANGUAGE_BINDINGS) 22 | ADD_SUBDIRECTORY(swig) 23 | ENDIF() 24 | 25 | IF(BUILD_UNIT_TESTS) 26 | ADD_SUBDIRECTORY(test) 27 | ENDIF() 28 | 29 | INSTALL(TARGETS processing EXPORT OpenMATargets 30 | LIBRARY DESTINATION lib 31 | ARCHIVE DESTINATION lib 32 | RUNTIME DESTINATION bin 33 | ) 34 | INSTALL(DIRECTORY include ${CMAKE_CURRENT_BINARY_DIR}/include 35 | DESTINATION . 36 | PATTERN "_p.h" EXCLUDE 37 | ) -------------------------------------------------------------------------------- /modules/processing/doc/processing.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * @defgroup openma_processing ma::processing 3 | * @brief Data processing algorithms. 4 | * 5 | * This module corresponds to the library @c openma_processing. It uses the nested namespace @c processing. As a consequence all the types proposed in this module use the @c ma::processing namespace. 6 | * 7 | * The main goal of this module is to gives high level functions and classes to process data (e.g Butterworth zero lag filter). 8 | * 9 | * @todo Details the goal and usage or ma::processing. 10 | */ -------------------------------------------------------------------------------- /modules/processing/swig/processing_matlab.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/matlab.swg" 36 | -------------------------------------------------------------------------------- /modules/processing/swig/processing_python.i: -------------------------------------------------------------------------------- 1 | /* 2 | * Open Source Movement Analysis Library 3 | * Copyright (C) 2016, Moveck Solution Inc., all rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * * Redistributions of source code must retain the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer. 12 | * * Redistributions in binary form must reproduce the above 13 | * copyright notice, this list of conditions and the following 14 | * disclaimer in the documentation and/or other materials 15 | * provided with the distribution. 16 | * * Neither the name(s) of the copyright holders nor the names 17 | * of its contributors may be used to endorse or promote products 18 | * derived from this software without specific prior written 19 | * permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | %include "openma/python.swg" -------------------------------------------------------------------------------- /modules/processing/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY("c++") 2 | 3 | IF(BUILD_MATLAB_BINDINGS) 4 | ADD_SUBDIRECTORY("matlab") 5 | ENDIF() 6 | 7 | IF(BUILD_PYTHON_BINDINGS) 8 | ADD_SUBDIRECTORY("python") 9 | ENDIF() -------------------------------------------------------------------------------- /modules/processing/test/c++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_CXX_CXXTEST_DRIVER(openma_processing_butterzerolaglowpass butterzerolaglowpassTest.cpp processing) -------------------------------------------------------------------------------- /modules/processing/test/matlab/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(TOOLBOX_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/matlab/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(MTD_DIRS ${TOOLBOX_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_MATLAB_UNITTEST_DRIVER(matlab_processing ProcessingTest.m INCLUDES ${MTD_DIRS}) -------------------------------------------------------------------------------- /modules/processing/test/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PACKAGE_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}/swig/python/openma") 2 | SET(TESTS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") 3 | SET(PTD_DIRS ${PACKAGE_DIRECTORY} ${TESTS_DIRECTORY}) 4 | 5 | ADD_PYTHON_UNITTEST_DRIVER(python_processing processingTest INCLUDES ${PTD_DIRS}) --------------------------------------------------------------------------------