I have this code which uses Eigen:
struct Boundary
{
Eigen::VectorXi VL;
Eigen::MatrixXi EL;
double length;
bool isHole;
bool isBoundary;
bool isMainBoundary;
};
int boundaryLoops = {};
int boundariesNo = {};
int holes = {};
std::vector<Boundary> boundaries = {};
MatrixXi SEUV;
// ***** get all those boundaries here ****
if (!CheckBoundaries(boundaryLoops, boundariesNo, holes,
boundaries))return false;
// resize all loops container
long size = {};
for (auto &&boundary : boundaries){
size += boundary.EL.rows();
}
SEUV.resize(size, 2);
for (auto &&boundary : boundaries)
{
SEUV << boundary.EL; // Too few coefficients passed to comma initializer (operator<<)
SEUV << SEUV, boundary.EL; // Too many rows passed to comma initializer (operator<<)
}
is there a swift way to do this, apart from the usual cols and rows counting? This is recurring so I'm looking for the cleanest possible solution
Thank you