PSVsymdif_oi Sieve pattern for symmetric difference of integer generators with offsets and interval output
Part of: miSCellaneous
Inherits from: Psieve
Pattern for symmetric difference of integer generators with offsets and interval output. Corresponds to Sieve's method 'symdif_oi'.
See also: Sieves and Psieve patterns, Sieve, PSVunion, PSVunion_i, PSVunion_o, PSVunion_oi, PSVsect, PSVsect_i, PSVsect_o, PSVsect_oi, PSVsymdif, PSVsymdif_i, PSVsymdif_o, PSVdif, PSVdif_i, PSVdif_o, PSVdif_oi, PSVop, PSVop_i, PSVop_o, PSVop_oi
Creation / Class Methods
*new (genList, maxLength, limit)
Creates a new PSVsymdif_oi object.
genList - An array of generators and corresponding offsets.
Allowed generators: Integers, Streams or Patterns producing intervals or Sieves itself.
Integers and Stream/Pattern output must be strictly positive.
Integers as generators produce constant intervals.
Offsets must be integers.
maxLength - Integer. Maximum number of items, which the stream will return.
Defaults to inf.
limit - Integer. Limit up to which intervals can be returned by the stream.
If no limit is passed, integer intervals might be returned up to default summation limit of 65536.
Examples
p = PSVsymdif_oi([10, 0, 50, 1], 20)
p.asStream.nextN(15)
a = Sieve(4, 20)
q = PSVsymdif_oi([a, 0, 10, 100], 20)
q.asStream.all
r = PSVsymdif_oi([a, 0, 10, 100], limit: 120)
r.asStream.all