#include <cassert>
#include <GdomeSmartDOM.hh>
+#include <ext/hash_map>
+
namespace DOM = GdomeSmartDOM;
unsigned n_elements;
unsigned max_attributes;
unsigned max_depth;
unsigned max_children;
-std::vector<unsigned> depths;
+std::hash_map<unsigned,unsigned> depths;
std::vector<unsigned> widths;
bool
return true;
}
+void
+add_depth(unsigned depth)
+{
+ std::hash_map<unsigned,unsigned>::iterator p = depths.find(depth);
+ if (p != depths.end())
+ p->end++;
+ else
+ depths[depth] = 1;
+}
+
void
visit(DOM::Node node, unsigned depth)
{