<s> __author__ = '<STR_LIT>' <EOL> from pybrain . utilities import abstractMethod <EOL> from pybrain . structure . evolvables . evolvable import Evolvable <EOL> from pybrain . structure . parametercontainer import ParameterContainer <EOL> class TopologyEvolvable ( ParameterContainer ) : <EOL> """<STR_LIT>""" <EOL> pcontainer = None <EOL> def __init__ ( self , pcontainer , ** args ) : <EOL> self . setArgs ( ** args ) <EOL> self . pcontainer = pcontainer <EOL> @ property <EOL> def params ( self ) : <EOL> return self . pcontainer . params <EOL> def _setParameters ( self , x ) : <EOL> self . pcontainer . _setParameters ( x ) <EOL> def topologyMutate ( self ) : <EOL> abstractMethod ( ) <EOL> def newSimilarInstance ( self ) : <EOL> """<STR_LIT>""" <EOL> res = self . copy ( ) <EOL> res . randomize ( ) <EOL> return res <EOL> def copy ( self ) : <EOL> """<STR_LIT>""" <EOL> tmp = self . pcontainer <EOL> self . pcontainer = None <EOL> cp = Evolvable . copy ( self ) <EOL> cp . pcontainer = tmp <EOL> self . pcontainer = tmp <EOL> return cp </s>
