def conditional(a, b)
      a = Node.match(a, b.matched? ? b : nil).new a unless a.matched?
      b = Node.match(b, a.matched? ? a : nil).new b unless b.matched?
      if dimension == 0 and variables.empty? and
        a.dimension == 0 and a.variables.empty? and
        b.dimension == 0 and b.variables.empty?
        target = typecode.cond a.typecode, b.typecode
        target.new simplify.get.conditional(proc { a.simplify.get },
                                            proc { b.simplify.get })
      else
        Hornetseye::ElementWise(proc { |x,y,z| x.conditional y, z }, :conditional,
                                proc { |t,u,v| t.cond u, v }).
          new(self, a, b).force
      end
    end
def conditional(a, b)
      a = Node.match(a, b.matched? ? b : nil).new a unless a.matched?
      b = Node.match(b, a.matched? ? a : nil).new b unless b.matched?
      if dimension == 0 and variables.empty? and
        a.dimension == 0 and a.variables.empty? and
        b.dimension == 0 and b.variables.empty?
        target = typecode.cond a.typecode, b.typecode
        target.new simplify.get.conditional(proc { a.simplify.get },
                                            proc { b.simplify.get })
      else
        Hornetseye::ElementWise(proc { |x,y,z| x.conditional y, z }, :conditional,
                                proc { |t,u,v| t.cond u, v }).
          new(self, a, b).force
      end
    end
Element-wise conditional selection of values

 @param [Node] a First array of values.
 @param [Node] b Second array of values.

 @return [Node] Array with selected values.