Class: Selection::Ranking::RankedFields

Inherits:
Struct
  • Object
show all
Defined in:
../lib/ranking.rb

Overview

The result of ranking assignment for a single population member:


  original .. the original individual object
  rank .. Ranking. The best individuals obtain 0, the second ones 1, etc. Note that more individuals with the same
          (fitness) criterion value can share the same rank value.
  proportion = min + (max-min) * (N-rank)/N
  index .. index (order) in the original population.

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Object) index

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



20
21
22
# File '../lib/ranking.rb', line 20

def index
  @index
end

- (Object) original

Returns the value of attribute original

Returns:

  • (Object)

    the current value of original



20
21
22
# File '../lib/ranking.rb', line 20

def original
  @original
end

- (Object) proportion

Returns the value of attribute proportion

Returns:

  • (Object)

    the current value of proportion



20
21
22
# File '../lib/ranking.rb', line 20

def proportion
  @proportion
end

- (Object) rank

Returns the value of attribute rank

Returns:

  • (Object)

    the current value of rank



20
21
22
# File '../lib/ranking.rb', line 20

def rank
  @rank
end