MCPcopy Create free account
hub / github.com/arrayfire/forge / Histogram

Class Histogram

include/fg/histogram.h:163–276  ·  view source on GitHub ↗

\class Histogram \brief Histogram is a bar graph to display data frequencey. */

Source from the content-addressed store, hash-verified

161 \brief Histogram is a bar graph to display data frequencey.
162 */
163class Histogram {
164 private:
165 fg_histogram mValue;
166
167 public:
168 /**
169 Creates a Histogram object
170
171 \param[in] pNBins is number of bins the data is sorted out
172 \param[in] pDataType takes one of the values of \ref fg_dtype that indicates
173 the integral data type of histogram data
174 */
175 FGAPI Histogram(const unsigned pNBins, const dtype pDataType);
176
177 /**
178 Copy constructor for Histogram
179
180 \param[in] pOther is the Histogram of which we make a copy of.
181 */
182 FGAPI Histogram(const Histogram& pOther);
183
184 /**
185 Construct Histogram ojbect from fg_histogram resource handle
186
187 \param[in] pHandle is the input fg_histogram resource handle
188
189 \note This kind of construction assumes ownership of the resource handle
190 is released during the Histogram object's destruction.
191 */
192 FGAPI explicit Histogram(const fg_histogram pHandle);
193
194 /**
195 Histogram Destructor
196 */
197 FGAPI ~Histogram();
198
199 /**
200 Set the color of bar in the bar graph(histogram)
201
202 \param[in] pColor takes values of type forge::Color to define bar color
203 **/
204 FGAPI void setColor(const Color pColor);
205
206 /**
207 Set the color of bar in the bar graph(histogram)
208
209 This is global alpha value for the histogram rendering that takes
210 effect if individual bar alphas are not set by calling the following
211 member functions
212 - Histogram::alphas()
213 - Histogram::alphasSize()
214
215 \param[in] pRed is Red component in range [0, 1]
216 \param[in] pGreen is Green component in range [0, 1]
217 \param[in] pBlue is Blue component in range [0, 1]
218 \param[in] pAlpha is Alpha component in range [0, 1]
219 */
220 FGAPI void setColor(const float pRed, const float pGreen,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected