Blame view

Modif/epsilon-master/apps/statistics/box_range.cpp 613 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  #include "box_range.h"
  
  namespace Statistics {
  
  BoxRange::BoxRange(Store * store) :
    m_store(store)
  {
  }
  
  float BoxRange::xMin() {
    float min = m_store->minValueForAllSeries();
    float max = m_store->maxValueForAllSeries();
    max = min >= max ? min + 1 : max;
    return min - k_displayLeftMarginRatio*(max-min);
  }
  
  float BoxRange::xMax() {
    float min = m_store->minValueForAllSeries();
    float max = m_store->maxValueForAllSeries();
    max = min >= max ? min + 1 : max;
    return max + k_displayRightMarginRatio*(max - min);
  }
  
  float BoxRange::xGridUnit() {
    return computeGridUnit(Axis::X, xMin(), xMax());
  }
  
  }