Re: [eigen] default printing format |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] default printing format
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 14 Aug 2009 14:40:19 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=q2a8Mpo0QTO5VGprX6VdfxnQEXS2gBEsFih0hxoiWrg=; b=BZdC2FFLFCNMS1G6JbS4RLv4CNOFXO/3areuDkJb/lLNWVOezUcyKs8KL+p5UeBVmS +IdrZNrdUXE2WxulHMpt5LjYcO4r7PfarplbLiJlQTEPIhgWi7boHe8Hflfh2UqPQ4mZ UrzW7qQ+ioKHUFguYHAKk7aR4/PpoLBFzqig4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=AnGCO8xkz1PgNO8xDcVZQQnF0qieSiCfOnzzBLJ7O/LYL/pKS0OEaqwBNmgdcZ600H gAfScTrSbwIHs350p06AhvVhgnLhGOpDdchCqUi/sfwCL3VFr5n8D5Iqx5KPtHZrMCgi EzFhoD54oNRx3iAGzuMjzhGo0NIpRr3CdGLq8=
2009/8/14 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>:
> I agree the default should be the c++ default.
ok, the changes are done.
here's an example of how to use full precision as the default:
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(FullPrecision)
#include<Eigen/Eigen>
int main() {
std::cout << Eigen::Matrix4d::Random() << std::endl;
}
columns are aligned by default, pass DontAlignCols to IOFormat ctor to disable.
Benoit.
>
>>> Moreover, already in Eigen 2.0 one can set once and for all a default
>>> IOFormat different from the "default default":
>>>
>>> #define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(16)
>>> before #including eigen.
>>
>> Would it be possible to add a function for those people who dislike macros?
>> E.g., something like
>>
>> static void IOFormat::setDefaultFormat(const IOFormat& fmt)
>
> Unfortunately as long as Eigen will stay as a pure template lib, this
> won't be possible.
>
> gael.
>
>>
>> Jitse
>>
>>
>>
>
>
>