covariance_scatter_matrix.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_COVARIANCE_SCATTER_MATRIX_H
  9. #define IGL_COVARIANCE_SCATTER_MATRIX_H
  10. #include "igl_inline.h"
  11. #include "ARAPEnergyType.h"
  12. #include <Eigen/Dense>
  13. #include <Eigen/Sparse>
  14. namespace igl
  15. {
  16. /// Construct the covariance scatter matrix for a given arap energy
  17. ///
  18. /// @param[in] V #V by Vdim list of initial domain positions
  19. /// @param[in] F #F by 3 list of triangle indices into V
  20. /// @param[in] energy ARAPEnergyType enum value defining which energy is being used.
  21. /// See ARAPEnergyType.h for valid options and explanations.
  22. /// @param[out] CSM dim*#V/#F by dim*#V sparse matrix containing special laplacians along
  23. /// the diagonal so that when multiplied by V gives covariance matrix
  24. /// elements, can be used to speed up covariance matrix computation
  25. ///
  26. /// \see arap_linear_block, arap, ARAPEnergyType
  27. IGL_INLINE void covariance_scatter_matrix(
  28. const Eigen::MatrixXd & V,
  29. const Eigen::MatrixXi & F,
  30. const ARAPEnergyType energy,
  31. Eigen::SparseMatrix<double>& CSM);
  32. }
  33. #ifndef IGL_STATIC_LIBRARY
  34. #include "covariance_scatter_matrix.cpp"
  35. #endif
  36. #endif