Changeset 141 for cpp/frams/_demos


Ignore:
Timestamp:
02/21/14 11:25:16 (10 years ago)
Author:
sz
Message:

Improved genotype validation in geno_test and genooper_test (using GenMan?'s genetic operators)

Location:
cpp/frams/_demos
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/geno_test.cpp

    r121 r141  
    77#include <frams/util/sstringutils.h>
    88#include <frams/genetics/defgenoconv.h>
     9#include <frams/genetics/genman.h>
    910
    1011/**
     
    1920int main(int argc,char*argv[])
    2021{
     22GenMan gm;
     23Geno::validators.insert(0,&gm); //GenMan is available in this application so let's use the extended validity checking!
     24// Note: insert() makes it the first validator in the list, this is important for formats that rely on genetic operators to perform reasonable validation,
     25// otherwise the default validator (genotype converter) would "win" and most converters are less strict in detecting invalid genotypes.
    2126if (argc<=1)
    2227        {
  • cpp/frams/_demos/genooper_test.cpp

    r139 r141  
    55#include <frams/genetics/genman.h>
    66#include <frams/errmgr/stdouterr.h>
     7#include <frams/genetics/defgenoconv.h>
    78
    89StdoutErrorHandler err;
     10DefaultGenoConvManager gcm; //without this object the application would only handle "format 0" genotypes
    911
    1012void printGen(Geno &g)
     
    2426{
    2527        GenMan gm;
     28        Geno::validators.insert(0,&gm); //GenMan is available in this application so let's use the extended validity checking!
     29        // Note: insert() makes it the first validator in the list, this is important for formats that rely on genetic operators to perform reasonable validation,
     30        // otherwise the default validator (genotype converter) would "win" and most converters are less strict in detecting invalid genotypes.
    2631        gm.p_report(NULL, NULL);
    2732
Note: See TracChangeset for help on using the changeset viewer.