dot_row.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>
  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_DOT_ROW_H
  9. #define IGL_DOT_ROW_H
  10. #include "igl/igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Compute the dot product between each row of A and B
  15. // Templates:
  16. // DerivedV derived from vertex positions matrix type: i.e. MatrixXd
  17. // Inputs:
  18. // A eigen matrix r by c
  19. // B eigen matrix r by c
  20. // Returns:
  21. // d a column vector with r entries that contains the dot product of each corresponding row of A and B
  22. //
  23. template <typename DerivedV>
  24. IGL_INLINE Eigen::PlainObjectBase<DerivedV> dot_row(
  25. const Eigen::PlainObjectBase<DerivedV>& A,
  26. const Eigen::PlainObjectBase<DerivedV>& B);
  27. }
  28. #ifndef IGL_STATIC_LIBRARY
  29. # include "dot_row.cpp"
  30. #endif
  31. #endif