// ConsoleApplication12.cpp : This file contains the ‘main’ function. Program execution begins and ends there.
#include <stdlib.h>
#include
#include
#include
#include // std::pair
#include // std::runtime_error
#include // std::stringstream
#include
#include
#include
#include
#include // std::stringstream
#include
using namespace std;

int main()
{

std::cout << "Hello World!\n";int count = 0;
vector<string> test1;
vector<string> test3;
//Open File and Count the number of files
for (int i = 1; ; i++)
{string a = "Experiment";a = a + to_string(i);a = a + ".csv";std::ifstream myFile(a);if (myFile.is_open()){test1.push_back(a);cout << "Opened";count = count + 1;}else{break;}
}
std::cout << count;
for (int i = 0; i < 5; i++)
{cout << test1[i];
}
//Find the largest Number among all files and stored in the numberOfRows vector
vector<int> numberOfRows;
string b;
for (int i = 0; i < count; i++)
{int temp = i + 1;b = "Experiment" + to_string(temp) + ".csv";int rows = 0;ifstream file(b);string line;while (getline(file, line))rows++;numberOfRows.push_back(rows);
}//Print Them all for
for (int i = 0; i < count; i++)
{cout << numberOfRows[i]<<endl;
}//find the largesting among all numberOfRowsdouble max = *max_element(numberOfRows.begin(), numberOfRows.end());
int intergerMaxNum = (int)max;//Forming the corresponding intermediate table
vector<double>firstCol;
for (int i = 0; i < intergerMaxNum; i++)
{double temp = 0.1 * i;firstCol.push_back(temp);
}
//string b;
vector<string>secondInterCol;
// iterating through different value
FILE* fp = NULL;
for (int i = 0; i < intergerMaxNum; i++)
{//for every filefor (int j = 0; j < count; j++){}
}//Merge number of files, to a two dimension vectorvector<vector<int> > test2;
vector<int>B;
//which is used for including the corresponding value in the test2
B.push_back(0);
B.push_back(1);
B.push_back(2);
test2.push_back(B);
B.clear();
B.push_back(3);
B.push_back(4);
B.push_back(5);
test2.push_back(B);
B.clear();
B.push_back(6);
B.push_back(7);
B.push_back(8);
test2.push_back(B);
B.clear();
for (int i = 0; i < 3; i++)
{for (int j = 0; j < 3; j++){cout << test2[i][j]<<" ";}cout << endl;
}

}

C++2 dimension vector相关推荐

  1. C++向量类模板(支持实数向量与复数向量的各种运算)

    2019独角兽企业重金招聘Python工程师标准>>> 头文件: /** Copyright (c) 2008-2011 Zhang Ming (M. Zhang), zmjerry ...

  2. 【220】◀▶ IDL 数组操作函数说明

    参考:Array Creation Routines -- 创建数组函数 参考:Array Manipulation Routines -- 操作数组函数 01   MAX 最大值. 02   MIN ...

  3. 神经网络学习笔记-02-循环神经网络

    神经网络学习笔记-02-循环神经网络 本文是根据WildML的Recurrent Neural Networks Tutorial写的学习笔记. 循环神经网络 循环神经网络适用于处理序列化信息,比如: ...

  4. C++实现 (FFT)一维快速傅里叶变换

    一维离散傅里叶变换的公式为: 如果直接基于该定义进行编程实现,则算法时间复杂度为O(N2).具体的编程实现我们已经在<C++实现一维离散傅里叶变换>中介绍过了. 当一维信号长度达到几十万个 ...

  5. 词嵌入 网络嵌入_词嵌入简介

    词嵌入 网络嵌入 深度学习 , 自然语言处理 (Deep Learning, Natural Language Processing) Word embedding is a method to ca ...

  6. OpenVINO InferenceEngine之CNNNet、CNNLayer、Blob介绍

    OpenVINO IE模块对整个网络拓扑结构的管理主要是通过Net 和Layer,Data(Blob)进行管理的,看起来和caffe中的Net,Layer,Blob是一样的层次结构,是不是有点惊奇,技 ...

  7. 从零开始学Pytorch之线性回归

    线性回归 主要内容包括: 线性回归的基本要素 线性回归模型从零开始的实现 线性回归模型使用pytorch的简洁实现 线性回归的基本要素 模型 为了简单起见,这里我们假设价格只取决于房屋状况的两个因素, ...

  8. 唤起那些年你对IDL的记忆(一)

    仅做复习参考用:本文整理参考了IDL-Help跟董彦卿老师编写的教材 基础 常用的命令及快捷键 输出:print 查看:help 续行符:$ 同行符:& 注释符: ; 常用快捷键: 图1 快捷 ...

  9. 计算相同维度向量之间的欧氏距离

    计算如x1 = [1, 2, 3, 4, 5]和x2 = [6, 7, 8, 9, 10]之间的欧氏距离.代码如下: % input same dimension vector function di ...

最新文章

  1. cobbler自动化安装Linux系统
  2. ListView系列(七)——Adapter内的onItemClick监听器四个arg参数 (转)
  3. MTK 驱动开发---Memory 移植
  4. 在eclipse环境下配置OpenCV环境
  5. Java算法面试题(005) 求n边形周长的k等分点坐标(今日头条)
  6. 路边停车系统充电方案
  7. 天梯图excl_处理器2014最全天梯图
  8. 网卡驱动的队列数据的接收e100
  9. windows 多用户使用谷歌浏览器
  10. 我的Python笔记02
  11. logback各标签详解
  12. IIS管理器无法打开。启动后,在任务栏中有,但是窗口不见了,另一种解决办法.
  13. 给自己鼠标改个样式,再加一个炫酷的拖尾 #HTML鼠标皮肤拖尾
  14. web项目:智能出行规划网站——爬虫+flask+echarts+基础前端(html、css、js、jq)
  15. 弗莱纳公式(Frenet–Serret formulas)
  16. 股票公式编程是c语言,C语言编写公式的基础(飞狐用).doc
  17. Cadence OrCAD Capture 原理图中预览元件封装技巧图文教程
  18. java调用实例变量,实例方法
  19. 饶毅:中国未来与科学的隐患
  20. 每周 几点几点几分 时间戳 通用

热门文章

  1. 读债务危机0806:2007到2011年泡沫蔓延
  2. 笔记-项目干系人管理-规划干系人管理
  3. IT项目需求分析的重点关注事项
  4. Winform中使用Mysql.Data.dll实现连接Mysql数据库并执行sql语句(排除ddl等非法语句的执行)
  5. Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
  6. Eclipse+SprignBoot实现文件上传
  7. application/x-www-form-urlencoded与application/json区别以及遇到的坑
  8. springboot-静态资源配置原理
  9. jvm执行引擎全解,java解释器即时编译器,全都讲明白
  10. 谈谈java并发锁(重入锁、读写锁、公平锁)