27 lines
505 B
C++
Executable File
27 lines
505 B
C++
Executable File
#include<iostream>
|
|
#include<math.h>
|
|
#include "data.h"
|
|
using namespace std;
|
|
|
|
int main(){
|
|
// Data test1;
|
|
// test1.setName("test1");
|
|
vector<double> value = {0.,0.};
|
|
Data test1("test1");
|
|
for(int i=0;i<100;i++){
|
|
value[0] = i*3.1415/50;
|
|
value[1] = cos(value[0]);
|
|
test1.add_value(value);
|
|
}
|
|
//test1.displayData();
|
|
//test1.exportData();
|
|
Data test2("test2");
|
|
test2.randSet(100);
|
|
test2.displayData();
|
|
Data test3("poly3");
|
|
test3.randSet(20,1,1.);
|
|
//test3.print();
|
|
test3.displayData();
|
|
return 0;
|
|
}
|