Mercurial > hg > svcore
comparison data/model/SparseValueModel.h @ 296:2b6c99b607f1
...
author | Chris Cannam |
---|---|
date | Fri, 21 Sep 2007 09:13:11 +0000 |
parents | 46398ab6ff58 |
children | 73537d900d4b |
comparison
equal
deleted
inserted
replaced
295:a2dc34ce146a | 296:2b6c99b607f1 |
---|---|
65 bool allChange = false; | 65 bool allChange = false; |
66 | 66 |
67 if (!std::isnan(point.value) && !std::isinf(point.value)) { | 67 if (!std::isnan(point.value) && !std::isinf(point.value)) { |
68 if (!m_haveExtents || point.value < m_valueMinimum) { | 68 if (!m_haveExtents || point.value < m_valueMinimum) { |
69 m_valueMinimum = point.value; allChange = true; | 69 m_valueMinimum = point.value; allChange = true; |
70 // std::cerr << "addPoint: value min = " << m_valueMinimum << std::endl; | |
70 } | 71 } |
71 if (!m_haveExtents || point.value > m_valueMaximum) { | 72 if (!m_haveExtents || point.value > m_valueMaximum) { |
72 m_valueMaximum = point.value; allChange = true; | 73 m_valueMaximum = point.value; allChange = true; |
74 // std::cerr << "addPoint: value max = " << m_valueMaximum << " (min = " << m_valueMinimum << ")" << std::endl; | |
73 } | 75 } |
74 m_haveExtents = true; | 76 m_haveExtents = true; |
75 } | 77 } |
76 | 78 |
77 SparseModel<PointType>::addPoint(point); | 79 SparseModel<PointType>::addPoint(point); |
91 = m_points.begin(); | 93 = m_points.begin(); |
92 i != m_points.end(); ++i) { | 94 i != m_points.end(); ++i) { |
93 | 95 |
94 if (i == m_points.begin() || i->value < m_valueMinimum) { | 96 if (i == m_points.begin() || i->value < m_valueMinimum) { |
95 m_valueMinimum = i->value; | 97 m_valueMinimum = i->value; |
98 // std::cerr << "deletePoint: value min = " << m_valueMinimum << std::endl; | |
96 } | 99 } |
97 if (i == m_points.begin() || i->value > m_valueMaximum) { | 100 if (i == m_points.begin() || i->value > m_valueMaximum) { |
98 m_valueMaximum = i->value; | 101 m_valueMaximum = i->value; |
102 // std::cerr << "deletePoint: value max = " << m_valueMaximum << std::endl; | |
99 } | 103 } |
100 } | 104 } |
101 | 105 |
102 if (formerMin != m_valueMinimum || formerMax != m_valueMaximum) { | 106 if (formerMin != m_valueMinimum || formerMax != m_valueMaximum) { |
103 emit modelChanged(); | 107 emit modelChanged(); |