|
@@ -1834,28 +1834,28 @@ void SemSegContextTree::restore (std::istream & is, int format)
|
|
|
forest.push_back (tmptree);
|
|
|
int nodes;
|
|
|
is >> nodes;
|
|
|
- cout << "tree nb " << t << " has " << nodes << " nodes." << endl;
|
|
|
|
|
|
for (int n = 0; n < nodes; n++)
|
|
|
{
|
|
|
-
|
|
|
cout << "node: " << n << " of " << nodes << endl;
|
|
|
TreeNode tmpnode;
|
|
|
forest[t].push_back (tmpnode);
|
|
|
is >> forest[t][n].left;
|
|
|
is >> forest[t][n].right;
|
|
|
is >> forest[t][n].decision;
|
|
|
+ cout << 1 << endl;
|
|
|
is >> forest[t][n].isleaf;
|
|
|
is >> forest[t][n].depth;
|
|
|
is >> forest[t][n].featcounter;
|
|
|
-
|
|
|
+cout << 2 << endl;
|
|
|
is >> forest[t][n].nodeNumber;
|
|
|
is >> forest[t][n].dist;
|
|
|
-
|
|
|
+cout << 3 << endl;
|
|
|
int feattype;
|
|
|
is >> feattype;
|
|
|
assert (feattype < NBOPERATIONS);
|
|
|
forest[t][n].feat = NULL;
|
|
|
+ cout << 4 << endl;
|
|
|
if (feattype >= 0)
|
|
|
{
|
|
|
for (uint o = 0; o < ops.size(); o++)
|
|
@@ -1875,9 +1875,10 @@ void SemSegContextTree::restore (std::istream & is, int format)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+cout << 5 << endl;
|
|
|
assert (forest[t][n].feat != NULL);
|
|
|
forest[t][n].feat->restore (is);
|
|
|
+ cout << 6 << endl;
|
|
|
}
|
|
|
}
|
|
|
}
|