mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 01:59:38 +08:00
CREDIT Hauke Heibel, fix MSVC warnings
This commit is contained in:
parent
3b79d99f71
commit
eac79b6d2e
@ -22,8 +22,8 @@
|
||||
// License and a copy of the GNU General Public License along with
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <Eigen/StdVector>
|
||||
#include "main.h"
|
||||
#include <Eigen/StdVector>
|
||||
#include <Eigen/Geometry>
|
||||
|
||||
template<typename MatrixType>
|
||||
|
@ -92,7 +92,7 @@ template<typename _Scalar> class AlignedVector3
|
||||
{}
|
||||
|
||||
template<typename XprType, int Size=XprType::SizeAtCompileTime>
|
||||
struct generic_assign_selector;
|
||||
struct generic_assign_selector {};
|
||||
|
||||
template<typename XprType> struct generic_assign_selector<XprType,4>
|
||||
{
|
||||
|
@ -22,8 +22,8 @@
|
||||
// License and a copy of the GNU General Public License along with
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <Eigen/StdVector>
|
||||
#include "main.h"
|
||||
#include <Eigen/StdVector>
|
||||
#include <unsupported/Eigen/BVH>
|
||||
|
||||
inline double SQR(double x) { return x * x; }
|
||||
@ -43,7 +43,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(double, Dim)
|
||||
};
|
||||
|
||||
|
||||
template<int Dim> AlignedBox<double, Dim> ei_bounding_box(const Matrix<double, Dim, 1> &v) { return AlignedBox<double, Dim>(v); }
|
||||
template<typename Scalar, int Dim> AlignedBox<Scalar, Dim> ei_bounding_box(const Matrix<Scalar, Dim, 1> &v) { return AlignedBox<Scalar, Dim>(v); }
|
||||
template<int Dim> AlignedBox<double, Dim> ei_bounding_box(const Ball<Dim> &b)
|
||||
{ return AlignedBox<double, Dim>(b.center.cwise() - b.radius, b.center.cwise() + b.radius); }
|
||||
|
||||
|
@ -30,7 +30,7 @@ EIGEN_DONT_INLINE Scalar foo(const Scalar& x, const Scalar& y)
|
||||
{
|
||||
// return x+std::sin(y);
|
||||
EIGEN_ASM_COMMENT("mybegin");
|
||||
return x*2 - std::pow(x,2) + 2*std::sqrt(y*y) - 4 * std::sin(x) + 2 * std::cos(y) - std::exp(-0.5*x*x);
|
||||
return static_cast<Scalar>(x*2 - std::pow(x,2) + 2*std::sqrt(y*y) - 4 * std::sin(x) + 2 * std::cos(y) - std::exp(-0.5*x*x));
|
||||
// return y/x;// - y*2;
|
||||
EIGEN_ASM_COMMENT("myend");
|
||||
}
|
||||
@ -136,8 +136,6 @@ template<typename Func> void adolc_forward_jacobian(const Func& f)
|
||||
|
||||
void test_autodiff()
|
||||
{
|
||||
std::sqrt(3);
|
||||
std::sin(3);
|
||||
std::cerr << foo<float>(1,2) << "\n";
|
||||
AutoDiffScalar<Vector2f> ax(1,Vector2f::UnitX());
|
||||
AutoDiffScalar<Vector2f> ay(2,Vector2f::UnitY());
|
||||
|
@ -22,8 +22,8 @@
|
||||
// License and a copy of the GNU General Public License along with
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <Eigen/StdVector>
|
||||
#include "main.h"
|
||||
#include <Eigen/StdVector>
|
||||
#include <unsupported/Eigen/MatrixFunctions>
|
||||
|
||||
double binom(int n, int k)
|
||||
|
Loading…
x
Reference in New Issue
Block a user