MCPcopy Create free account
hub / github.com/baidu/tera / Average

Method Average

src/common/base/bounded_queue.h:62–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 value_type Average() {
63 static_assert(std::is_arithmetic<value_type>::value,
64 "Only arithmetic value is able to use Average method");
65 if (Empty()) {
66 return 0;
67 }
68 return Sum() / Size();
69 }
70
71 private:
72 void Drop() {

Callers 1

TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.36