You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A program reads a tensor from sn sdf file (tensor/sdf.h), and needs a certain element from this tensor, the indices of which are specified on the command line. However, the rank of the tensor may vary. In principle, the generic way to solve this would then be to set up a tensor::Indices object, fill it with the indices and call, e.g., RTensor::operator()(const Indices&).
The problem that I have now is that this function does not exist. To query a tensor element, I therefore need to give the index numbers one by one to specific function, depending on the rank of the tensor. This is an annoying solution and at odds with all other uses of tensor::Indices (e.g., all the tensor creation functions allow tensor::Indices for generalized setup), so maybe the operator() should be added properly.
The text was updated successfully, but these errors were encountered:
I have a principally simple problem.
A program reads a tensor from sn sdf file (tensor/sdf.h), and needs a certain element from this tensor, the indices of which are specified on the command line. However, the rank of the tensor may vary. In principle, the generic way to solve this would then be to set up a tensor::Indices object, fill it with the indices and call, e.g., RTensor::operator()(const Indices&).
The problem that I have now is that this function does not exist. To query a tensor element, I therefore need to give the index numbers one by one to specific function, depending on the rank of the tensor. This is an annoying solution and at odds with all other uses of tensor::Indices (e.g., all the tensor creation functions allow tensor::Indices for generalized setup), so maybe the operator() should be added properly.
The text was updated successfully, but these errors were encountered: