compute size of first degree polytensor with tensors up to maxmimum rank
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | max_rank |
integer pure function polytensor_size(max_rank)
integer, intent(in) :: max_rank
polytensor_size = (max_rank + 3) * (max_rank + 2) * (max_rank + 1) / 6
end function polytensor_size