Commit 97661d0e authored by oscar's avatar oscar

提交测试

parent 754406bb
......@@ -41,6 +41,20 @@ std::string GetMatrixStr(const std::vector<std::vector<float>>& data_ptr, int co
}
return str;
}
std::string GetMatrixStr(const std::vector<std::vector<double>>& data_ptr, int col, int row)
{
std::string str;
for (int i = 0; i < col; i++)
{
for (int j = 0; j < row; j++)
{
char log[128] = {};
sprintf(log, "%f,", data_ptr[i][j]);
str += log;
}
}
return str;
}
std::string GetMatrixStr(float** data_ptr, int col, int row)
{
......
......@@ -10,4 +10,5 @@ std::string GetTimeStr(uint64_t timestamp);
std::string GetMatrixStr(const float* data_ptr, int col, int row);
std::string GetMatrixStr(const std::vector<std::vector<float>>& data_ptr, int col, int row);
std::string GetMatrixStr(const std::vector<std::vector<double>>& data_ptr, int col, int row);
std::string GetMatrixStr(float** data_ptr, int col, int row);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment