9 Eigen::Ref<const RowVectors2l> E)
14 const int64_t vertex_count = E.maxCoeff() + 1;
17 std::vector<std::vector<int64_t>> complete_VE(vertex_count);
20 VE.resize(vertex_count, 1);
21 for (int64_t i = 0; i < E.rows(); ++i) {
22 for (int64_t j = 0; j < E.cols(); ++j) {
24 complete_VE[E(i, j)].push_back(i);
28 EE.resize(E.rows(), 2);
30 for (int64_t i = 0; i < complete_VE.size(); ++i) {
31 assert(complete_VE[i].size() > 0 || complete_VE[i].size() < 3);
32 if (complete_VE[i].size() == 1) {
34 if (E(complete_VE[i][0], 0) == i) {
35 EE(complete_VE[i][0], 0) = -1;
37 EE(complete_VE[i][0], 1) = -1;
41 for (int64_t k = 0; k < 2; ++k) {
42 if (E(complete_VE[i][k], 0) == i) {
43 EE(complete_VE[i][k], 0) = complete_VE[i][1 - k];
45 if (E(complete_VE[i][k], 1) == i) {
46 EE(complete_VE[i][k], 1) = complete_VE[i][1 - k];
VectorX< int64_t > VectorXl
RowVectors< int64_t, 2 > RowVectors2l
std::tuple< RowVectors2l, VectorXl > edgemesh_topology_initialization(Eigen::Ref< const RowVectors2l > E)