Statistics
| Revision:

svn-gvsig-desktop / branches / org.gvsig.desktop-2018a / org.gvsig.desktop.library / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.buffer.api / src / main / java / org / gvsig / raster / lib / buffer / api / statistics / Statistics.java @ 43867

History | View | Annotate | Download (4.65 KB)

1
/* gvSIG. Desktop Geographic Information System.
2
 *
3
 * Copyright ? 2007-2016 gvSIG Association
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
 * MA  02110-1301, USA.
19
 *
20
 * For any additional information, do not hesitate to contact us
21
 * at info AT gvsig.com, or visit our website www.gvsig.com.
22
 */
23
package org.gvsig.raster.lib.buffer.api.statistics;
24

    
25
import java.util.List;
26

    
27
import org.gvsig.raster.lib.buffer.api.Band;
28
import org.gvsig.tools.task.SimpleTaskStatus;
29

    
30

    
31
/**
32
 * @author fdiaz
33
 *
34
 */
35
public interface Statistics extends Iterable<StatisticsBand>{
36

    
37
    /**
38
     * Gets the number of values by band
39
     *
40
     * @return the number of values by band
41
     */
42
    public long[] getNumberOfValues();
43

    
44
    /**
45
     * Devuelve una lista con los m?ximos de todas las bandas
46
     *
47
     * @return Valores m?ximos
48
     */
49
    public double[] getMax();
50

    
51
    /**
52
     * Obtiene el valor del segundo m?ximo
53
     *
54
     * @return Valor del segundo m?ximo
55
     */
56
    public double[] getSecondMax();
57

    
58
    /**
59
     * Obtiene el valor del segundo m?nimo
60
     *
61
     * @return Valor del segundo m?nimo
62
     */
63
    public double[] getSecondMin();
64

    
65
    /**
66
     * Devuelve el m?ximo valor de todos los m?ximos de las bandas
67
     *
68
     * @return M?ximo
69
     */
70
    public double getMaximum();
71

    
72
    /**
73
     * Devuelve el m?nimo valor de todos los m?nimos de las bandas
74
     *
75
     * @return M?nimo
76
     */
77
    public double getMinimum();
78

    
79
    /**
80
     * Obtiene el valor m?dio
81
     *
82
     * @return Valor medio
83
     */
84
    public double[] getMean();
85

    
86
    /**
87
     * @return Gets median of bands
88
     */
89
    public double[] getMedian();
90

    
91
    /**
92
     * Devuelve una lista con los m?nimos de todas las bandas
93
     *
94
     * @return Valor m?nimo
95
     */
96
    public double[] getMin();
97

    
98
    /**
99
     * Obtiene la varianza
100
     *
101
     * @return Varianza
102
     */
103
    public double[] getVariance();
104

    
105
    /**
106
     * Gets the number of bands
107
     *
108
     * @return the number of bands
109
     */
110
    public int getBandCount();
111

    
112
    /**
113
     * Obtiene un valor de recorte de colas para un porcentaje dado. El valor ser? un array
114
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
115
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
116
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
117
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
118
     *
119
     * @param percent Porcentaje de recorte
120
     * @return El valor de recorte de colas para el porcentaje dado
121
     */
122
    public double[][] getTailTrimValue(double percent);
123

    
124
    /**
125
     * Obtiene un valor de recorte de colas para una posici?n dada. El valor ser? un array
126
     * bidimensional ([N?mero de bandas][2]) donde para cada banda se almacena el valor en
127
     * esa posici?n del recorte de colas. Este recorte consiste en ordenar los elementos del
128
     * raster (o una muestra de ellos) y devolver el valor que corresponde al porcentaje comenzando
129
     * desde el principio del array ordenado y desde el final de ?l (m?nimo y m?ximo).
130
     * @param pos posici?n de recorte
131
     * @return el valor de recorte de colas para la posici?n dada
132
     */
133
    public double[][] getTailTrimValue(int pos);
134

    
135
    /**
136
     * Obtiene el flag que informa de si las estad?sticas est?n calculadas o no.
137
     * @return true indica que est?n calculadas y false que no lo est?n
138
     */
139
    public boolean isCalculated();
140

    
141
    /**
142
     * Throws the thread which figure out statistics
143
     * @param status
144
     * @param bands
145
     */
146
    public void calculate(SimpleTaskStatus status, List<Band> bands); //??? scale ???
147

    
148
    /**
149
     * Devuelve la matriz de varianza-covarianza, si no se encuentra calculada se calcula
150
     *
151
     * @return Matriz de varianza-covarianza
152
     */
153
    public double[][] getVarianceCovarianceMatrix();
154

    
155
    /**
156
     * Return the histogram of all bands.
157
     *
158
     * @return Histogram
159
     */
160
    public HistogramBand[] getHistogram();
161

    
162
    /**
163
     * @return
164
     */
165
    public String toHTMLString();
166

    
167
}