# 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
#     Copyright (C) 2013-2016  Julien Vitay <julien.vitay@gmail.com>,
#     Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com>
#
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
#
#     ANNarchy is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#===============================================================================



def extract_randomdist(description):
    " Extracts RandomDistribution objects from all variables"
    rk_rand = 0
    random_objects = []
    for variable in description['variables']:
        # Equation
        eq = variable['eq']
        # Dependencies
        dependencies = []
        # Search for all distributions

# 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

#     Copyright (C) 2013-2016  Julien Vitay <julien.vitay@gmail.com>,
#     Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com>
#
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
#
#     ANNarchy is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#===============================================================================



def extract_randomdist(description):
    " Extracts RandomDistribution objects from all variables"
    rk_rand = 0
    random_objects = []
    for variable in description['variables']:
        # Equation
        eq = variable['eq']
        # Dependencies
        dependencies = []
        # Search for all distributions

        for dist in available_distributions: