def demand
      if variables.empty?
        if @sources.any? { |source| source.dimension > 0 }
          source_type = @sources.inject { |a,b| a.dimension > b.dimension ? a : b }
          source_type.shape.last.times do |i|
            sources = @sources.collect do |source|
              source.dimension > 0 ? source.element(INT.new(i)) : source
            end
            weight = @weight.dimension > 0 ? @weight.element(INT.new(i)) : @weight
            Histogram.new(@dest, weight, *sources).demand
          end
        else
          dest = @dest
          (@dest.dimension - 1).downto(0) do |i|
            dest = dest.element @sources[i].demand
          end
          dest.store dest + @weight
        end
        @dest
      else
        super
      end
    end
def demand
      if variables.empty?
        if @sources.any? { |source| source.dimension > 0 }
          source_type = @sources.inject { |a,b| a.dimension > b.dimension ? a : b }
          source_type.shape.last.times do |i|
            sources = @sources.collect do |source|
              source.dimension > 0 ? source.element(INT.new(i)) : source
            end
            weight = @weight.dimension > 0 ? @weight.element(INT.new(i)) : @weight
            Histogram.new(@dest, weight, *sources).demand
          end
        else
          dest = @dest
          (@dest.dimension - 1).downto(0) do |i|
            dest = dest.element @sources[i].demand
          end
          dest.store dest + @weight
        end
        @dest
      else
        super
      end
    end
Reevaluate computation

 @return [Node,Object] Result of computation

 @see #force

 @private