probability/rarity.rb
#determines information about the total quantity of tranche supply
determines information about the total quantity of tranche supply
determines information about the total quantity of tranche supply
def overall
  @overall_full_perc = [(26.0/40.0)*100, (4.0/40.0)*100, (1.0/40.0)*100, (2.0/40.0)*100, (3.0/40.0)*100]
  @overall_perc = [(26.0/40.0), (4.0/40.0), (1.0/40.0), (2.0/40.0), (3.0/40.0)]
  @grey_perc = @overall_perc[0]
  @yellow_perc = @overall_perc[1]
  @blue_perc = @overall_perc[2]
  @red_perc = @overall_perc[3]
  @green_perc = @overall_perc[4]
  @grey_total = 26
  @yellow_total = 4
  @blue_total = 1
  @red_total = 2
  @green_total = 3
  @overall_total = [@grey_total + @yellow_total + @blue_total + @red_total + @green_total]
  @overall_int = @overall_total.inject(0){|sum,x| sum + x }
prob_input
  end
def overall @overall_full_perc = [ ( 26.0 / 40.0 ) * 100 , ( 4.0 / 40.0 ) * 100 , ( 1.0 / 40.0 ) * 100 , ( 2.0 / 40.0 ) * 100 , ( 3.0 / 40.0 ) * 100 ] @overall_perc = [ ( 26.0 / 40.0 ) , ( 4.0 / 40.0 ) , ( 1.0 / 40.0 ) , ( 2.0 / 40.0 ) , ( 3.0 / 40.0 ) ] @grey_perc = @overall_perc [ 0 ] @yellow_perc = @overall_perc [ 1 ] @blue_perc = @overall_perc [ 2 ] @red_perc = @overall_perc [ 3 ] @green_perc = @overall_perc [ 4 ] @grey_total = 26 @yellow_total = 4 @blue_total = 1 @red_total = 2 @green_total = 3 @overall_total = [ @grey_total + @yellow_total + @blue_total + @red_total + @green_total ] @overall_int = @overall_total . inject ( 0 ) { | sum , x | sum + x } prob_input end
determines information about the total quantity of tranche supply
determines information about the total quantity of tranche supply
# total percent for each: grey, yellow, blue, red, green. # presuming there are 40 total units which would span eight releases in the tranche # independent probability that a run contains a certain color #total number of each color in the release tranche