https://github.com/HTDerekLiu/surface_multigrid_code
Revision d79181f2d8eb642d3bbf7b6faf95a93bf3511de0 authored by eriszhang on 08 August 2021, 01:50:25 UTC, committed by eriszhang on 08 August 2021, 01:50:25 UTC
1 parent 535fef7
Tip revision: d79181f2d8eb642d3bbf7b6faf95a93bf3511de0 authored by eriszhang on 08 August 2021, 01:50:25 UTC
update code and rename folder
update code and rename folder
Tip revision: d79181f
remove_row.cpp
#include "remove_row.h"
void remove_row(
const int rowToRemove,
Eigen::MatrixXd & matrix)
{
unsigned int numRows = matrix.rows()-1;
unsigned int numCols = matrix.cols();
if( rowToRemove < numRows )
matrix.block(rowToRemove,0,numRows-rowToRemove,numCols) = matrix.block(rowToRemove+1,0,numRows-rowToRemove,numCols);
matrix.conservativeResize(numRows,numCols);
}
void remove_row(
const int rowToRemove,
Eigen::MatrixXi & matrix)
{
unsigned int numRows = matrix.rows()-1;
unsigned int numCols = matrix.cols();
if( rowToRemove < numRows )
matrix.block(rowToRemove,0,numRows-rowToRemove,numCols) = matrix.block(rowToRemove+1,0,numRows-rowToRemove,numCols);
matrix.conservativeResize(numRows,numCols);
}
Computing file changes ...