numerical_function_spaces.orlicz_spaces.norms ============================================= .. py:module:: numerical_function_spaces.orlicz_spaces.norms Functions --------- .. autoapisummary:: numerical_function_spaces.orlicz_spaces.norms.kappa numerical_function_spaces.orlicz_spaces.norms.p_Amemiya_norm numerical_function_spaces.orlicz_spaces.norms.Orlicz_norm_with_stars numerical_function_spaces.orlicz_spaces.norms.Luxemburg_norm_with_stars numerical_function_spaces.orlicz_spaces.norms.p_Amemiya_norm_with_stars numerical_function_spaces.orlicz_spaces.norms.p_Amemiya_norm_with_stars_by_decimal Module Contents --------------- .. py:function:: kappa(Orlicz_function, x, k, p_norm) Calculates the kappa value for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k: must be positive. :type k: float :param p_norm: The p-norm to be calculated. :type p_norm: float :returns: **The kappa value** :rtype: np.float64. :raises ValueError: If x[1, :] contains non-positive values.: .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u ... >>> kappa(Orlicz_function, x=x, k=1, p_norm=1) np.float64(2.0) .. py:function:: p_Amemiya_norm(Orlicz_function, x: numpy.ndarray, p_norm: float) Calculates the p_Amemiya norm for a given set of parameters. :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :returns: **value of the p-Amemiya norm** :rtype: np.float64. :raises ValueError: If x[1, :] contains non-positive values.: .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u ... >>> p_Amemiya_norm(Orlicz_function, x=x, p_norm=1) np.float64(1.0) .. py:function:: Orlicz_norm_with_stars(Orlicz_function, x: numpy.ndarray, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the Orlicz norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters as p_Amimiya norm for p_norm=1 :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: - A tuple containing the value of the Orlicz norm, k^{*}, k^{**}. .. rubric:: Examples >>> x = np.array([[1],[2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, 0, u - 1) ... >>> Orlicz_norm_with_stars(Orlicz_function, x) (np.float64(1.000008302431002), np.float64(1.0000083024999329), np.float64(1.0000083024999329)) .. py:function:: Luxemburg_norm_with_stars(Orlicz_function, x: numpy.ndarray, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the Luxemburg norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters as p_Amimiya norm for p_norm=np.inf :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: - A tuple containing the value of the Luxemburg norm, k^{*}, k^{**}. .. rubric:: Examples >>> x = np.array([[1],[2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, 0, u - 1) ... >>> Luxemburg_norm_with_stars(Orlicz_function, x) (np.float64(0.666712308582787), np.float64(1.4998973127189956), np.float64(1.4998973127189956)) .. py:function:: p_Amemiya_norm_with_stars(Orlicz_function, x: numpy.ndarray, p_norm: float, k_min: float = 1e-06, k_max: float = 100, dk: float = None, len_domain_k: int = 1000, show_progress: bool = False) Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters :param Orlicz_function: The Orlicz function to be used. :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated. :type p_norm: float :param k_min: The minimum value of the k domain, by default 0.000001. :type k_min: float, optional :param k_max: The maximum value of the k domain, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default, False. :type show_progress: bool, optional :rtype: A tuple containing the value of the p-Amemiya norm, k^{*}, k^{**}. .. note:: Precision problem with k^{*} false less than k^{**} for Phi = max(u,2u-1), x=chi_(0,3), p=20. Too small accuracy. Problem eliminated in slower function p_Amemiya_norm_with_stars_by_decimal(). .. rubric:: Examples >>> x = np.array([[1],[1]]) >>> def Orlicz_function(u): ... return u**2 ... >>> p_Amemiya_norm_with_stars(Orlicz_function, x=x, p_norm=1) (np.float64(2.000000000068931), np.float64(1.0000083024999067), np.float64(1.0000083024999067)) .. py:function:: p_Amemiya_norm_with_stars_by_decimal(Orlicz_function, x: numpy.ndarray, p_norm: decimal.Decimal, k_min: decimal.Decimal = dc.Decimal(1) / 100000, k_max: decimal.Decimal = dc.Decimal(100), dk: decimal.Decimal = None, len_domain_k: int = 1000, show_progress: bool = False) -> tuple Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)" in Orlicz space for a given set of parameters :param Orlicz_function: The Orlicz function to be used in form accepting decimal numbers :type Orlicz_function: function :param x: A 2D numpy array representing x(t). :type x: np.ndarray :param p_norm: The p-norm to be calculated (in decimal form). :type p_norm: float :param k_min: The minimum value of the k domain in decimal form, by default 1/100000. :type k_min: float, optional :param k_max: The maximum value of the k domain in decimal form, by default 100. :type k_max: float, optional :param dk: Step of k_domain, by default None When given, more important than len_domain_k :type dk: float, optional :param len_domain_k: The number of points in the k domain in decimal form, by default 1000. :type len_domain_k: int, optional :param show_progress: Whether to show a progress bar during computation, by default False. :type show_progress: bool, optional :rtype: A tuple containing the minimum value of the p-Amemiya norm, k^{*}, k^{**}, kappa_domain, and kappa_values. :raises - ValueError: If any value in x[1, :] is less than or equal to 0.: .. rubric:: Examples >>> x = np.array([[1], [2]]) >>> def Orlicz_function(u): ... return np.where(u <= 1, u, dc.Decimal(np.inf)) ... >>> dc.getcontext().prec = 20 >>> p_Amemiya_norm_with_stars_by_decimal(Orlicz_function, x=x, p_norm=dc.Decimal(np.inf), ... k_min = dc.Decimal(4)/10, ... k_max = dc.Decimal(11)/10, ... dk = dc.Decimal(1)/100) ... (Decimal('1.9999999999999999999'), Decimal('0.50'), Decimal('1.00'))