MCPcopy Create free account
hub / github.com/YeeZTech/YeeZ-Privacy-Computing / count

Class count

include/hpda/processor/transform/group.h:121–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120template <typename InputColumnType, typename OutputColumnType>
121class count : public aggregator_base<InputColumnType, OutputColumnType> {
122public:
123 typedef InputColumnType input_type;
124 typedef OutputColumnType output_type;
125
126 count() : m_data(), m_grouping(false) {}
127 void begin_group() { m_data = 0; }
128 template <typename T> void group(const T &t) {
129 m_data += 1;
130 m_grouping = true;
131 }
132 void end_group() { m_grouping = false; }
133 bool grouping() { return m_grouping; }
134 typename ::ff::util::internal::nt_traits<output_type>::type output() const {
135 return m_data;
136 }
137
138protected:
139 typename ::ff::util::internal::nt_traits<OutputColumnType>::type m_data;
140 bool m_grouping;
141};
142
143template <typename InputObjType, typename OutputObjType, typename GroupByType,
144 typename AggregatorType>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected