Re: [eigen] conservative resize ... |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] conservative resize ...
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Mon, 7 Sep 2009 16:39:26 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=V677e+5ZIqaRYVqk8CgEK8xO8FTck2h8DK/e3NigK9o=; b=wdng8QfGszLQ4ILEmKCjqP2u8WHqCxcEbI1OLeGszq90RLnzXQnp+0lm4u4AsqgelO 8vqURfaWymKc2O+9qoXV/1EdIpsAT6JTDKfrqyiUjo80DthTs4fYGvU/J5VdJWUIKagx dod6PUp3GS3mlby2eMK+nttYfmpwwrn6Ur4Kw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=mi0xuul4KOAVWe9x4yMcK+h8nt/1AXVFChqxQMz2tg31PML+K7RDHeFGXNnDqvZQYn n2rTXza4dGnX/YYy7Bfj/61FEGHH+23AnYm5mEBoPyvfKaDI8kK3KvpAe2h+stJ500XI JwHxC3ZZtmmcKquXo/jZxBwrvKhtaCHDpIa1k=
On Mon, Sep 7, 2009 at 4:28 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> There already is: MatrixBase<T>::IsVectorAtCompileTime.
yes, i know.
i was thinking about something like this...
template <int IsVector>
struct resize_xpr_helper
{
template <typename Derived, typename OtherDerived>
static void run(const Eigen::MatrixBase<Derived>& _this, const
Eigen::MatrixBase<OtherDerived>& other)
{
std::cout << "Matrix assignment" << std::endl;
}
};
template <>
struct resize_xpr_helper<1>
{
template <typename Derived, typename OtherDerived>
static void run(const Eigen::MatrixBase<Derived>& _this, const
Eigen::MatrixBase<Derived>& other)
{
std::cout << "Vector assignment" << std::endl;
}
};
- hauke