sortrows.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. #include "sortrows.h"
  9. #include "get_seconds.h"
  10. #include "SortableRow.h"
  11. #include "sort.h"
  12. #include "colon.h"
  13. #include "IndexComparison.h"
  14. #include <vector>
  15. // Obsolete slower version converst to vector
  16. //template <typename DerivedX, typename DerivedIX>
  17. //IGL_INLINE void igl::sortrows(
  18. // const Eigen::DenseBase<DerivedX>& X,
  19. // const bool ascending,
  20. // Eigen::PlainObjectBase<DerivedX>& Y,
  21. // Eigen::PlainObjectBase<DerivedIX>& IX)
  22. //{
  23. // using namespace std;
  24. // typedef Eigen::Matrix<typename DerivedX::Scalar, Eigen::Dynamic, 1> RowVector;
  25. // vector<SortableRow<RowVector> > rows;
  26. // rows.resize(X.rows());
  27. // // Loop over rows
  28. // for(int i = 0;i<X.rows();i++)
  29. // {
  30. // RowVector ri = X.row(i);
  31. // rows[i] = SortableRow<RowVector>(ri);
  32. // }
  33. // vector<SortableRow<RowVector> > sorted;
  34. // std::vector<size_t> index_map;
  35. // // Perform sort on rows
  36. // igl::sort(rows,ascending,sorted,index_map);
  37. // // Resize output
  38. // Y.resizeLike(X);
  39. // IX.resize(X.rows(),1);
  40. // // Convert to eigen
  41. // for(int i = 0;i<X.rows();i++)
  42. // {
  43. // Y.row(i) = sorted[i].data;
  44. // IX(i,0) = index_map[i];
  45. // }
  46. //}
  47. template <typename DerivedX, typename DerivedY, typename DerivedIX>
  48. IGL_INLINE void igl::sortrows(
  49. const Eigen::DenseBase<DerivedX>& X,
  50. const bool ascending,
  51. Eigen::PlainObjectBase<DerivedY>& Y,
  52. Eigen::PlainObjectBase<DerivedIX>& IX)
  53. {
  54. // This is already 2x faster than matlab's builtin `sortrows`. I have tried
  55. // implementing a "multiple-pass" sort on each column, but see no performance
  56. // improvement.
  57. // Resize output
  58. const size_t num_rows = X.rows();
  59. const size_t num_cols = X.cols();
  60. Y.resize(num_rows,num_cols);
  61. IX.resize(num_rows,1);
  62. for(int i = 0;i<num_rows;i++)
  63. {
  64. IX(i) = i;
  65. }
  66. if (ascending) {
  67. auto index_less_than = [&X, num_cols](size_t i, size_t j) {
  68. for (size_t c=0; c<num_cols; c++) {
  69. if (X.coeff(i, c) < X.coeff(j, c)) return true;
  70. else if (X.coeff(j,c) < X.coeff(i,c)) return false;
  71. }
  72. return false;
  73. };
  74. std::sort(
  75. IX.data(),
  76. IX.data()+IX.size(),
  77. index_less_than
  78. );
  79. } else {
  80. auto index_greater_than = [&X, num_cols](size_t i, size_t j) {
  81. for (size_t c=0; c<num_cols; c++) {
  82. if (X.coeff(i, c) > X.coeff(j, c)) return true;
  83. else if (X.coeff(j,c) > X.coeff(i,c)) return false;
  84. }
  85. return false;
  86. };
  87. std::sort(
  88. IX.data(),
  89. IX.data()+IX.size(),
  90. index_greater_than
  91. );
  92. }
  93. for (size_t j=0; j<num_cols; j++) {
  94. for(int i = 0;i<num_rows;i++)
  95. {
  96. Y(i,j) = X(IX(i), j);
  97. }
  98. }
  99. }
  100. template <typename DerivedX, typename DerivedY>
  101. IGL_INLINE void igl::sortrows(
  102. const Eigen::DenseBase<DerivedX>& X,
  103. const bool ascending,
  104. Eigen::PlainObjectBase<DerivedY>& Y)
  105. {
  106. Eigen::Matrix<int, DerivedX::RowsAtCompileTime, 1> I;
  107. return igl::sortrows(X,ascending,Y,I);
  108. }
  109. #ifdef IGL_STATIC_LIBRARY
  110. // Explicit template instantiation
  111. // generated by autoexplicit.sh
  112. template void igl::sortrows<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  113. // generated by autoexplicit.sh
  114. template void igl::sortrows<Eigen::Matrix<int, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  115. // generated by autoexplicit.sh
  116. template void igl::sortrows<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  117. // generated by autoexplicit.sh
  118. template void igl::sortrows<Eigen::Matrix<double, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 1, -1, -1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  119. // generated by autoexplicit.sh
  120. template void igl::sortrows<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::DenseBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  121. template void igl::sortrows<Eigen::Matrix<int, 12, 12, 0, 12, 12>,Eigen::Matrix<int, 12, 12, 0, 12, 12>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, 12, 12, 0, 12, 12> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, 12, 12, 0, 12, 12> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  122. template void igl::sortrows<Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  123. template void igl::sortrows<Eigen::Matrix<int, 12, 12, 0, 12, 12>,Eigen::Matrix<int, 12, 12, 0, 12, 12>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, 12, 12, 0, 12, 12> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, 12, 12, 0, 12, 12> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  124. template void igl::sortrows<Eigen::Matrix<unsigned int, -1, -1, 0, -1, -1>,Eigen::Matrix<unsigned int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<unsigned int, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  125. template void igl::sortrows<Eigen::Matrix<float, -1, -1, 0, -1, -1>,Eigen::Matrix<float, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>>(Eigen::DenseBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &);
  126. template void igl::sortrows<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>,Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  127. template void igl::sortrows<Eigen::Matrix<int, -1, 3, 0, -1, 3>,Eigen::Matrix<int, -1, 3, 0, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  128. template void igl::sortrows<Eigen::Matrix<int, -1, 3, 1, -1, 3>,Eigen::Matrix<int, -1, 3, 1, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  129. template void igl::sortrows<Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  130. template void igl::sortrows<Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<long long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<long long, -1, 1, 0, -1, 1> > &);
  131. template void igl::sortrows<Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<long long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<long long, -1, 1, 0, -1, 1> > &);
  132. template void igl::sortrows<Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  133. template void igl::sortrows<Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<int, -1, 4, 0, -1, 4>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 4, 0, -1, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  134. template void igl::sortrows<Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<int, 12, 4, 0, 12, 4>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, 12, 4, 0, 12, 4> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  135. template void igl::sortrows<Eigen::Matrix<int, -1, 1, 0, -1, 1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  136. template void igl::sortrows<Eigen::Matrix<double, -1, 3, 1, -1, 3>,Eigen::Matrix<double, -1, 3, 1, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  137. template void igl::sortrows<Eigen::Matrix<float, -1, 3, 0, -1, 3>,Eigen::Matrix<float, -1, 3, 0, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  138. template void igl::sortrows<Eigen::Matrix<float, -1, 3, 1, -1, 3>,Eigen::Matrix<float, -1, 3, 1, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  139. template void igl::sortrows<Eigen::Matrix<double, -1, 3, 0, -1, 3>,Eigen::Matrix<double, -1, 3, 0, -1, 3>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  140. template void igl::sortrows<Eigen::Matrix<double, -1, -1, 1, -1, -1>,Eigen::Matrix<double, -1, -1, 1, -1, -1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 1, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 1, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  141. template void igl::sortrows<Eigen::Matrix<int, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  142. template void igl::sortrows<Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  143. template void igl::sortrows<Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  144. template void igl::sortrows<Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &);
  145. template void igl::sortrows<Eigen::Matrix<double, -1, 3, 0, -1, 3>,Eigen::Matrix<double, -1, 3, 0, -1, 3>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  146. template void igl::sortrows<Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<double, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  147. template void igl::sortrows<Eigen::Matrix<int, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 2, 0, -1, 2>,Eigen::Matrix<int, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > &);
  148. template void igl::sortrows<Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>,Eigen::Matrix<int, -1, -1, 0, -1, -1>>(Eigen::DenseBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > &);
  149. template void igl::sortrows<Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<double, -1, -1, 0, -1, -1>,Eigen::Matrix<long, -1, 1, 0, -1, 1>>(Eigen::DenseBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > &, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> > &);
  150. template void igl::sortrows<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::DenseBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
  151. #ifdef WIN32
  152. template void igl::sortrows<Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<__int64,-1,1,0,-1,1>>(Eigen::DenseBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > &, Eigen::PlainObjectBase<Eigen::Matrix<__int64,-1,1,0,-1,1> > &);
  153. template void igl::sortrows<Eigen::Matrix<int,-1,2,0,-1,2>,Eigen::Matrix<int,-1,2,0,-1,2>,Eigen::Matrix<__int64,-1,1,0,-1,1>>(Eigen::DenseBase<Eigen::Matrix<int,-1,2,0,-1,2> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<int,-1,2,0,-1,2> > &, Eigen::PlainObjectBase<Eigen::Matrix<__int64,-1,1,0,-1,1> > &);
  154. template void igl::sortrows<Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<__int64,-1,1,0,-1,1>>(Eigen::DenseBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > &, Eigen::PlainObjectBase<Eigen::Matrix<__int64,-1,1,0,-1,1> > &);
  155. template void igl::sortrows<Eigen::Matrix<double,-1,3,0,-1,3>,Eigen::Matrix<double,-1,3,0,-1,3>,Eigen::Matrix<__int64,-1,1,0,-1,1>>(Eigen::DenseBase<Eigen::Matrix<double,-1,3,0,-1,3> > const &, bool, Eigen::PlainObjectBase<Eigen::Matrix<double,-1,3,0,-1,3> > &, Eigen::PlainObjectBase<Eigen::Matrix<__int64,-1,1,0,-1,1> > &);
  156. #endif
  157. #endif