outer_hull.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. #include "outer_hull.h"
  2. #include "outer_facet.h"
  3. #include "sortrows.h"
  4. #include "facet_components.h"
  5. #include "winding_number.h"
  6. #include "triangle_triangle_adjacency.h"
  7. #include "unique_edge_map.h"
  8. #include "barycenter.h"
  9. #include "per_face_normals.h"
  10. #include <Eigen/Geometry>
  11. #include <vector>
  12. #include <map>
  13. #include <queue>
  14. #include <iostream>
  15. //#define IGL_OUTER_HULL_DEBUG
  16. template <
  17. typename DerivedV,
  18. typename DerivedF,
  19. typename DerivedN,
  20. typename DerivedG,
  21. typename DerivedJ,
  22. typename Derivedflip>
  23. IGL_INLINE void igl::outer_hull(
  24. const Eigen::PlainObjectBase<DerivedV> & V,
  25. const Eigen::PlainObjectBase<DerivedF> & F,
  26. const Eigen::PlainObjectBase<DerivedN> & N,
  27. Eigen::PlainObjectBase<DerivedG> & G,
  28. Eigen::PlainObjectBase<DerivedJ> & J,
  29. Eigen::PlainObjectBase<Derivedflip> & flip)
  30. {
  31. using namespace Eigen;
  32. using namespace std;
  33. using namespace igl;
  34. typedef typename DerivedF::Index Index;
  35. Matrix<Index,DerivedF::RowsAtCompileTime,1> C;
  36. typedef Matrix<typename DerivedV::Scalar,Dynamic,DerivedV::ColsAtCompileTime> MatrixXV;
  37. typedef Matrix<typename DerivedF::Scalar,Dynamic,DerivedF::ColsAtCompileTime> MatrixXF;
  38. typedef Matrix<typename DerivedG::Scalar,Dynamic,DerivedG::ColsAtCompileTime> MatrixXG;
  39. typedef Matrix<typename DerivedJ::Scalar,Dynamic,DerivedJ::ColsAtCompileTime> MatrixXJ;
  40. typedef Matrix<typename DerivedN::Scalar,1,3> RowVector3N;
  41. const Index m = F.rows();
  42. #ifdef IGL_OUTER_HULL_DEBUG
  43. cout<<"outer hull..."<<endl;
  44. #endif
  45. #ifdef IGL_OUTER_HULL_DEBUG
  46. cout<<"edge map..."<<endl;
  47. #endif
  48. typedef Matrix<typename DerivedF::Scalar,Dynamic,2> MatrixX2I;
  49. typedef Matrix<typename DerivedF::Index,Dynamic,1> VectorXI;
  50. MatrixX2I E,uE;
  51. VectorXI EMAP;
  52. vector<vector<typename DerivedF::Index> > uE2E;
  53. unique_edge_map(F,E,uE,EMAP,uE2E);
  54. // TODO:
  55. // uE --> face-edge index, sorted CCW around edge according to normal
  56. // uE --> sorted order index
  57. // uE --> bool, whether needed to flip face to make "consistent" with unique
  58. // edge
  59. // Place order of each half-edge in its corresponding sorted list around edge
  60. VectorXI diIM(3*m);
  61. // Whether face's edge used for sorting is consistent with unique edge
  62. VectorXI dicons(3*m);
  63. // dihedral angles of faces around edge with face of edge in dicons
  64. vector<vector<typename DerivedV::Scalar> > di(uE2E.size());
  65. // For each list of face-edges incide on a unique edge
  66. for(size_t ui = 0;ui<(size_t)uE.rows();ui++)
  67. {
  68. // Base normal vector to orient against
  69. const auto fe0 = uE2E[ui][0];
  70. const RowVector3N & eVp = N.row(fe0%m);
  71. MatrixXd di_I(uE2E[ui].size(),2);
  72. const typename DerivedF::Scalar d = F(fe0%m,((fe0/m)+2)%3);
  73. const typename DerivedF::Scalar s = F(fe0%m,((fe0/m)+1)%3);
  74. // Edge vector
  75. const auto & eV = (V.row(d)-V.row(s)).normalized();
  76. vector<bool> cons(uE2E[ui].size());
  77. // Loop over incident face edges
  78. for(size_t fei = 0;fei<uE2E[ui].size();fei++)
  79. {
  80. const auto & fe = uE2E[ui][fei];
  81. const auto f = fe % m;
  82. const auto c = fe / m;
  83. // source should match destination to be consistent
  84. cons[fei] = (d == F(f,(c+1)%3));
  85. assert( cons[fei] || (d == F(f,(c+2)%3)));
  86. assert(!cons[fei] || (s == F(f,(c+2)%3)));
  87. assert(!cons[fei] || (d == F(f,(c+1)%3)));
  88. // Angle between n and f
  89. const RowVector3N & n = N.row(f);
  90. di_I(fei,0) = M_PI - atan2( eVp.cross(n).dot(eV), eVp.dot(n));
  91. if(!cons[fei])
  92. {
  93. di_I(fei,0) = di_I(fei,0) + M_PI;
  94. if(di_I(fei,0)>=2.*M_PI)
  95. {
  96. di_I(fei,0) = di_I(fei,0) - 2.*M_PI;
  97. }
  98. }
  99. di_I(fei,1) = f;
  100. }
  101. VectorXi IM;
  102. //igl::sort(di[ui],true,di[ui],IM);
  103. // Sort, but break ties using index to ensure that duplicates always show
  104. // up in same order.
  105. MatrixXd s_di_I;
  106. igl::sortrows(di_I,true,s_di_I,IM);
  107. di[ui].resize(uE2E[ui].size());
  108. for(size_t i = 0;i<di[ui].size();i++)
  109. {
  110. di[ui][i] = s_di_I(i,0);
  111. }
  112. // copy old list
  113. vector<typename DerivedF::Index> temp = uE2E[ui];
  114. for(size_t fei = 0;fei<uE2E[ui].size();fei++)
  115. {
  116. uE2E[ui][fei] = temp[IM(fei)];
  117. const auto & fe = uE2E[ui][fei];
  118. diIM(fe) = fei;
  119. dicons(fe) = cons[IM(fei)];
  120. }
  121. }
  122. vector<vector<vector<Index > > > TT,_1;
  123. triangle_triangle_adjacency(E,EMAP,uE2E,false,TT,_1);
  124. VectorXI counts;
  125. #ifdef IGL_OUTER_HULL_DEBUG
  126. cout<<"facet components..."<<endl;
  127. #endif
  128. facet_components(TT,C,counts);
  129. assert(C.maxCoeff()+1 == counts.rows());
  130. const size_t ncc = counts.rows();
  131. G.resize(0,F.cols());
  132. J.resize(0,1);
  133. flip.setConstant(m,1,false);
  134. #ifdef IGL_OUTER_HULL_DEBUG
  135. cout<<"reindex..."<<endl;
  136. #endif
  137. // H contains list of faces on outer hull;
  138. vector<bool> FH(m,false);
  139. vector<bool> EH(3*m,false);
  140. vector<MatrixXG> vG(ncc);
  141. vector<MatrixXJ> vJ(ncc);
  142. vector<MatrixXJ> vIM(ncc);
  143. for(size_t id = 0;id<ncc;id++)
  144. {
  145. vIM[id].resize(counts[id],1);
  146. }
  147. // current index into each IM
  148. vector<size_t> g(ncc,0);
  149. // place order of each face in its respective component
  150. for(Index f = 0;f<m;f++)
  151. {
  152. vIM[C(f)](g[C(f)]++) = f;
  153. }
  154. #ifdef IGL_OUTER_HULL_DEBUG
  155. cout<<"barycenters..."<<endl;
  156. #endif
  157. // assumes that "resolve" has handled any coplanar cases correctly and nearly
  158. // coplanar cases can be sorted based on barycenter.
  159. MatrixXV BC;
  160. barycenter(V,F,BC);
  161. #ifdef IGL_OUTER_HULL_DEBUG
  162. cout<<"loop over CCs (="<<ncc<<")..."<<endl;
  163. #endif
  164. for(Index id = 0;id<(Index)ncc;id++)
  165. {
  166. auto & IM = vIM[id];
  167. // starting face that's guaranteed to be on the outer hull and in this
  168. // component
  169. int f;
  170. bool f_flip;
  171. #ifdef IGL_OUTER_HULL_DEBUG
  172. cout<<"outer facet..."<<endl;
  173. #endif
  174. outer_facet(V,F,N,IM,f,f_flip);
  175. #ifdef IGL_OUTER_HULL_DEBUG
  176. cout<<"outer facet: "<<f<<endl;
  177. #endif
  178. int FHcount = 0;
  179. // Q contains list of face edges to continue traversing upong
  180. queue<int> Q;
  181. Q.push(f+0*m);
  182. Q.push(f+1*m);
  183. Q.push(f+2*m);
  184. flip(f) = f_flip;
  185. //cout<<"flip("<<f<<") = "<<(flip(f)?"true":"false")<<endl;
  186. #ifdef IGL_OUTER_HULL_DEBUG
  187. cout<<"BFS..."<<endl;
  188. #endif
  189. while(!Q.empty())
  190. {
  191. // face-edge
  192. const int e = Q.front();
  193. Q.pop();
  194. // face
  195. const int f = e%m;
  196. // corner
  197. const int c = e/m;
  198. // Should never see edge again...
  199. if(EH[e] == true)
  200. {
  201. continue;
  202. }
  203. EH[e] = true;
  204. // first time seeing face
  205. if(!FH[f])
  206. {
  207. //#ifdef IGL_OUTER_HULL_DEBUG
  208. // cout<<(f+1)<<endl;
  209. //#endif
  210. FH[f] = true;
  211. FHcount++;
  212. }
  213. // source of edge according to f
  214. const int fs = flip(f)?F(f,(c+2)%3):F(f,(c+1)%3);
  215. // destination of edge according to f
  216. const int fd = flip(f)?F(f,(c+1)%3):F(f,(c+2)%3);
  217. // edge valence
  218. const size_t val = uE2E[EMAP(e)].size();
  219. //// find overlapping face-edges
  220. //const auto & neighbors = uE2E[EMAP(e)];
  221. //// normal after possible flipping
  222. //const auto & fN = (flip(f)?-1.:1.)*N.row(f);
  223. //// Edge vector according to f's (flipped) orientation.
  224. ////const auto & eV = (V.row(fd)-V.row(fs)).normalized();
  225. //#warning "EXPERIMENTAL, DO NOT USE"
  226. //// THIS IS WRONG! The first face is---after sorting---no longer the face
  227. //// used for orienting the sort.
  228. //const auto ui = EMAP(e);
  229. //const auto fe0 = uE2E[ui][0];
  230. //const auto es = F(fe0%m,((fe0/m)+1)%3);
  231. // is edge consistent with edge of face used for sorting
  232. const int e_cons = (dicons(e) ? 1: -1);
  233. int nfei = -1;
  234. // Loop once around trying to find suitable next face
  235. for(size_t step = 1; step<val+2;step++)
  236. {
  237. nfei = (diIM(e) + 2*val + e_cons*step*(flip(f)?-1:1))%val;
  238. #ifdef IGL_OUTER_HULL_DEBUG
  239. const int nf = uE2E[EMAP(e)][nfei] % m;
  240. #endif
  241. // Don't consider faces with identical dihedral angles
  242. if(di[EMAP(e)][diIM(e)] != di[EMAP(e)][nfei])
  243. //#warning "THIS IS HACK, FIX ME"
  244. // if( abs(di[EMAP(e)][diIM(e)] - di[EMAP(e)][nfei]) < 1e-16 )
  245. {
  246. //#ifdef IGL_OUTER_HULL_DEBUG
  247. // cout<<"Next facet: "<<(f+1)<<" --> "<<(nf+1)<<", |"<<
  248. // di[EMAP(e)][diIM(e)]<<" - "<<di[EMAP(e)][nfei]<<"| = "<<
  249. // abs(di[EMAP(e)][diIM(e)] - di[EMAP(e)][nfei])
  250. // <<endl;
  251. //#endif
  252. break;
  253. }
  254. #ifdef IGL_OUTER_HULL_DEBUG
  255. cout<<"Skipping co-planar facet: "<<(f+1)<<" --> "<<(nf+1)<<endl;
  256. #endif
  257. }
  258. const int max_ne_2 = uE2E[EMAP(e)][nfei];
  259. int max_ne = -1;
  260. //// Loop over and find max dihedral angle
  261. //typename DerivedV::Scalar max_di = -1;
  262. //for(const auto & ne : neighbors)
  263. //{
  264. // const int nf = ne%m;
  265. // if(nf == f)
  266. // {
  267. // continue;
  268. // }
  269. // // Corner of neighbor
  270. // const int nc = ne/m;
  271. // // Is neighbor oriented consistently with (flipped) f?
  272. // //const int ns = F(nf,(nc+1)%3);
  273. // const int nd = F(nf,(nc+2)%3);
  274. // const bool cons = (flip(f)?fd:fs) == nd;
  275. // // Normal after possibly flipping to match flip or orientation of f
  276. // const auto & nN = (cons? (flip(f)?-1:1.) : (flip(f)?1.:-1.) )*N.row(nf);
  277. // // Angle between n and f
  278. // const auto & ndi = M_PI - atan2( fN.cross(nN).dot(eV), fN.dot(nN));
  279. // if(ndi>=max_di)
  280. // {
  281. // max_ne = ne;
  282. // max_di = ndi;
  283. // }
  284. //}
  285. ////cout<<(max_ne != max_ne_2)<<" =?= "<<e_cons<<endl;
  286. //if(max_ne != max_ne_2)
  287. //{
  288. // cout<<(f+1)<<" ---> "<<(max_ne%m)+1<<" != "<<(max_ne_2%m)+1<<" ... "<<e_cons<<" "<<flip(f)<<endl;
  289. // typename DerivedV::Scalar max_di = -1;
  290. // for(size_t nei = 0;nei<neighbors.size();nei++)
  291. // {
  292. // const auto & ne = neighbors[nei];
  293. // const int nf = ne%m;
  294. // if(nf == f)
  295. // {
  296. // cout<<" "<<(ne%m)+1<<":\t"<<0<<"\t"<<di[EMAP[e]][nei]<<" "<<diIM(ne)<<endl;
  297. // continue;
  298. // }
  299. // // Corner of neighbor
  300. // const int nc = ne/m;
  301. // // Is neighbor oriented consistently with (flipped) f?
  302. // //const int ns = F(nf,(nc+1)%3);
  303. // const int nd = F(nf,(nc+2)%3);
  304. // const bool cons = (flip(f)?fd:fs) == nd;
  305. // // Normal after possibly flipping to match flip or orientation of f
  306. // const auto & nN = (cons? (flip(f)?-1:1.) : (flip(f)?1.:-1.) )*N.row(nf);
  307. // // Angle between n and f
  308. // const auto & ndi = M_PI - atan2( fN.cross(nN).dot(eV), fN.dot(nN));
  309. // cout<<" "<<(ne%m)+1<<":\t"<<ndi<<"\t"<<di[EMAP[e]][nei]<<" "<<diIM(ne)<<endl;
  310. // if(ndi>=max_di)
  311. // {
  312. // max_ne = ne;
  313. // max_di = ndi;
  314. // }
  315. // }
  316. //}
  317. max_ne = max_ne_2;
  318. if(max_ne>=0)
  319. {
  320. // face of neighbor
  321. const int nf = max_ne%m;
  322. // corner of neighbor
  323. const int nc = max_ne/m;
  324. const int nd = F(nf,(nc+2)%3);
  325. const bool cons = (flip(f)?fd:fs) == nd;
  326. flip(nf) = (cons ? flip(f) : !flip(f));
  327. //cout<<"flip("<<nf<<") = "<<(flip(nf)?"true":"false")<<endl;
  328. const int ne1 = nf+((nc+1)%3)*m;
  329. const int ne2 = nf+((nc+2)%3)*m;
  330. if(!EH[ne1])
  331. {
  332. Q.push(ne1);
  333. }
  334. if(!EH[ne2])
  335. {
  336. Q.push(ne2);
  337. }
  338. }
  339. }
  340. {
  341. vG[id].resize(FHcount,3);
  342. vJ[id].resize(FHcount,1);
  343. //nG += FHcount;
  344. size_t h = 0;
  345. assert(counts(id) == IM.rows());
  346. for(int i = 0;i<counts(id);i++)
  347. {
  348. const size_t f = IM(i);
  349. //if(f_flip)
  350. //{
  351. // flip(f) = !flip(f);
  352. //}
  353. if(FH[f])
  354. {
  355. vG[id].row(h) = (flip(f)?F.row(f).reverse().eval():F.row(f));
  356. vJ[id](h,0) = f;
  357. h++;
  358. }
  359. }
  360. assert((int)h == FHcount);
  361. }
  362. }
  363. // Is A inside B? Assuming A and B are consistently oriented but closed and
  364. // non-intersecting.
  365. const auto & is_component_inside_other = [](
  366. const Eigen::PlainObjectBase<DerivedV> & V,
  367. const MatrixXV & BC,
  368. const MatrixXG & A,
  369. const MatrixXJ & AJ,
  370. const MatrixXG & B)->bool
  371. {
  372. const auto & bounding_box = [](
  373. const Eigen::PlainObjectBase<DerivedV> & V,
  374. const MatrixXG & F)->
  375. MatrixXV
  376. {
  377. MatrixXV BB(2,3);
  378. BB<<
  379. 1e26,1e26,1e26,
  380. -1e26,-1e26,-1e26;
  381. const size_t m = F.rows();
  382. for(size_t f = 0;f<m;f++)
  383. {
  384. for(size_t c = 0;c<3;c++)
  385. {
  386. const auto & vfc = V.row(F(f,c));
  387. BB.row(0) = BB.row(0).array().min(vfc.array()).eval();
  388. BB.row(1) = BB.row(1).array().max(vfc.array()).eval();
  389. }
  390. }
  391. return BB;
  392. };
  393. // A lot of the time we're dealing with unrelated, distant components: cull
  394. // them.
  395. MatrixXV ABB = bounding_box(V,A);
  396. MatrixXV BBB = bounding_box(V,B);
  397. if( (BBB.row(0)-ABB.row(1)).maxCoeff()>0 ||
  398. (ABB.row(0)-BBB.row(1)).maxCoeff()>0 )
  399. {
  400. // bounding boxes do not overlap
  401. return false;
  402. }
  403. ////////////////////////////////////////////////////////////////////////
  404. // POTENTIAL ROBUSTNESS WEAK AREA
  405. ////////////////////////////////////////////////////////////////////////
  406. //
  407. // q could be so close (<~1e-16) to B that the winding number is not a robust way to
  408. // determine inside/outsideness. We could try to find a _better_ q which is
  409. // farther away, but couldn't they all be bad?
  410. MatrixXV q = BC.row(AJ(0));
  411. // In a perfect world, it's enough to test a single point.
  412. double w;
  413. // winding_number_3 expects colmajor
  414. const typename DerivedV::Scalar * Vdata;
  415. Vdata = V.data();
  416. Matrix<
  417. typename DerivedV::Scalar,
  418. DerivedV::RowsAtCompileTime,
  419. DerivedV::ColsAtCompileTime,
  420. ColMajor> Vcol;
  421. if(DerivedV::IsRowMajor)
  422. {
  423. // copy to convert to colmajor
  424. Vcol = V;
  425. Vdata = Vcol.data();
  426. }
  427. winding_number_3(
  428. Vdata,V.rows(),
  429. B.data(),B.rows(),
  430. q.data(),1,&w);
  431. return fabs(w)>0.5;
  432. };
  433. // Reject components which are completely inside other components
  434. vector<bool> keep(ncc,true);
  435. size_t nG = 0;
  436. // This is O( ncc * ncc * m)
  437. for(size_t id = 0;id<ncc;id++)
  438. {
  439. for(size_t oid = 0;oid<ncc;oid++)
  440. {
  441. if(id == oid)
  442. {
  443. continue;
  444. }
  445. const bool inside = is_component_inside_other(V,BC,vG[id],vJ[id],vG[oid]);
  446. #ifdef IGL_OUTER_HULL_DEBUG
  447. cout<<id<<" is inside "<<oid<<" ? "<<inside<<endl;
  448. #endif
  449. keep[id] = keep[id] && !inside;
  450. }
  451. if(keep[id])
  452. {
  453. nG += vJ[id].rows();
  454. }
  455. }
  456. // collect G and J across components
  457. G.resize(nG,3);
  458. J.resize(nG,1);
  459. {
  460. size_t off = 0;
  461. for(Index id = 0;id<(Index)ncc;id++)
  462. {
  463. if(keep[id])
  464. {
  465. assert(vG[id].rows() == vJ[id].rows());
  466. G.block(off,0,vG[id].rows(),vG[id].cols()) = vG[id];
  467. J.block(off,0,vJ[id].rows(),vJ[id].cols()) = vJ[id];
  468. off += vG[id].rows();
  469. }
  470. }
  471. }
  472. }
  473. template <
  474. typename DerivedV,
  475. typename DerivedF,
  476. typename DerivedG,
  477. typename DerivedJ,
  478. typename Derivedflip>
  479. IGL_INLINE void igl::outer_hull(
  480. const Eigen::PlainObjectBase<DerivedV> & V,
  481. const Eigen::PlainObjectBase<DerivedF> & F,
  482. Eigen::PlainObjectBase<DerivedG> & G,
  483. Eigen::PlainObjectBase<DerivedJ> & J,
  484. Eigen::PlainObjectBase<Derivedflip> & flip)
  485. {
  486. Eigen::Matrix<typename DerivedV::Scalar,DerivedF::RowsAtCompileTime,3> N;
  487. per_face_normals(V,F,N);
  488. return outer_hull(V,F,N,G,J,flip);
  489. }
  490. #ifdef IGL_STATIC_LIBRARY
  491. // Explicit template specialization
  492. template void igl::outer_hull<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
  493. template void igl::outer_hull<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 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::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  494. template void igl::outer_hull<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
  495. #endif