$ npm install symmetric-tensor-indexIndex operations for symmetric tensors (aka multinomials). In a r-th order symmetric tensor over a d-dimensional vector spaces, we can think of the indices in 3 different ways:
The code in this library can be used to convert between these indices. For more details see:
npm install symmetric-tensor-index
var sym = require("symmetric-tensor-index")
sym.nextTensor(rank, dimension, seq[, index])Finds the index of the next entry in the tensor.
rank is the rank of the tensordimension is the dimension of the tensorseq is the tensor indexindex is the array index (optional)Returns The next array index. seq is updated in place.
sym.tensorToDegree(rank, dimension, seq[, result])Converts a tensor index to a degree index
rank rank of the tensordimension dimension of vector spaceseq is the tensor indexresult (optional) gets the resulting computationReturns result
sym.tensorToArray(rank, dimension, seq)Converts a tensor index to an array index
rank rank of the tensordimension dimension of vector spaceseq is the tensor indexReturns The array index of the tensor entry
sym.degreeToTensor(rank, dimension, degrees[, result])Converts a degree index to a tensor index
rank rank of the tensordimension dimension of vector spacedegrees is the degree indexresult is the result (optional)Returns result
sym.degreeToArray(rank, dimension, degrees)Converts a degree index to an array index
rank rank of the tensordimension dimension of vector spacedegrees is the degree indexReturns The array index of the degree sequence
(c) 2013 Mikola Lysenko. MIT License