| 85 | } |
| 86 | |
| 87 | void DumpTypes(string const & fPath) |
| 88 | { |
| 89 | TypesCollector doClass; |
| 90 | feature::ForEachFeature(fPath, doClass); |
| 91 | |
| 92 | typedef pair<vector<uint32_t>, size_t> stats_elem_type; |
| 93 | typedef vector<stats_elem_type> vec_to_sort; |
| 94 | vec_to_sort vecToSort(doClass.m_stats.begin(), doClass.m_stats.end()); |
| 95 | sort(vecToSort.begin(), vecToSort.end(), &SortFunc<stats_elem_type>); |
| 96 | |
| 97 | for (auto const & el : vecToSort) |
| 98 | { |
| 99 | cout << el.second << " "; |
| 100 | for (uint32_t i : el.first) |
| 101 | cout << classif().GetFullObjectName(i) << " "; |
| 102 | cout << endl; |
| 103 | } |
| 104 | cout << "Total features: " << doClass.m_totalCount << endl; |
| 105 | cout << "Features with names: " << doClass.m_namesCount << endl; |
| 106 | } |
| 107 | |
| 108 | /////////////////////////////////////////////////////////////////// |
| 109 |
no test coverage detected