Macaulay2 » Documentation
Packages » Macaulay2Doc » combinatorics » Set » intersect
next | previous | forward | backward | up | index | toc

intersect -- compute an intersection

Description

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

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).

i1 : code lookup(symbol intersect, Module)

o1 = ../../../../Macaulay2/m2/option.m2:15:14-18:8: --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  FunctionClosure[../../../../Macaulay2/m2/intersect.m2:.  ../../../../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:42-86:108: --source code:
     | Module.intersect = moduleIntersectOpts >> opts -> L -> intersectHelper(L, (intersect, Module, Module), opts)
     | -- option table opts:
     | OptionTable{MinimalGenerators => true}
     |             Strategy => null

This function may also be called using the synonym intersection.

See also

Ways to use intersect:

For the programmer

The object intersect is an associative binary method function.


The source of this document is in Macaulay2Doc/shared.m2:120:0.