collect2(v)
public
Collects (as in Enumerable#collect) over the elements of this vector and
v in conjunction.
Show source
def collect2(v)
raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
Vector.Raise ErrDimensionMismatch if size != v.size
return to_enum(:collect2, v) unless block_given?
Array.new(size) do |i|
yield @elements[i], v[i]
end
end