tensor
get_compts
return the components field of a tensor_type
get_char
return the index character field of a tensor_type
get_rank
return the rank of a tensor_type
Calling Sequence
Parameters
Description
Examples
get_compts(A)
get_char(A)
get_rank(A)
A
-
tensor_type object
Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.
The function get_compts(A) returns the components of the tensor_type A.
The function get_char(A) returns the index character of the tensor_type A.
The function get_rank(A) returns the rank of the tensor_type A.
These procedures are not absolutely necessary since the fields of any table can be accessed directly. However, they provide a uniform and controlled access of the information contained in the tensor_type data type.
These functions are part of the tensor package, and so can be used in the form get_compts(..) / get_char(..) only after performing the command with(tensor), or with(tensor, get_compts) / with(tensor, get_char). These functions can always be accessed in the long form tensor[get_compts](..) / tensor[get_char](..).
Get the components, index character, and rank of the tensor T:
withtensor:
T≔create1,−1,arrayw,x,0,y,z,0,0,y2,xyw
T≔tablecompts=wx0yz00y2xyw,index_char=1,−1
get_comptsT
wx0yz00y2xyw
get_charT
1,−1
get_rankT
2
See Also
tensor(deprecated)
tensor(deprecated)[create]
Download Help Document