|
1 |
| -/** \ingroup core |
2 |
| - * \class QgsHistogram |
3 |
| - * \brief Calculator for a numeric histogram from a list of values. |
4 |
| - * |
5 |
| - * \note Added in version 2.9 |
6 |
| - */ |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/qgshistogram.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
7 | 15 |
|
8 | 16 | class QgsHistogram
|
9 | 17 | {
|
| 18 | +%Docstring |
| 19 | + Calculator for a numeric histogram from a list of values. |
| 20 | + |
| 21 | +.. versionadded:: 2.9 |
| 22 | +%End |
| 23 | + |
10 | 24 | %TypeHeaderCode
|
11 | 25 | #include "qgshistogram.h"
|
12 | 26 | %End
|
13 |
| - |
14 | 27 | public:
|
15 | 28 |
|
16 | 29 | QgsHistogram();
|
17 | 30 |
|
18 | 31 | virtual ~QgsHistogram();
|
19 | 32 |
|
20 |
| - /** Assigns numeric source values for the histogram. |
21 |
| - * @param values list of doubles |
22 |
| - */ |
23 | 33 | void setValues( const QList<double> &values );
|
| 34 | +%Docstring |
| 35 | + Assigns numeric source values for the histogram. |
| 36 | + \param values list of doubles |
| 37 | +%End |
24 | 38 |
|
25 | 39 | bool setValues( const QgsVectorLayer *layer, const QString &fieldOrExpression, QgsFeedback *feedback = 0 );
|
| 40 | +%Docstring |
| 41 | + Assigns numeric source values for the histogram from a vector layer's field or as the |
| 42 | + result of an expression. |
| 43 | + \param layer vector layer |
| 44 | + \param fieldOrExpression field name or expression to be evaluated |
| 45 | + \param feedback optional feedback object to allow cancelation of calculation |
| 46 | + :return: true if values were successfully set |
| 47 | + :rtype: bool |
| 48 | +%End |
26 | 49 |
|
27 |
| - /** Calculates the optimal bin width using the Freedman-Diaconis rule. Bins widths are |
28 |
| - * determined by the inter-quartile range of values and the number of values. |
29 |
| - * @returns optimal width for bins |
30 |
| - * @see optimalNumberBins |
31 |
| - * @note values must first be specified using @link setValues @endlink |
32 |
| - */ |
33 | 50 | double optimalBinWidth() const;
|
| 51 | +%Docstring |
| 52 | + Calculates the optimal bin width using the Freedman-Diaconis rule. Bins widths are |
| 53 | + determined by the inter-quartile range of values and the number of values. |
| 54 | + :return: optimal width for bins |
| 55 | +.. seealso:: optimalNumberBins |
| 56 | +.. note:: |
| 57 | + |
| 58 | + values must first be specified using setValues() |
| 59 | + :rtype: float |
| 60 | +%End |
34 | 61 |
|
35 |
| - /** Returns the optimal number of bins for the source values, calculated using the |
36 |
| - * Freedman-Diaconis rule. The number of bins are determined by the inter-quartile range |
37 |
| - * of values and the number of values. |
38 |
| - * @returns optimal number of bins |
39 |
| - * @see optimalBinWidth |
40 |
| - * @note values must first be specified using @link setValues @endlink |
41 |
| - */ |
42 | 62 | int optimalNumberBins() const;
|
| 63 | +%Docstring |
| 64 | + Returns the optimal number of bins for the source values, calculated using the |
| 65 | + Freedman-Diaconis rule. The number of bins are determined by the inter-quartile range |
| 66 | + of values and the number of values. |
| 67 | + :return: optimal number of bins |
| 68 | +.. seealso:: optimalBinWidth |
| 69 | +.. note:: |
| 70 | + |
| 71 | + values must first be specified using setValues() |
| 72 | + :rtype: int |
| 73 | +%End |
43 | 74 |
|
44 |
| - /** Returns a list of edges for the histogram for a specified number of bins. This list |
45 |
| - * will be length bins + 1, as both the first and last value are also included. |
46 |
| - * @param bins number of bins |
47 |
| - * @return list of bin edges |
48 |
| - * @note values must first be specified using @link setValues @endlink |
49 |
| - */ |
50 | 75 | QList<double> binEdges( int bins ) const;
|
| 76 | +%Docstring |
| 77 | + Returns a list of edges for the histogram for a specified number of bins. This list |
| 78 | + will be length bins + 1, as both the first and last value are also included. |
| 79 | + \param bins number of bins |
| 80 | + :return: list of bin edges |
| 81 | +.. note:: |
| 82 | + |
| 83 | + values must first be specified using setValues() |
| 84 | + :rtype: list of float |
| 85 | +%End |
51 | 86 |
|
52 |
| - /** Returns the calculated list of the counts for the histogram bins. |
53 |
| - * @param bins number of histogram bins |
54 |
| - * @return list of histogram counts |
55 |
| - * @note values must first be specified using @link setValues @endlink |
56 |
| - */ |
57 | 87 | QList<int> counts( int bins ) const;
|
| 88 | +%Docstring |
| 89 | + Returns the calculated list of the counts for the histogram bins. |
| 90 | + \param bins number of histogram bins |
| 91 | + :return: list of histogram counts |
| 92 | +.. note:: |
| 93 | + |
| 94 | + values must first be specified using setValues() |
| 95 | + :rtype: list of int |
| 96 | +%End |
58 | 97 |
|
59 | 98 | };
|
60 | 99 |
|
| 100 | +/************************************************************************ |
| 101 | + * This file has been generated automatically from * |
| 102 | + * * |
| 103 | + * src/core/qgshistogram.h * |
| 104 | + * * |
| 105 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 106 | + ************************************************************************/ |
0 commit comments