Mercurial > hg > svcore
comparison data/model/SparseValueModel.h @ 257:46398ab6ff58
* OS/X build fixes
author | Chris Cannam |
---|---|
date | Fri, 27 Apr 2007 16:10:10 +0000 |
parents | 9c85517ff0f5 |
children | 2b6c99b607f1 |
comparison
equal
deleted
inserted
replaced
256:9c85517ff0f5 | 257:46398ab6ff58 |
---|---|
16 #ifndef _SPARSE_VALUE_MODEL_H_ | 16 #ifndef _SPARSE_VALUE_MODEL_H_ |
17 #define _SPARSE_VALUE_MODEL_H_ | 17 #define _SPARSE_VALUE_MODEL_H_ |
18 | 18 |
19 #include "SparseModel.h" | 19 #include "SparseModel.h" |
20 #include "base/UnitDatabase.h" | 20 #include "base/UnitDatabase.h" |
21 | |
22 #include <cmath> | |
21 | 23 |
22 /** | 24 /** |
23 * Model containing sparse data (points with some properties) of which | 25 * Model containing sparse data (points with some properties) of which |
24 * one of the properties is an arbitrary float value. The other | 26 * one of the properties is an arbitrary float value. The other |
25 * properties depend on the point type. | 27 * properties depend on the point type. |
60 | 62 |
61 virtual void addPoint(const PointType &point) | 63 virtual void addPoint(const PointType &point) |
62 { | 64 { |
63 bool allChange = false; | 65 bool allChange = false; |
64 | 66 |
65 if (!isnan(point.value) && !isinf(point.value)) { | 67 if (!std::isnan(point.value) && !std::isinf(point.value)) { |
66 if (!m_haveExtents || point.value < m_valueMinimum) { | 68 if (!m_haveExtents || point.value < m_valueMinimum) { |
67 m_valueMinimum = point.value; allChange = true; | 69 m_valueMinimum = point.value; allChange = true; |
68 } | 70 } |
69 if (!m_haveExtents || point.value > m_valueMaximum) { | 71 if (!m_haveExtents || point.value > m_valueMaximum) { |
70 m_valueMaximum = point.value; allChange = true; | 72 m_valueMaximum = point.value; allChange = true; |