Changeset 141


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

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

Location:
cpp/frams
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/Makefile-GDK-files

    r140 r141  
    55
    66GENOCONV_GDK_OBJS=frams/genetics/f1/conv_f1.o frams/genetics/f9/conv_f9.o frams/genetics/fF/conv_fF.o
    7 GENMAN_GDK_OBJS=frams/genetics/f9/oper_f9.o frams/genetics/fF/oper_fF.o
     7
     8GENMAN_COMMON_OBJS=frams/genetics/genman.o frams/param/mutableparam.o frams/param/mutparamlist.o frams/neuro/geneticneuroparam.o frams/neuro/neurolibparam.o frams/vm/classes/genoobj.o frams/model/autoname.o
     9GENMAN_GDK_OBJS=$(GENMAN_COMMON_OBJS) frams/genetics/f9/oper_f9.o frams/genetics/fF/oper_fF.o
    810
    911GDK_OBJS=frams/util/list.o frams/util/advlist.o frams/param/param.o frams/util/sstring.o frams/util/sstringutils.o frams/util/3d.o frams/vm/classes/3dobject.o frams/model/model.o frams/model/modelparts.o frams/neuro/neurolibrary.o frams/genetics/geno.o frams/genetics/genoconv.o frams/util/extvalue.o frams/vm/classes/collectionobj.o frams/util/hashtable.o common/framsg.o frams/util/callbacks.o frams/param/syntparam.o frams/util/multirange.o frams/util/multimap.o frams/param/paramtabobj.o frams/genetics/defgenoconv.o frams/errmgr/errmanager.o frams/param/paramobj.o frams/genetics/oper_fx.o common/nonstd_math.o frams/errmgr/stderrors.o common/Convert.o frams/util/rndutil.o
     
    2224GENOCONV_TEST_OBJS= frams/_demos/genoconv_test.o frams/_demos/printconvmap.o frams/errmgr/stdouterr.o frams/virtfile/virtfile.o  $(GDK_OBJS) $(GENOCONV_GDK_OBJS)
    2325
    24 GENO_TEST_OBJS= frams/_demos/geno_test.o frams/virtfile/virtfile.o   $(GDK_OBJS) $(GENOCONV_GDK_OBJS)
     26GENO_TEST_OBJS= frams/_demos/geno_test.o frams/virtfile/virtfile.o   $(GDK_OBJS) $(GENOCONV_GDK_OBJS) $(GENMAN_GDK_OBJS)
    2527
    2628NEURO_TEST_OBJS= frams/_demos/neuro_test.o frams/errmgr/stdouterr.o frams/virtfile/virtfile.o \
     
    3638NEURO_LAYOUT_TEST_OBJS= frams/_demos/neuro_layout_test.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o $(GDK_OBJS) $(GENOCONV_GDK_OBJS) frams/canvas/nn_layout_model.o frams/canvas/nn_simple_layout.o frams/canvas/nn_smart_layout.o
    3739
    38 GENOOPER_TEST_OBJS=frams/_demos/genooper_test.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o $(GDK_OBJS) $(GENOCONV_GDK_OBJS) $(GENMAN_GDK_OBJS) frams/genetics/genman.o frams/param/mutableparam.o frams/param/mutparamlist.o frams/neuro/geneticneuroparam.o frams/neuro/neurolibparam.o frams/vm/classes/genoobj.o frams/model/autoname.o
     40GENOOPER_TEST_OBJS=frams/_demos/genooper_test.o frams/virtfile/virtfile.o frams/errmgr/stdouterr.o $(GDK_OBJS) $(GENOCONV_GDK_OBJS) $(GENMAN_GDK_OBJS)
  • 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.