Flowdock
method

succ

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: Prime
succ() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/mathn.rb, line 78
  def succ
    i = -1
    size = @primes.size
    while i < size
      if i == -1
        @seed += 1
        i += 1
      else
        while @seed > @counts[i]
          @counts[i] += @primes[i]
        end
        if @seed != @counts[i]
          i += 1
        else
          i = -1
        end
      end
    end
    @primes.push @seed
    @counts.push @seed + @seed
    return @seed
  end
Register or log in to add new notes.