# Path: ANNarchy/core/Random.py
# class RandomDistribution(object):
# class Uniform(RandomDistribution):
# class DiscreteUniform(RandomDistribution):
# class Normal(RandomDistribution):
# class LogNormal(RandomDistribution):
# class Exponential(RandomDistribution):
# class Gamma(RandomDistribution):
#     def get_values(self, shape):
#     def get_list_values(self, size):
#     def get_value(self):
#     def keywords(self):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, min, max):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, min, max):
#     def get_values(self, shape):
#     def latex(self):
#     def __init__(self, mu, sigma, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, mu, sigma, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, Lambda, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def __init__(self, alpha, beta=1.0, seed=-1, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):


import ANNarchy.core.Global as Global
import re
        import sympy
from ANNarchy.core.Random import available_distributions, distributions_arguments, distributions_equivalents
from ANNarchy.parser.Equation import Equation
from ANNarchy.parser.Function import FunctionParser
from ANNarchy.parser.StringManipulation import *
from ANNarchy.parser.ITE import *
        from inspect import getmembers
    split = eq.split(':')
    if len(split) > 1: # flag given
        eq = split[0]
        flags = split[1].strip()
        split = flags.split(' ')
        for el in split:
            if el.strip() == 'all':
                pop['stop_condition']['type'] = 'all'
    # Convert the expression
    translator = Equation('stop_cond', eq,
                          pop,
                          type = 'cond')
    code = translator.parse()
    deps = translator.dependencies()

    pop['stop_condition']['cpp'] = '(' + code + ')'
    pop['stop_condition']['dependencies'] = deps

def extract_structural_plasticity(statement, description):
    # Extract flags
    try:
        eq, constraint = statement.rsplit(':', 1)
        bounds, flags = extract_flags(constraint)
    except:
        eq = statement.strip()
        bounds = {}
        flags = []

    # Extract RD
    rd = None

# Path: ANNarchy/core/Random.py
# class RandomDistribution(object):
# class Uniform(RandomDistribution):
# class DiscreteUniform(RandomDistribution):
# class Normal(RandomDistribution):
# class LogNormal(RandomDistribution):
# class Exponential(RandomDistribution):
# class Gamma(RandomDistribution):
#     def get_values(self, shape):
#     def get_list_values(self, size):
#     def get_value(self):
#     def keywords(self):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, min, max):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, min, max):
#     def get_values(self, shape):
#     def latex(self):
#     def __init__(self, mu, sigma, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, mu, sigma, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def get_cpp_args(self):
#     def __init__(self, Lambda, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):
#     def __init__(self, alpha, beta=1.0, seed=-1, min=None, max=None):
#     def get_values(self, shape):
#     def latex(self):


# Path: ANNarchy/parser/Extraction.py
import ANNarchy.core.Global as Global
import re
        import sympy
from ANNarchy.core.Random import available_distributions, distributions_arguments, distributions_equivalents
from ANNarchy.parser.Equation import Equation
from ANNarchy.parser.Function import FunctionParser
from ANNarchy.parser.StringManipulation import *
from ANNarchy.parser.ITE import *
        from inspect import getmembers

    split = eq.split(':')
    if len(split) > 1: # flag given
        eq = split[0]
        flags = split[1].strip()
        split = flags.split(' ')
        for el in split:
            if el.strip() == 'all':
                pop['stop_condition']['type'] = 'all'
    # Convert the expression
    translator = Equation('stop_cond', eq,
                          pop,
                          type = 'cond')
    code = translator.parse()
    deps = translator.dependencies()

    pop['stop_condition']['cpp'] = '(' + code + ')'
    pop['stop_condition']['dependencies'] = deps

def extract_structural_plasticity(statement, description):
    # Extract flags
    try:
        eq, constraint = statement.rsplit(':', 1)
        bounds, flags = extract_flags(constraint)
    except:
        eq = statement.strip()
        bounds = {}
        flags = []

    # Extract RD
    rd = None

    for dist in available_distributions: