#NEWLINE# def initialiseShapeLearners( self ) : #NEWLINE# #INDENT# self . shapeLearners_currentCollection = [ ] #NEWLINE# self . settings_shapeLearners_currentCollection = [ ] #NEWLINE# self . shapeLearnersSeenBefore_currentCollection = [ ] #NEWLINE# for i in range ( len ( self . currentCollection ) ) : #NEWLINE# #INDENT# shapeType = self . currentCollection [ i ] #NEWLINE# try : #NEWLINE# #INDENT# shapeType_index = self . shapesLearnt . index ( shapeType ) #NEWLINE# newShape = False #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# newShape = True #NEWLINE# #UNINDENT# self . shapeLearnersSeenBefore_currentCollection . append ( ( not newShape ) ) #NEWLINE# if newShape : #NEWLINE# #INDENT# settings = self . generateSettings ( shapeType ) #NEWLINE# shapeLearner = ShapeLearner ( settings ) #NEWLINE# self . shapesLearnt . append ( shapeType ) #NEWLINE# self . shapeLearners_all . append ( shapeLearner ) #NEWLINE# self . settings_shapeLearners_all . append ( settings ) #NEWLINE# self . shapeLearners_currentCollection . append ( self . shapeLearners_all [ ( - 1 ) ] ) #NEWLINE# self . settings_shapeLearners_currentCollection . append ( self . settings_shapeLearners_all [ ( - 1 ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# previousBounds = self . shapeLearners_all [ shapeType_index ] . getParameterBounds ( ) #NEWLINE# newInitialBounds = previousBounds #NEWLINE# newInitialBounds [ ( 0 , 0 ) ] -= boundExpandingAmount #NEWLINE# newInitialBounds [ ( 0 , 1 ) ] += boundExpandingAmount #NEWLINE# self . shapeLearners_all [ shapeType_index ] . setParameterBounds ( newInitialBounds ) #NEWLINE# self . shapeLearners_currentCollection . append ( self . shapeLearners_all [ shapeType_index ] ) #NEWLINE# self . settings_shapeLearners_currentCollection . append ( self . settings_shapeLearners_all [ shapeType_index ] )