Beispiel #1
0
 def get_proposal_points(self, n):
     """
     Returns n points which lie on a uniform grid on the "center" of the banana
     """
     if self.dimension == 2:
         (xmin, xmax), _ = self.get_plotting_bounds()
         x1 = linspace(xmin, xmax, n)
         x2 = self.bananicity * (x1**2 - self.V)
         return array([x1, x2]).T
     else:
         return Distribution.get_proposal_points(self, n)
Beispiel #2
0
 def get_proposal_points(self, n):
     """
     Returns n points which lie on a uniform grid on the "center" of the banana
     """
     if self.dimension == 2:
         (xmin, xmax), _ = self.get_plotting_bounds()
         x1 = linspace(xmin, xmax, n)
         x2 = self.bananicity * (x1 ** 2 - self.V)
         return array([x1, x2]).T
     else:
         return Distribution.get_proposal_points(self, n)
Beispiel #3
0
 def get_proposal_points(self, n):
     """
     Returns n points which lie on a uniform grid on the "center" of the flower
     """
     if self.dimension == 2:
         theta = linspace(0, 2 * pi, n)
         
         # sample radius
         radius_sample = zeros(n) + self.radius + \
             self.amplitude * cos(self.frequency * theta)
         
         # sample points
         X = array((cos(theta) * radius_sample, sin(theta) * radius_sample)).T
         
         return X
     else:
         return Distribution.get_proposal_points(self, n)
Beispiel #4
0
    def get_proposal_points(self, n):
        """
        Returns n points which lie on a uniform grid on the "center" of the flower
        """
        if self.dimension == 2:
            theta = linspace(0, 2 * pi, n)

            # sample radius
            radius_sample = zeros(n) + self.radius + \
                self.amplitude * cos(self.frequency * theta)

            # sample points
            X = array(
                (cos(theta) * radius_sample, sin(theta) * radius_sample)).T

            return X
        else:
            return Distribution.get_proposal_points(self, n)