Expand description
Index operations (replacement, set operations, contraction preparation).
Structs§
- Contraction
Spec - Result of preparing a tensor contraction.
Enums§
- Contraction
Error - Error type for contraction preparation.
- Replace
Inds Error - Error type for index replacement operations.
Functions§
- check_
unique_ indices - Check if a collection of indices contains any duplicates (by ID).
- common_
ind_ positions - Find contractable indices between two slices and return their positions.
- common_
inds - Find common indices between two index collections.
- hascommoninds
- Check if two collections have any common indices (by ID).
- hasind
- Check if a collection contains a specific index (by ID).
- hasinds
- Check if a collection contains all of the specified indices (by ID).
- noncommon_
inds - Find indices that are not common between two collections (symmetric difference).
- prepare_
contraction - Prepare contraction data for two tensors that share common indices.
- prepare_
contraction_ pairs - Prepare contraction data for explicit index pairs (like tensordot).
- replaceinds
- Replace indices in a collection based on ID matching.
- replaceinds_
in_ place - Replace indices in-place based on ID matching.
- union_
inds - Find the union of two index collections.
- unique_
inds - Find indices that are unique to the first collection (set difference A \ B).