title: How to define an Initializer for GA1DArrayGenome<float> in GALib?
body: <p>I am using the GA1DArrayGenome class in the GALib2.4 Genetic Library. My aim is to optimize a list of 6 floating point numbers, so chromosomes should be something like [0.3 0.5 0.1 0.2 0.4 0.1], [0.03 0.04 0.1 0.2 0.05 0.8]...</p>
  
  <p>I have trouble initializing the population, since after calling the GASimpleGA::evolve(), I found that whatever random seed I used, the genes of every chromosome are [0 0 0 0 0 0].</p>
  
  <p>I checked the documentation and found that for GA1DArrayGenome class, the default Initializer is a GAGenome::NoInitializer, which, I assume, means I have to find another initializer for this genome class?</p>
  
  <pre><code>void main() {
  // ...
  GARandomSeed(1);
  GA1DArrayGenome&lt;float&gt; genome(6, &amp;Objective);
  genome.initializer(/* ?? */);
  
  GASimpleGA ga(genome);
  ga.populationSize(100);
  ga.nGenerations(100);
  ga.pMutation(0.001);
  ga.pCrossover(0.6);
  ga.evolve();
  cout &lt;&lt; ga.statistics().bestIndividual() &lt;&lt; endl;
  // ...
  }
  </code></pre>
  
  <p>The above is a procedure I use the GALib. It imitates what was done in the sample code ex27.C together with the library. However, the sample was doing something like</p>
  
  <pre><code>  // ...
    GA1DArrayGenome&lt;float&gt; genome(2, Objective);
    genome.initializer(::Initializer);
    genome.mutator(::Mutator);
    genome.comparator(::Comparator);
    genome.crossover(::Crossover);
    // ...
  </code></pre>
  
  <p>I don't quite get what it means by using no namespace before '::'.</p>
  
  <p>Can someone help me on this? Thank you.</p>