function 2: intersection


intersection:
    description:
        intersection(seq, seq)
        the intersection function, takes element-wise min of the coefficients
        it generalizes standard set intersection where the coefficients are either 0 or 1
        ie, it is a fuzzy set intersection

    examples:
        -- set intersection of {a,b,c,d} and {b,d,e,f,g}:
        intersection(split |abcd>, split |bdefg>)
            |b> + |d>

        -- fuzzy set intersection example:
        intersection(3|a> + 1.2|b>, 3.5|a> + 0.9|b> + 5.13|c>)
            3|a> + 0.900000|b>

        -- sequence intersection example:
        intersection( ssplit |abcde>, ssplit |abc>)
            |a> . |b> . |c>

    see also:
        union, sum, is-subset, is-mbr, simm
Home