* add Gael copyright lines on 2 more files

* macro renaming: EIGEN_NDEBUG becomes EIGEN_NO_DEBUG
  as this is much better (and similar to Qt) and
  EIGEN_CUSTOM_ASSERT becomes EIGEN_USE_CUSTOM_ASSERT
* protect Core header by a EIGEN_CORE_H
This commit is contained in:
Benoit Jacob 2008-03-26 09:13:11 +00:00
parent 729618c945
commit a994e51c96
5 changed files with 14 additions and 5 deletions

View File

@ -1,7 +1,10 @@
#ifndef EIGEN_CORE_H
#define EIGEN_CORE_H
#include <cstdlib>
#include <cmath>
#include <complex>
#ifndef EIGEN_CUSTOM_ASSERT
#ifndef EIGEN_USE_CUSTOM_ASSERT
#include <cassert>
#endif
#include <iostream>
@ -43,3 +46,4 @@ namespace Eigen {
} // namespace Eigen
#endif // EIGEN_CORE_H

View File

@ -2,6 +2,7 @@
// for linear algebra. Eigen itself is part of the KDE project.
//
// Copyright (C) 2006-2008 Benoit Jacob <jacob@math.jussieu.fr>
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -49,7 +49,11 @@ EIGEN_USING_MATRIX_TYPEDEFS \
using Eigen::Matrix; \
using Eigen::MatrixBase;
#ifdef EIGEN_NDEBUG
#ifdef NDEBUG
#define EIGEN_NO_DEBUG
#endif
#ifdef EIGEN_NO_DEBUG
#define ei_assert(x)
#else
#define ei_assert(x) assert(x)
@ -61,7 +65,7 @@ using Eigen::MatrixBase;
#define ei_internal_assert(x)
#endif
#ifdef NDEBUG
#ifdef EIGEN_NO_DEBUG
#define EIGEN_ONLY_USED_FOR_DEBUG(x) (void)x
#else
#define EIGEN_ONLY_USED_FOR_DEBUG(x)

View File

@ -68,7 +68,6 @@ int main(int, char **)
cout << "Here's the matrix m:" << endl << m << endl;
cout << "Now let's echelon m:" << endl;
for(int i = 0; i < 1000000; i++)
echelon(m);
cout << "Now m is:" << endl << m << endl;

View File

@ -2,6 +2,7 @@
// for linear algebra. Eigen itself is part of the KDE project.
//
// Copyright (C) 2006-2008 Benoit Jacob <jacob@math.jussieu.fr>
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@ -117,7 +118,7 @@
#endif // EIGEN_DEBUG_ASSERTS
#define EIGEN_CUSTOM_ASSERT
#define EIGEN_USE_CUSTOM_ASSERT
#else // EIGEN_NO_ASSERTION_CHECKING