[eigen] .matrix()/.array() on MatrixBase<Derived>/ArrayBased<Derived> |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] .matrix()/.array() on MatrixBase<Derived>/ArrayBased<Derived>
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Thu, 21 Jan 2010 17:22:04 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=EZZ/aE96ywCvu+aurZoVtPTo3y23HIxOMcowxXBg4QM=; b=Tp9jo5PM5/D8RLRjMzkX8b37Y7MpL50A4dP2wi15yIGJdVRGIh2btHiNN0Gj/0f01G lPDD19YS73dAUwlXPjvvigktSbuhOPmQawuGNkE1kHZ+VmIOOOchSsFogCOp4N8453// v6BWesSHARRIjwlwYg6xUeaA2LCyDtEtdwxzc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lNVruRhoGESXeCGue82N/q4HAytYEJFJ9PLS42XmDyZxtRdaBhQMX65P97M60U2o4w UAc8V5HK1+nBuspXWmzFQSzFLLtIzNSDCIhkpq78zxykTqGg3WZLMs7IUf7hVV9I1n+j dRj1/ZYISN6OC1BVfAvH3+AIPLmmuKyG2NXiI=
Hi,
any objections against these null cost functions:
MatrixBase:
MatrixBase<Derived>& matrix() { return *this; }
const MatrixBase<Derived>& matrix() const { return *this; }
and the corresponding array() ones for ArrayBase.
When writing functions taking DenseBase<Derived> or any functions that
will take Array as well as Matrix, this is quite handy. You don't know
whether you need to convert or not, so you just do it when you want
array or matrix ops respectively.
- Hauke