Re: [eigen] simplex operations in Tensor package
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: Re: [eigen] simplex operations in Tensor package
• From: Benoit Steiner <benoit.steiner.goog@xxxxxxxxx>
• Date: Mon, 7 Mar 2016 09:06:55 -0800
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=iuYDbvkJjkCBUmzD89Mth8ZQviYtWHzTR36c6+QmxoE=; b=TCMaiFwyRuTl8s+wmrwzs4rQyzRi2rm0UV6dwSi1gePCxcZfN890CXIaUXP2o4g/Y4 32OrbD9/6lOd8XJp7uCsIgNVBgVBv1klA+fL/GVs4ZWF8MZgtgqYZDj3opazPkIoEc2S eSBGUlpVBl+8jOPGnKtKDsqLX25P9v4IRwfF05ZXRSUT2gZ8CInmWDhXOeDRhbP92G9N nmdgbp1hiyM4HfHzXiNxYWH+3MydXB5pslMOnbhO/sfMgSxy5ve+P2nT0+Yg1Ka2hk07 V6uPDuOql6Kcvz2X/YRFULXqAhBBnXbfRAhYoXacuOdo1B48wAaODiaYaVfa4TLJpKjj T8fQ==

This is mostly supported at the moment. Taking your example, assuming that alpha and beta are double, you can write:
RetTensor = Tens1 * alpha + Tens2 * beta;

We need to add a little more syntactic sugar to the code to be able to support alpha and beta on the left of the tensors as in:
RetTensor = alpha * Tens1 + beta * Tens2;

On Sat, Mar 5, 2016 at 9:44 AM, Mathieu Dutour wrote:
Hi,

would it be possible to have some basic arithmetic operation
in the tensor packages such as

RetTensor = alpha*Tens1 + beta*Tens2;

with say RetTensor, Tens1, and Tens2 of the
form Eigen::Tensor<double,3> ?

Thank you very much in advance.

Mathieu

--

 Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/