void affineInterp(const PointSet &src, PointSet &res, const double mat[DIM_MAX][DIM_MAX+1]) { int N = src.dim() ; res.al(src.size(), src.dim()) ; for (unsigned int i=0; i< src.size(); i++) { for (int j=0; j< N; j++) { res[i][j] = mat[j][N] ; for(int jj=0; jj< N; jj++) res[i][j] += mat[j][jj] * src[i][jj] ; } } }