|Re: [eigen] What is StorageKind?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] What is StorageKind?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 21 Jul 2010 19:16:05 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=sQ/GuuLLhnaANiLdIk6eX6TTBrMqhAnVbfz91Awn+KA=; b=kl3y83uSoqMV+/w37y2ul3kHIZ7X5bZ9voaEpvOAyhlD51hVkDDC/gRmvkSPY6Cz2Z DnOi1YKqtpdVtx39e2UNvGWHUPDc6hP/dVL3pdlo1zLymFxL4LKLm4w9TfCuCEokDxwg jn4B0iznbMfLwfJnGVS5G0q/Uf92u2nu91lV8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=QX2ceEsnVCXz1WmMq39hiT/ZMEeh9XgDeI0+tBBnkMwS86HTd8e8PV2Hra0Fq0j7gE T5EliXvcNP+tnaQkaEok1imLHOxaXm55CO9FqKjbs9pNvVwvcdmgXVsjN4iRnWqx0X/D 30RXHjhIj0gN0P6Vvcv2oFDB/pGrhllxylNmA=
Currently it is mainly used to select the appropriate implementation
of each expression type and to select the appropriate base class. For
instance, you can use Transpose<> on both dense and sparse objects to
get the type of a transposed expression:
both are the same class (there is no partial specialization at this
stage), but they inherit an "implementation" template class which is
specialized for each kind of storage type, which themselves inherit
the proper base class (e.g., MatrixBase or SparseMatrixBase).
For instance, the implementation class for dense storage has to
provide the coeff() methods only, and for sparse an InnerIterator.
The same principle applies to other expression types (CwiseUnaryOp, etc...)
This is way it is relatively easy to support expression template for a
new fancy kind of storage while focusing on the specific
implementation details rather than on re-implementing the
hope that helps,
On Wed, Jul 21, 2010 at 6:13 PM, Manoj Rajagopalan <rmanoj@xxxxxxxxx> wrote:
> Hi eigen developers,
> I see this typedef in many Eigen classes. IIUC, it can be either Dense or
> Sparse. Is it's purpose "to be used in meta-ifs to decide on algorithm for
> implementing products etc."?