Module Make_frontend.Einsum

type token =
  1. | Axis of char
  2. | Ellipsis
val parse_operand : string -> token list
val parse_equation : string -> token list array * token list option
val handle_repeated_indices : ('a, 'b) B.t -> token list -> ('a, 'b) B.t * token list
type tensor_info = {
  1. id : int;
  2. shape : int array;
  3. axis_labels : char list;
}
type contraction_path =
  1. | Leaf of int
  2. | Node of contraction_path * contraction_path * tensor_info
val estimate_cost : tensor_info -> tensor_info -> Stdlib.Char.t list -> float * float
val optimize_path : tensor_info list -> Stdlib.Char.t list -> contraction_path
val contract_pair : ('a, 'b) B.t -> Stdlib.String.t -> ('a, 'b) B.t -> Stdlib.String.t -> Stdlib.String.t -> ('a, 'b) B.t
val calculate : string -> ('a, 'b) B.t array -> ('a, 'b) B.t