[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] a couple of RFCs
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 12 Aug 2009 17:34:34 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=KKHSeWcnwDYcIiqXEP+MZnnph4aURAmqnWmCJ6gPqcg=; b=tEaj8vs3ig6ZXrfIqV94vBgSb+ss8WZM+NZf+evnprg7B92S9PJUcJ+kFUgim7vgsH 4v6A2o3X8bRrrrL8fLsWAOVqPggDqUfO+PSyFD3CgRtwhEaFzAQu+uedpr3YAvS1B8Zf lsi91D1X22VV8LYxsOk0B4iNdxbOvh6rdIx+E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=LrBnFpU24HYjWEOJaw+K8NHU7o3bi+5uK8ouDM2r4FPy9tWdPkiKZiTYZwaU8tYDDL SQax/84ptifsTvv0FzM+sZegrFoPWim7vp1HYf4FBTgLyGKz3uZu5gOSY1QpGXdDymYv /fX5r86MlPTHYhgTYc+8KwejFfEs0tvbQ1akc=
Hi,
1) we currently have a template machine_epsilon<Scalar>() that is
redundant with std::numeric_limits at least for standard numeric
types.
Should we:
a) keep our own machine_epsilon<Scalar>(), and make its
specializations for standard types be wrappers around
std::numeric_limits?
or
b) remove machine_epsilon<Scalar>() and instead use
std::numeric_limits directly? This would require the user to add
custom specializations of
std::numeric_limits if he wants to support custom numeric types. That
seems OK, right? Also note that in StableNorm.h we're already using
std::numeric_limits.
2) in IO.h, by default we output matrices with a "default format" that
uses 4 digits precision. This has repeatedly annoyed people, as they
would expect
cout.precision(n);
cout << matrix;
to work. I suggest that the default value for "precision" be -1, and
that this special value means "use the current precision of the
stream".
Worse: we apply the precision to the stream and don't modify it back
to the original value, so outputting a matrix to a stream has the very
unexpected effect of altering its precision. OK to change that so we
save and restore the stream precision?
Benoit