MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Add

Method Add

tensorflow/core/lib/histogram/histogram.cc:103–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void Histogram::Add(double value) {
104 int b =
105 std::upper_bound(bucket_limits_.begin(), bucket_limits_.end(), value) -
106 bucket_limits_.begin();
107
108 buckets_[b] += 1.0;
109 if (min_ > value) min_ = value;
110 if (max_ < value) max_ = value;
111 num_++;
112 sum_ += value;
113 sum_squares_ += (value * value);
114}
115
116double Histogram::Median() const { return Percentile(50.0); }
117

Callers 1

TESTFunction · 0.45

Calls 3

upper_boundFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.36