MCPcopy Create free account
hub / github.com/Pamphlett/Outram / removeColumn

Function removeColumn

include/teaser/utils.h:89–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 */
88template <class T, int R, int C>
89void 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected