mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 01:59:38 +08:00
Update doc.
This commit is contained in:
parent
8fffc81606
commit
e1c7c5968a
@ -75,7 +75,8 @@ struct default_digits10_impl<T,false,true> // Integer
|
|||||||
* \li An enum value \a IsSigned. It is equal to \c 1 if \a T is a signed type and to 0 if \a T is unsigned.
|
* \li An enum value \a IsSigned. It is equal to \c 1 if \a T is a signed type and to 0 if \a T is unsigned.
|
||||||
* \li An enum value \a RequireInitialization. It is equal to \c 1 if the constructor of the numeric type \a T must
|
* \li An enum value \a RequireInitialization. It is equal to \c 1 if the constructor of the numeric type \a T must
|
||||||
* be called, and to 0 if it is safe not to call it. Default is 0 if \a T is an arithmetic type, and 1 otherwise.
|
* be called, and to 0 if it is safe not to call it. Default is 0 if \a T is an arithmetic type, and 1 otherwise.
|
||||||
* \li An epsilon() function which, unlike std::numeric_limits::epsilon(), returns a \a Real instead of a \a T.
|
* \li An epsilon() function which, unlike <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon">std::numeric_limits::epsilon()</a>,
|
||||||
|
* it returns a \a Real instead of a \a T.
|
||||||
* \li A dummy_precision() function returning a weak epsilon value. It is mainly used as a default
|
* \li A dummy_precision() function returning a weak epsilon value. It is mainly used as a default
|
||||||
* value by the fuzzy comparison operators.
|
* value by the fuzzy comparison operators.
|
||||||
* \li highest() and lowest() functions returning the highest and lowest possible values respectively.
|
* \li highest() and lowest() functions returning the highest and lowest possible values respectively.
|
||||||
|
@ -165,8 +165,7 @@ This other example adds support for the \c mpq_class type from <a href="https://
|
|||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
template<class> struct NumTraits;
|
template<> struct NumTraits<mpq_class> : GenericNumTraits<mpq_class>
|
||||||
template<> struct NumTraits<mpq_class>
|
|
||||||
{
|
{
|
||||||
typedef mpq_class Real;
|
typedef mpq_class Real;
|
||||||
typedef mpq_class NonInteger;
|
typedef mpq_class NonInteger;
|
||||||
@ -174,6 +173,7 @@ namespace Eigen {
|
|||||||
|
|
||||||
static inline Real epsilon() { return 0; }
|
static inline Real epsilon() { return 0; }
|
||||||
static inline Real dummy_precision() { return 0; }
|
static inline Real dummy_precision() { return 0; }
|
||||||
|
static inline Real digits10() { return 0; }
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
IsInteger = 0,
|
IsInteger = 0,
|
||||||
@ -187,12 +187,6 @@ namespace Eigen {
|
|||||||
};
|
};
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
template<>
|
|
||||||
struct significant_decimals_impl<mpq_class>
|
|
||||||
{
|
|
||||||
// Infinite precision when printing
|
|
||||||
static inline int run() { return 0; }
|
|
||||||
};
|
|
||||||
|
|
||||||
template<> struct scalar_score_coeff_op<mpq_class> {
|
template<> struct scalar_score_coeff_op<mpq_class> {
|
||||||
struct result_type : boost::totally_ordered1<result_type> {
|
struct result_type : boost::totally_ordered1<result_type> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user