Histogram.cc (7039:bc0b6ea676b5) | Histogram.cc (7454:3a3e8e8cce1b) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 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; --- 44 unchanged lines hidden (view full) --- 53} 54 55void 56Histogram::clear(int bins) 57{ 58 m_bins = bins; 59 m_largest_bin = 0; 60 m_max = 0; | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 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; --- 44 unchanged lines hidden (view full) --- 53} 54 55void 56Histogram::clear(int bins) 57{ 58 m_bins = bins; 59 m_largest_bin = 0; 60 m_max = 0; |
61 m_data.setSize(m_bins); | 61 m_data.resize(m_bins); |
62 for (int i = 0; i < m_bins; i++) { 63 m_data[i] = 0; 64 } 65 m_count = 0; 66 m_max = 0; 67 68 m_sumSamples = 0; 69 m_sumSquaredSamples = 0; --- 125 unchanged lines hidden --- | 62 for (int i = 0; i < m_bins; i++) { 63 m_data[i] = 0; 64 } 65 m_count = 0; 66 m_max = 0; 67 68 m_sumSamples = 0; 69 m_sumSquaredSamples = 0; --- 125 unchanged lines hidden --- |