~ubuntu-branches/ubuntu/quantal/commons-math/quantal

« back to all changes in this revision

Viewing changes to src/main/java/org/apache/commons/math/stat/descriptive/SynchronizedSummaryStatistics.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2010-04-05 23:33:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100405233302-gpqlceked76nw28a
Tags: 2.1-1
* New upstream release.
* Bump Standards-Version to 3.8.4: no changes needed
* Bump debhelper to >= 7
* Switch to 3.0 (quilt) source format:
  - Remove B-D on quilt
  - Add d/source/format
  - Remove d/README.source

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * conditions.  In effect, this implementation makes modification and access
25
25
 * methods atomic operations for a single instance.  That is to say, as one
26
26
 * thread is computing a statistic from the instance, no other thread can modify
27
 
 * the instance nor compute another statistic. 
 
27
 * the instance nor compute another statistic.
28
28
 *
29
29
 * @since 1.2
30
 
 * @version $Revision: 762087 $ $Date: 2009-04-05 10:20:18 -0400 (Sun, 05 Apr 2009) $
 
30
 * @version $Revision: 811685 $ $Date: 2009-09-05 13:36:48 -0400 (Sat, 05 Sep 2009) $
31
31
 */
32
32
public class SynchronizedSummaryStatistics extends SummaryStatistics {
33
33
 
40
40
    public SynchronizedSummaryStatistics() {
41
41
        super();
42
42
    }
43
 
    
 
43
 
44
44
    /**
45
45
     * A copy constructor. Creates a deep-copy of the {@code original}.
46
 
     * 
 
46
     *
47
47
     * @param original the {@code SynchronizedSummaryStatistics} instance to copy
48
48
     */
49
49
    public SynchronizedSummaryStatistics(SynchronizedSummaryStatistics original) {
66
66
        super.addValue(value);
67
67
    }
68
68
 
69
 
    /** 
 
69
    /**
70
70
     * {@inheritDoc}
71
71
     */
72
72
    @Override
146
146
        return super.toString();
147
147
    }
148
148
 
149
 
    /** 
 
149
    /**
150
150
     * {@inheritDoc}
151
151
     */
152
152
    @Override
297
297
    public synchronized void setVarianceImpl(StorelessUnivariateStatistic varianceImpl) {
298
298
        super.setVarianceImpl(varianceImpl);
299
299
    }
300
 
    
 
300
 
301
301
    /**
302
302
     * Returns a copy of this SynchronizedSummaryStatistics instance with the
303
303
     * same internal state.
304
 
     * 
 
304
     *
305
305
     * @return a copy of this
306
306
     */
307
307
    @Override
308
308
    public synchronized SynchronizedSummaryStatistics copy() {
309
 
        SynchronizedSummaryStatistics result = 
 
309
        SynchronizedSummaryStatistics result =
310
310
            new SynchronizedSummaryStatistics();
311
311
        copy(this, result);
312
 
        return result; 
 
312
        return result;
313
313
    }
314
 
     
 
314
 
315
315
    /**
316
316
     * Copies source to dest.
317
317
     * <p>Neither source nor dest can be null.</p>
318
318
     * <p>Acquires synchronization lock on source, then dest before copying.</p>
319
 
     * 
 
319
     *
320
320
     * @param source SynchronizedSummaryStatistics to copy
321
321
     * @param dest SynchronizedSummaryStatistics to copy to
322
322
     * @throws NullPointerException if either source or dest is null
329
329
            }
330
330
        }
331
331
    }
332
 
    
 
332
 
333
333
}