-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInfoData.cpp
More file actions
70 lines (50 loc) · 1.75 KB
/
InfoData.cpp
File metadata and controls
70 lines (50 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* File: InfoData.cpp
* Author: zoizoi
*
* Created on 15 February 2011, 20:56
*/
#include "InfoData.h"
#include "Feature.h"
#include "ImplicitVolume4D.h"
InfoData::InfoData(OVASControl* oc) {
features = oc->features;
numViews = oc->geoSphere->getNumVs();
numSteps = oc->numSteps;
infoSheet = new InfoSheet(oc);
vector<Feature*>::iterator it;
float* featureStepData;
//cout<<" Feature size: "<<features->size()<<endl;
for (int step = 0; step < numSteps; step++) {
float* aggragatedStepData = new float[numViews];
for (int i = 0; i < numViews; i++) {
aggragatedStepData[i] = 0;
}
for (it = features->begin(); it != features->end(); it++) {
featureStepData = (*it)->getEvaluatedStepData(step);
for (int view = 0; view < numViews; view++) {
aggragatedStepData[view] += featureStepData[view];
// if(view<4) cout<<" for view "<<view<<" data : "<<aggragatedStepData[view]<<endl;
}
delete [] featureStepData;
}
infoSheet->addTimeInfo(aggragatedStepData);
// cout<<"added data starting with "<<aggragatedStepData[0]<<" "<<aggragatedStepData[1]<<endl;
}
}
InfoData::InfoData(const InfoData& orig) {
}
InfoData::~InfoData() {
}
int* InfoData::findOptimalPath() {
string filename=string("./lastestTempData/info.data");
infoSheet->outputInfoData(filename.c_str());
//infoSheet->loadInfo("thisData.txt");
//infoSheet->calcMaxInfo();
int* path=infoSheet->findPath();
return path;
}
int* InfoData::findBestViews(){
int* bvs=infoSheet->returnBestViews();
return bvs;
}