Revision 5490 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.buffer/org.gvsig.raster.lib.buffer.impl/src/main/java/org/gvsig/raster/lib/buffer/impl/statistics/DefaultStatistics.java

View differences:

DefaultStatistics.java
17 17
public class DefaultStatistics implements Statistics {
18 18

  
19 19
    StatisticsBand[] statisticsBands;
20
    List<Band> bands;
21 20
    boolean calculated;
22 21
    double[][] varCov;
23 22

  
......
26 25
     *
27 26
     */
28 27
    public DefaultStatistics( List<Band> bands) {
29
        this.bands = bands;
30 28
        statisticsBands = new StatisticsBand[bands.size()];
31 29
        for (int i = 0; i < statisticsBands.length; i++) {
32
            statisticsBands[i] = new DefaultStatisticsBand(this.bands.get(i));
30
            statisticsBands[i] = new DefaultStatisticsBand(bands.get(i));
33 31
        }
34 32
        varCov = new double[statisticsBands.length][statisticsBands.length];
35 33
        calculated = false;
......
103 101
        }
104 102
        return result;
105 103
    }
104
    
105
    @Override
106
    public double[] getMedian() {
107
        double[] result = new double[statisticsBands.length];
108
        for (int i = 0; i < statisticsBands.length; i++) {
109
            result[i]= statisticsBands[i].getMedian();
110
        }
111
        return result;
112
    }
106 113

  
107 114
    @Override
108 115
    public double[] getMin() {

Also available in: Unified diff