提交 2707f226 编写于 作者: sahduashufa's avatar sahduashufa

add read_csv

上级 70684f4a
......@@ -4,7 +4,21 @@
- [x] ## 目前实现的:
- [x] Csv,txt,dat,等格式化文件流读取,转化为矩阵,获取尺寸.
- [ ] CSV,dat,txt等格式化文件读取:
实现由文件流读取内存文件首地址:
接口为:
Matrix read_csv(string &file_path)
使用eof标志位表示文件末尾,读出数据,默认为double精度的数据读取,file_path为文件路径,返回一个shape为文件rows和cols的matrix.
例如:
![image-20191119105056296](/Users/zhangyiji/Library/Application Support/typora-user-images/image-20191119105056296.png)
- [x] Csv,txt,dat,等格式化文件流读取,转化为矩阵,获取尺寸.
- [x] ## 0.1 矩阵:
......
......@@ -63,8 +63,6 @@ Matrix read_csv(string &file_path)
infile2 >> data;
string base = "";
string added ="";
string base2 = "";
string added2 = "";
int iSize = data.size();
int flag_if = 1;
int count_times = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册