22 #include "attributes.h"    41     template<
typename ConstIterator>
    42     static std::vector<Value> 
count(ConstIterator entityBegin, ConstIterator entityEnd,
    43                                     const int attrIdx, std::vector<Value> header)
    45         std::vector<Value> ret(header.size(), 0);
    46         while (entityBegin != entityEnd) {
    47             const size_t i = std::find(header.begin(), header.end(), entityBegin->second.attr(attrIdx)) - header.begin();
    48             if (i != header.size()) {
    49                 ret[i] = ret[i].toInt() + 1;
    57     template<
typename Container>
    58     static std::vector<Value> 
count(Container entity, 
const int attrIdx, std::vector<Value> values)
    60         return count(entity.cbegin(), entity.cend(), attrIdx, values);
 static std::vector< Value > count(ConstIterator entityBegin, ConstIterator entityEnd, const int attrIdx, std::vector< Value > header)
Count frequency of the header values in the container. 
Definition: stats.h:42
 
The Stats class. 
Definition: stats.h:29
 
static std::vector< Value > count(Container entity, const int attrIdx, std::vector< Value > values)
Count frequency of the header values in the container. 
Definition: stats.h:58
 
Definition: abstractgraph.h:29