Class: Mapper::BreadthFirst

Inherits:
Generator show all
Includes:
ConstantsNoSupport, ExtendBreadth, LocusFirst
Defined in:
../lib/mapper.rb

Overview

Mapper class employing the breath-first node expansion strategy:


  1. Create the list L of the all unresolved nodes (nonterminal symbols ready for the expansion).
  2. Select only the nodes with the minimal depth from the list L and name it M.
  3. Select the first node N (and the corresponding nonterminal symbol S) of the list M.
  4. Take the codon of the genome and use it for selection of rule Alternative Mapper::RuleAlt of grammar[S]
  5. Expand the symbol S.
  6. Repeat from the step 1 until the termination condition (see Mapper::Base) is met.

Instance Attribute Summary

Attributes inherited from Generator

#generated_count, #random

Attributes inherited from Base

#codon, #complexity, #consume_trivial_codons, #grammar, #mapped_count, #track_support, #track_support_on, #used_length, #wraps_to_fading, #wraps_to_fail

Method Summary

Methods included from ConstantsNoSupport

#modify_expansion_base, #modify_expansion_generate

Methods inherited from Generator

#generate, #generate_full, #generate_grow, #initialize

Methods inherited from Base

#initialize, #phenotype

Constructor Details

This class inherits a constructor from Mapper::Generator