Forge: Histogram Class Reference

Forge

Public Member Functions
Histogram Class Reference

Histogram is a bar graph to display data frequencey. More...

`#include <histogram.h>`

## Public Member Functions
FGAPI | Histogram (const unsigned pNBins, const dtype pDataType)
| Creates a Histogram object. More...
FGAPI | Histogram (const Histogram &pOther)
| Copy constructor for Histogram. More...
FGAPI | ~Histogram ()
| Histogram Destructor. More...
FGAPI void | setColor (const Color pColor)
| Set the color of bar in the bar graph(histogram) More...
FGAPI void | setColor (const float pRed, const float pGreen, const float pBlue, const float pAlpha)
| Set the color of bar in the bar graph(histogram) More...
FGAPI void | setLegend (const char *pLegend)
| Set legend for histogram plot. More...
FGAPI unsigned | vertices () const
| Get the buffer identifier for vertices. More...
FGAPI unsigned | colors () const
| Get the buffer identifier for color values per vertex. More...
FGAPI unsigned | alphas () const
| Get the buffer identifier for alpha values per vertex. More...
FGAPI unsigned | verticesSize () const
| Get the vertex buffer size in bytes. More...
FGAPI unsigned | colorsSize () const
| Get the colors buffer size in bytes. More...
FGAPI unsigned | alphasSize () const
| Get the alpha values buffer size in bytes. More...
FGAPI fg_histogram | get () const
| Get the handle to internal implementation of Histogram. More...

## Detailed Description

Histogram is a bar graph to display data frequencey.

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

## Constructor & Destructor Documentation

## § Histogram() [1/2]

FGAPI Histogram | ( | const unsigned | pNBins,
|  | const dtype | pDataType
| ) |  |

Creates a Histogram object.

Parameters

  [in] | pNBins | is number of bins the data is sorted out
  [in] | pDataType | takes one of the values of fg_dtype that indicates the integral data type of histogram data

## § Histogram() [2/2]

FGAPI Histogram | ( | const Histogram & | pOther | ) |

Copy constructor for Histogram.

Parameters

  [in] | pOther | is the Histogram of which we make a copy of.

## § ~Histogram()

FGAPI ~Histogram | ( |  | ) |

Histogram Destructor.

## Member Function Documentation

## § alphas()

FGAPI unsigned alphas | ( |  | ) | const

Get the buffer identifier for alpha values per vertex.

Returns
  alpha values buffer resource id.

## § alphasSize()

FGAPI unsigned alphasSize | ( |  | ) | const

Get the alpha values buffer size in bytes.

Returns
  alpha buffer size in bytes

## § colors()

FGAPI unsigned colors | ( |  | ) | const

Get the buffer identifier for color values per vertex.

Returns
  colors buffer resource id.

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

## § colorsSize()

FGAPI unsigned colorsSize | ( |  | ) | const

Get the colors buffer size in bytes.

Returns
  colors buffer size in bytes

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

## § get()

FGAPI fg_histogram get | ( |  | ) | const

Get the handle to internal implementation of Histogram.

## § setColor() [1/2]

FGAPI void setColor | ( | const Color | pColor | ) |

Set the color of bar in the bar graph(histogram)

Parameters

  [in] | pColor | takes values of type forge::Color to define bar color

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

## § setColor() [2/2]

FGAPI void setColor | ( | const float | pRed,
|  | const float | pGreen,
|  | const float | pBlue,
|  | const float | pAlpha
| ) |  |

Set the color of bar in the bar graph(histogram)

This is global alpha value for the histogram rendering that takes effect if individual bar alphas are not set by calling the following member functions

- Histogram::alphas()
- Histogram::alphasSize()

Parameters

  [in] | pRed | is Red component in range [0, 1]
  [in] | pGreen | is Green component in range [0, 1]
  [in] | pBlue | is Blue component in range [0, 1]
  [in] | pAlpha | is Alpha component in range [0, 1]

## § setLegend()

FGAPI void setLegend | ( | const char * | pLegend | ) |

Set legend for histogram plot.

Parameters

  [in] | pLegend |

## § vertices()

FGAPI unsigned vertices | ( |  | ) | const

Get the buffer identifier for vertices.

Returns
  vertex buffer resource id.

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

## § verticesSize()

FGAPI unsigned verticesSize | ( |  | ) | const

Get the vertex buffer size in bytes.

Returns
  vertex buffer size in bytes

Examples:
  cpu/histogram.cpp, and opencl/histogram.cpp.

The documentation for this class was generated from the following file:

- histogram.h