Lexis  1.2.0
Vocabulary of events and shared objects for BBP and HBP software
Histogram.h
1 /* Copyright (c) 2016-2017, Human Brain Project
2  * Ahmet.Bilgili@epfl.ch
3  */
4 
5 #pragma once
6 
7 #include <lexis/api.h>
8 #include <lexis/render/detail/histogram.h> // base class
9 #include <vmmlib/types.hpp>
10 
11 namespace lexis
12 {
13 namespace render
14 {
15 
17 {
18 public:
20  LEXIS_API Histogram();
21 
30  LEXIS_API Histogram& operator+=( const Histogram& histogram );
31 
33  LEXIS_API bool operator==( const Histogram& rhs ) const;
34 
36  LEXIS_API bool operator!=( const Histogram& rhs ) const;
37 
42  LEXIS_API size_t getMinIndex() const;
43 
48  LEXIS_API size_t getMaxIndex() const;
49 
51  LEXIS_API bool isEmpty() const;
52 
54  LEXIS_API uint64_t getSum() const;
55 
57  LEXIS_API vmml::Vector2f getRange() const;
58 
66  LEXIS_API double getRatio( size_t index ) const;
67 
69  LEXIS_API void resize( size_t newSize );
70 
78  LEXIS_API std::vector< vmml::Vector2f >
79  sampleCurve( bool logScale, const vmml::Vector2f& range ) const;
80 };
81 
82 }
83 }
Defines export visibility macros for library Lexis.
bool operator==(const Histogram &rhs) const
std::vector< vmml::Vector2f > sampleCurve(bool logScale, const vmml::Vector2f &range) const
Linear sampling of the histogram.
double getRatio(size_t index) const
Computes the ratio of the value at a given index.
void resize(size_t newSize)
Sets the number of bins to newSize and clears the histogram.
size_t getMaxIndex() const
Histogram()
The minimum value is set to -inf and maximum value is set to -inf.
uint64_t getSum() const
vmml::Vector2f getRange() const
size_t getMinIndex() const
bool operator!=(const Histogram &rhs) const
Histogram & operator+=(const Histogram &histogram)
Computes the addition of two histograms and modifies the object.