aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Thomas Capricelli <orzel@freehackers.org>2009-11-09 03:25:21 +0100
committerGravatar Thomas Capricelli <orzel@freehackers.org>2009-11-09 03:25:21 +0100
commit09cb27c587c6ee240c9a24a10c131d27fb0a3ed8 (patch)
tree48a76bddf84ea9cac42828abf240827384e23f2d /unsupported
parentcddc83752c926be15a2d08d49d560406de6985d0 (diff)
documentation + move "namespace eigen" to the main file, as others do.
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/NumericalDiff4
-rw-r--r--unsupported/Eigen/src/NumericalDiff/NumericalDiff.h36
2 files changed, 31 insertions, 9 deletions
diff --git a/unsupported/Eigen/NumericalDiff b/unsupported/Eigen/NumericalDiff
index 82a070d93..16e9f629a 100644
--- a/unsupported/Eigen/NumericalDiff
+++ b/unsupported/Eigen/NumericalDiff
@@ -42,12 +42,10 @@ namespace Eigen {
*/
//@{
-}
-
#include "src/NumericalDiff/NumericalDiff.h"
-namespace Eigen {
//@}
}
+
#endif // EIGEN_NUMERICALDIFF_MODULE
diff --git a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
index dcd435864..f4af94327 100644
--- a/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
+++ b/unsupported/Eigen/src/NumericalDiff/NumericalDiff.h
@@ -25,16 +25,42 @@
#ifndef EIGEN_NUMERICAL_DIFF_H
#define EIGEN_NUMERICAL_DIFF_H
-namespace Eigen
-{
-
enum NumericalDiffMode {
Forward,
Central
};
-template<typename Functor, NumericalDiffMode mode=Forward> class NumericalDiff : public Functor
+/**
+ * \brief asdf
+ *
+ * This class allows you to add a method df() to your functor, which will
+ * use numerical differentiation to compute an approximate of the
+ * derivative for the functor. Of course, if you have an analytical form
+ * for the derivative, you should rather implement df() using it.
+ *
+ * More information on
+ * http://en.wikipedia.org/wiki/Numerical_differentiation
+ *
+ * Currently only "Forward" and "Central" scheme are implemented. Those
+ * are basic methods, and there exist some more elaborated way of
+ * computing such approximates. They are implemented using both
+ * proprietary and free software, and usually requires linking to an
+ * external library. It is very easy for you to write a functor
+ * using such software, and the purpose is quite orthogonal to what we
+ * want to achieve with Eigen.
+ *
+ * This is why we will not provide wrappers for every great numerical
+ * differenciation software that exist, but should rather stick with those
+ * basic ones, that still are useful for testing.
+ *
+ * Also, the module "Non linear optimization" needs this in order to
+ * provide full features compatibility with the original (c)minpack
+ * package.
+ *
+ */
+template<typename Functor, NumericalDiffMode mode=Forward>
+class NumericalDiff : public Functor
{
public:
typedef typename Functor::Scalar Scalar;
@@ -119,6 +145,4 @@ private:
Scalar epsfcn;
};
-} // namespace
-
#endif // EIGEN_NUMERICAL_DIFF_H