statistics.hh (9054:4c0f7e5ae72a) | statistics.hh (9550:e0e2c8f83d08) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 1402 unchanged lines hidden (view full) --- 1411 data.max = params->max; 1412 data.bucket_size = params->bucket_size; 1413 1414 data.min_val = (min_val == CounterLimits::max()) ? 0 : min_val; 1415 data.max_val = (max_val == CounterLimits::min()) ? 0 : max_val; 1416 data.underflow = underflow; 1417 data.overflow = overflow; 1418 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 1402 unchanged lines hidden (view full) --- 1411 data.max = params->max; 1412 data.bucket_size = params->bucket_size; 1413 1414 data.min_val = (min_val == CounterLimits::max()) ? 0 : min_val; 1415 data.max_val = (max_val == CounterLimits::min()) ? 0 : max_val; 1416 data.underflow = underflow; 1417 data.overflow = overflow; 1418 |
1419 size_type buckets = params->buckets; 1420 data.cvec.resize(buckets); 1421 for (off_type i = 0; i < buckets; ++i) | 1419 data.cvec.resize(params->buckets); 1420 for (off_type i = 0; i < params->buckets; ++i) |
1422 data.cvec[i] = cvec[i]; 1423 1424 data.sum = sum; 1425 data.squares = squares; 1426 data.samples = samples; 1427 } 1428 1429 /** --- 937 unchanged lines hidden (view full) --- 2367 2368 Result 2369 total() const 2370 { 2371 const VResult &lvec = l->result(); 2372 size_type size = lvec.size(); 2373 assert(size > 0); 2374 | 1421 data.cvec[i] = cvec[i]; 1422 1423 data.sum = sum; 1424 data.squares = squares; 1425 data.samples = samples; 1426 } 1427 1428 /** --- 937 unchanged lines hidden (view full) --- 2366 2367 Result 2368 total() const 2369 { 2370 const VResult &lvec = l->result(); 2371 size_type size = lvec.size(); 2372 assert(size > 0); 2373 |
2375 Result vresult = 0.0; | 2374 Result result = 0.0; |
2376 2377 Op op; 2378 for (off_type i = 0; i < size; ++i) | 2375 2376 Op op; 2377 for (off_type i = 0; i < size; ++i) |
2379 vresult = op(vresult, lvec[i]); | 2378 result = op(result, lvec[i]); |
2380 | 2379 |
2381 return vresult; | 2380 return result; |
2382 } 2383 2384 size_type size() const { return 1; } 2385 2386 std::string 2387 str() const 2388 { 2389 return csprintf("total(%s)", l->str()); --- 781 unchanged lines hidden --- | 2381 } 2382 2383 size_type size() const { return 1; } 2384 2385 std::string 2386 str() const 2387 { 2388 return csprintf("total(%s)", l->str()); --- 781 unchanged lines hidden --- |