Ignore:
Timestamp:
02/15/18 00:42:07 (7 years ago)
Author:
Maciej Komosinski
Message:

Added support for "checkpoints" (intermediate phases of development of the Model when converting between genetic encodings). See Model.checkpoint() and conv_f1.cpp for an example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/genoconv.cpp

    r534 r732  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    8181
    8282GenoConvManager::GenoConvManager()
    83 :param(this)
     83        :param(this)
    8484{
    8585}
     
    166166}
    167167
    168 Geno GenoConvManager::convert(Geno &in, char format, MultiMap *map, bool *converter_missing)
     168Geno GenoConvManager::convert(Geno &in, char format, MultiMap *map, bool using_checkpoints, bool *converter_missing)
    169169{
    170170        if (in.getFormat() == format) { if (converter_missing) *converter_missing = false; return in; }
     
    187187        {
    188188                GenoConverter *gk = (GenoConverter*)converters(*t);
    189                 tmp = gk->convert(tmp, mapavail ? &tmpmap : 0);
     189                tmp = gk->convert(tmp, mapavail ? &tmpmap : 0, using_checkpoints);
    190190                if (!tmp.len())
    191191                {
    192                         string t=ssprintf("f%c->f%c conversion failed (%s)", gk->in_format, gk->out_format, gk->name);
     192                        string t = ssprintf("f%c->f%c conversion failed (%s)", gk->in_format, gk->out_format, gk->name);
    193193                        return Geno(0, 0, 0, t.c_str());
    194194                }
Note: See TracChangeset for help on using the changeset viewer.