Re: [eigen] [Review] Pull request 66, Huge Tensor module improvements

[ Thread Index | Date Index | More Archives ]

On Thu, Jun 12, 2014 at 10:25 AM, Christian Seiler <christian@xxxxxxxx> wrote:
> That said I don't have a strong bias against creating a
> TensorArray class.

So, since Christoph also agrees with me on this point, and you don't
really strongly object, I'll go in that direction.

I'd also support this distinction. Other differences might be the addition with a Scalar, etc.

Regarding class names, I'd would suggest "Tensor" for the generalization of matrices and "MultiDimArray" for the generalization of arrays. Ideally, I'd even merge these last two notions to make Array multi-dimensional, or in other words if everything does well, at the end MultiDimArray would be renamed Array, and the current Array would go to /dev/null. I'm pretty sure that this is  possible without breaking the API. Not 100% sure about the ABI though. Regarding the class hierarchy, this implies something like:

  <- MatrixBase
  <- MultiDimBase
    <- MultiDimArrayBase
      <- MultiDimStorageBase
        <- MultiDimArray
    <- TensorBase
      <- MultiDimStorageBase
        <- Tensor

I'm also wondering whether 1D and 2D tensors should not behave as for the current vectors and matrices regarding operator* and the likes? operator* would be coefficient-wise for multi-dim arrays of arbitrary dimension, for tensors it would be restricted to 1D and 2D objects.


Mail converted by MHonArc 2.6.19+