1. vector二维数组初始化方法:
2.示例代码
unsigned int rows = costMatrix.rows();
unsigned int cols = costMatrix.cols();
vector< vector<double> > costFunc(rows,vector<double>(cols,0));
for (unsigned int i = 0; i < rows; ++i)
{
for (unsigned int j = 0; j < cols; ++j)
{
costFunc[i][j] = (double)costMatrix(i,j);
}
}