Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » hash tables » HashTable » VirtualTally » VirtualTally ** VirtualTally
next | previous | forward | backward | up | index | toc

# VirtualTally ** VirtualTally -- Cartesian product of tallies

- Operator: **

## Description

x ** y -- produces the Cartesian product of two tallies.

One of the arguments may be a Set.

    i1 : x = tally {a,a,b}

    o1 = Tally{a => 2}
               b => 1

    o1 : Tally

    i2 : y = tally {1,2,2,2}

    o2 = Tally{1 => 1}
               2 => 3

    o2 : Tally

    i3 : x ** y

    o3 = Tally{(a, 1) => 2}
               (a, 2) => 6
               (b, 1) => 1
               (b, 2) => 3

    o3 : Tally

## See also

- Tally -- the class of all tally results
- tally -- tally the elements of a list, sequence, array, or string

## Ways to use this method:

- VirtualTally ** VirtualTally -- Cartesian product of tallies

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/tally-doc.m2:80:0.