next | previous | forward | backward | up | index | toc

# tensor -- tensor product

## Description

This function calculates the tensor product of a list or sequence of compatible objects.

This method is declared as a MethodFunctionBinary, so for two or more argument the product is computed iteratively from the binary tensor products, working from left to right. For two arguments, this is the same as A ** B except that options are allowed.

 i1 : tensor(ZZ^2, ZZ^3, ZZ^4) 24 o1 = ZZ o1 : ZZ-module, free

When a more efficient algorithm is available for computing the intersection of all inputs simultaneously rather than iteratively, for instance for intersecting Modules, a specialized function that takes a list or sequence may be installed on (symbol intersect, Type).

 i2 : code lookup(symbol intersect, Module) o2 = ../../../../../Macaulay2/m2/option.m2:15:19-17:33: --source code: (opts,f) -> args -> ( -- Common code for functions created with >> to process options and arguments. uncurry(f, override (opts,args)) ) ) | symbol class value location of symbol | ------ ----- ----- ------------------ | f FunctionClosure -*Function[../../../../../Macaulay2/m2/intersect.m2:86. ../../../../../Macaulay2/m2/option.m2:15:8-15:9 | opts OptionTable OptionTable{MinimalGenerators => true} ../../../../../Macaulay2/m2/option.m2:15:3-15:7 | Strategy => null | -- function f: | ../../../../../Macaulay2/m2/intersect.m2:86:47-86:103: --source code: | Module.intersect = moduleIntersectOpts >> opts -> L -> intersectHelper(L, (intersect, Module, Module), opts) | -- option table opts: | OptionTable{MinimalGenerators => true} | Strategy => null