aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-08-19 14:18:05 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-08-19 14:18:05 +0200
commit42e2578ef9fcbb62ad6e07933ccf531f6f7cd1b3 (patch)
tree90cef174284cad35f0d13d4b991db83335554caf /unsupported/Eigen
parent5734ee6df42991e59609ffd26aaeb3c7aacd61e2 (diff)
the min/max macros to detect unprotected min/max were undefined by some std header,
so let's declare them after and do the respective fixes ;)
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r--unsupported/Eigen/FFT2
-rw-r--r--unsupported/Eigen/src/BVH/BVAlgorithms.h4
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT
index 0b2823058..c56bd63d6 100644
--- a/unsupported/Eigen/FFT
+++ b/unsupported/Eigen/FFT
@@ -331,7 +331,7 @@ class FFT
// if the vector is strided, then we need to copy it to a packed temporary
Matrix<src_type,1,Dynamic> tmp;
if ( resize_input ) {
- size_t ncopy = std::min(src.size(),src.size() + resize_input);
+ size_t ncopy = (std::min)(src.size(),src.size() + resize_input);
tmp.setZero(src.size() + resize_input);
if ( realfft && HasFlag(HalfSpectrum) ) {
// pad at the Nyquist bin
diff --git a/unsupported/Eigen/src/BVH/BVAlgorithms.h b/unsupported/Eigen/src/BVH/BVAlgorithms.h
index e6fdf4737..d65a97740 100644
--- a/unsupported/Eigen/src/BVH/BVAlgorithms.h
+++ b/unsupported/Eigen/src/BVH/BVAlgorithms.h
@@ -231,7 +231,7 @@ private:
template<typename BVH, typename Minimizer>
typename Minimizer::Scalar BVMinimize(const BVH &tree, Minimizer &minimizer)
{
- return internal::minimize_helper(tree, minimizer, tree.getRootIndex(), std::numeric_limits<typename Minimizer::Scalar>::max());
+ return internal::minimize_helper(tree, minimizer, tree.getRootIndex(), (std::numeric_limits<typename Minimizer::Scalar>::max)());
}
/** Given two BVH's, runs the query on their cartesian product encapsulated by \a minimizer.
@@ -264,7 +264,7 @@ typename Minimizer::Scalar BVMinimize(const BVH1 &tree1, const BVH2 &tree2, Mini
ObjIter2 oBegin2 = ObjIter2(), oEnd2 = ObjIter2(), oCur2 = ObjIter2();
std::priority_queue<QueueElement, std::vector<QueueElement>, std::greater<QueueElement> > todo; //smallest is at the top
- Scalar minimum = std::numeric_limits<Scalar>::max();
+ Scalar minimum = (std::numeric_limits<Scalar>::max)();
todo.push(std::make_pair(Scalar(), std::make_pair(tree1.getRootIndex(), tree2.getRootIndex())));
while(!todo.empty()) {
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
index cedb1d551..50c0ca84e 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -259,7 +259,7 @@ void MatrixExponential<MatrixType>::computeUV(float)
pade5(m_M);
} else {
const float maxnorm = 3.925724783138660f;
- m_squarings = max(0, (int)ceil(log2(m_l1norm / maxnorm)));
+ m_squarings = (max)(0, (int)ceil(log2(m_l1norm / maxnorm)));
MatrixType A = m_M / pow(Scalar(2), Scalar(static_cast<RealScalar>(m_squarings)));
pade7(A);
}
@@ -281,7 +281,7 @@ void MatrixExponential<MatrixType>::computeUV(double)
pade9(m_M);
} else {
const double maxnorm = 5.371920351148152;
- m_squarings = max(0, (int)ceil(log2(m_l1norm / maxnorm)));
+ m_squarings = (max)(0, (int)ceil(log2(m_l1norm / maxnorm)));
MatrixType A = m_M / pow(Scalar(2), Scalar(m_squarings));
pade13(A);
}