pygenetics/ga_core.py
def ave_cost_fn_val(self):
        '''Returns average cost function return value for all members'''

        if len(self.__members) != 0:
            if self.__num_processes > 1:
                members = [m.get() for m in self.__members]
            else:
                members = self.__members
            return sum(m.cost_fn_val for m in members) / len(members)
        else:
            return None
def ave_cost_fn_val(self):
        '''Returns average cost function return value for all members'''

        if len(self.__members) != 0:
            if self.__num_processes > 1:
                members = [m.get() for m in self.__members]
            else:
                members = self.__members
            return sum(m.cost_fn_val for m in members) / len(members)
        else:
            return None
def ave_cost_fn_val ( self ) : if len ( self . __members ) != 0 : if self . __num_processes > 1 : members = [ m . get ( ) for m in self . __members ] else : members = self . __members return sum ( m . cost_fn_val for m in members ) / len ( members ) else : return None
Returns average cost function return value for all members
Returns average cost function return value for all members