Module index_ops

Module index_ops 

Source
Expand description

Index operations (replacement, set operations, contraction preparation).

Structs§

ContractionSpec
Result of preparing a tensor contraction.

Enums§

ContractionError
Error type for contraction preparation.
ReplaceIndsError
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).