Evolife documentation

     summary     

    

******************************************************************************************
Module Evolife.Tools.Tools:        
==========================
EVOLIFE: Module Tools: various functions
******************************************************************************************


    --------------------------------------------------------------------------------------
    Function decrease:        
    =================
    Computes a decreasing function of x in [0,M] which sums to 1
        1/(x+M) normalized for x in [0,M]
    --------------------------------------------------------------------------------------
    Arguments:
        . x
        . M
        . Selection


    --------------------------------------------------------------------------------------
    Function chances:        
    ================
    computes what one gets from a maximum of N with probability proba
    --------------------------------------------------------------------------------------
    Arguments:
        . proba
        . N


    --------------------------------------------------------------------------------------
    Function uniform:        
    ================
    computes random uniform variable between 0 and Max
    --------------------------------------------------------------------------------------
    Arguments:
        . proba
        . Max


    --------------------------------------------------------------------------------------
    Function fortune_wheel:        
    ======================
    draws one one the pie shares y picking a location uniformly
    --------------------------------------------------------------------------------------
    Arguments:
        . Probabilities


    --------------------------------------------------------------------------------------
    Function percent        
    --------------------------------------------------------------------------------------
    Arguments:
        . x


    --------------------------------------------------------------------------------------
    Function noise_mult:        
    ===================
    returns x affected by a multiplicative uniform noise
        between 1-range_/100 and 1+range_/100
    --------------------------------------------------------------------------------------
    Arguments:
        . x
        . range_


    --------------------------------------------------------------------------------------
    Function noise_add:        
    ==================
    returns x affected by an additive uniform noise
        between -range_ and range_
    --------------------------------------------------------------------------------------
    Arguments:
        . x
        . range_


    --------------------------------------------------------------------------------------
    Function transpose:        
    ==================
    groups ith items in each list of Matrix
    --------------------------------------------------------------------------------------
    Arguments:
        . Matrix


    --------------------------------------------------------------------------------------
    Function Nb2A:        
    =============
    converts a number into letters - Useful to list files in correct order
    --------------------------------------------------------------------------------------
    Arguments:
        . Nb


    --------------------------------------------------------------------------------------
    Function Nb2A0:        
    ==============
    converts a number into a padded string
    --------------------------------------------------------------------------------------
    Arguments:
        . Nb


    --------------------------------------------------------------------------------------
    Function Polygon:        
    ================
    computes a polygon function crossing all points in Points
    --------------------------------------------------------------------------------------
    Arguments:
        . x
        . Points


    --------------------------------------------------------------------------------------
    Function FileAnalysis:        
    =====================
    Analyses the content of a file and returns all matching occurrences of Pattern
    --------------------------------------------------------------------------------------
    Arguments:
        . FileName
        . Pattern
        . Flag


    --------------------------------------------------------------------------------------
    Function List2File:        
    ==================
    Saves a list of strings into a file
    --------------------------------------------------------------------------------------
    Arguments:
        . L
        . FileName


    --------------------------------------------------------------------------------------
    Function error        
    --------------------------------------------------------------------------------------
    Arguments:
        . ErrMsg
        . Explanation


    --------------------------------------------------------------------------------------
    Function warning        
    --------------------------------------------------------------------------------------
    Arguments:
        . WMsg
        . Explanation


    --------------------------------------------------------------------------------------
    Function boost        
    --------------------------------------------------------------------------------------


    **************************************************************************************
    Class EvolifeError        inherits from builtins.Exception
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method EvolifeError.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . Origine
            . Msg


    **************************************************************************************
    Class LimitedMemory:        
    ===================
    memory buffer with limited length
    **************************************************************************************

        ----------------------------------------------------------------------------------
        Method LimitedMemory.__init__        
        ----------------------------------------------------------------------------------
        Arguments:
            . MaxLength


        ----------------------------------------------------------------------------------
        Method LimitedMemory.reset        
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LimitedMemory.push        
        ----------------------------------------------------------------------------------
        Arguments:
            . Item


        ----------------------------------------------------------------------------------
        Method LimitedMemory.complete:        
        =============================
        full experience
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LimitedMemory.retrieve        
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LimitedMemory.last        
        ----------------------------------------------------------------------------------


        ----------------------------------------------------------------------------------
        Method LimitedMemory.pull        
        ----------------------------------------------------------------------------------


    

    

    Back to Evolife