| 87 | */ |
| 88 | template <class T, int R, int C> |
| 89 | void removeColumn(Eigen::Matrix<T, R, C>& matrix, unsigned int colToRemove) { |
| 90 | if (colToRemove >= matrix.cols()) { |
| 91 | return; |
| 92 | } |
| 93 | unsigned int numRows = matrix.rows(); |
| 94 | unsigned int numCols = matrix.cols() - 1; |
| 95 | |
| 96 | if (colToRemove < numCols) { |
| 97 | matrix.block(0, colToRemove, numRows, numCols - colToRemove) = |
| 98 | matrix.rightCols(numCols - colToRemove); |
| 99 | } |
| 100 | |
| 101 | matrix.conservativeResize(numRows, numCols); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Helper function to calculate the diameter of a row vector of points |
nothing calls this directly
no outgoing calls
no test coverage detected