-
Notifications
You must be signed in to change notification settings - Fork 7
/
map_etc.cpp
40 lines (39 loc) · 1.18 KB
/
map_etc.cpp
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
#include "map.h"
void Map::print(bool printv, int tab) const
{
string strtab = "";
for (int i = 0; i < tab; ++i) strtab.append(" ");
cout << strtab << "iteration : " << iteration << endl;
cout << strtab << "input_size : " << input_size << endl;
if(printv)
{
cout << strtab << "mean : (";
for(int i = 0; i < mean.size(); ++i) cout << mean[i] << ",";
cout << ")\n";
}
cout << strtab << "mqr0 : " << mqe0 << endl;
cout << strtab << "MQR : " << mqe << endl;
cout << strtab << "size : " << network.size() << " x " << network[0].size() << endl;
for(int i = 0; i < network.size(); ++i)
{
cout << strtab;
for(int j = 0; j < network[i].size(); ++j)
{
network[i][j]->print(printv);
//cout << " ";
}
cout << endl;
}
for(int i = 0; i < network.size(); ++i)
{
for(int j = 0; j < network[i].size(); ++j)
{
if(network[i][j]->has_map)
{
cout << strtab << "+++ [" << i << ", " << j << "]\n";
network[i][j]->map->print(printv, tab + 1);
}
}
}
cout << strtab << "---\n";
}