Skip to content

Commit

Permalink
Merge pull request #9 from spinicist/master
Browse files Browse the repository at this point in the history
Removed min/max macros to prevent header include problems with LLVM.
  • Loading branch information
PatWie committed Jul 22, 2015
2 parents 7cd1c63 + 9b71e66 commit d286cd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/LbfgsbSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void LbfgsbSolver::GetGeneralizedCauchyPoint(Vector &x, Vector &g, Vector &x_cau

}

dt_min = max(dt_min, 0);
dt_min = max(dt_min, 0.0);
t_old += dt_min;

Debug(SortedIndices[0] << " " << SortedIndices[1]);
Expand Down
2 changes: 1 addition & 1 deletion src/LbfgsbSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#ifndef LBFGSBSOLVER_H_
#define LBFGSBSOLVER_H_
#include "ISolver.h"
#include <list>
#include "ISolver.h"
namespace pwie
{

Expand Down
8 changes: 6 additions & 2 deletions src/Meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#include <Eigen/Dense>
#include <Eigen/Core>
#include <stdexcept>
#include <list>
#include <vector>
#include <algorithm>

namespace pwie
{
Expand Down Expand Up @@ -84,8 +87,9 @@ bool AssertEqual(T a, T b)
}
}

#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
using std::min;
using std::max;

#define EMPTY_HESSIAN (std::function<void(const Eigen::VectorXd & x, Eigen::MatrixXd & hessian)>())

#define INF HUGE_VAL // std::numeric_limits<double>::infinity()
Expand Down

0 comments on commit d286cd7

Please sign in to comment.