numerical_function_spaces.orlicz_spaces.norms

Functions

kappa(Orlicz_function, x, k, p_norm)

Calculates the kappa value for a given set of parameters.

p_Amemiya_norm(Orlicz_function, x, p_norm)

Calculates the p_Amemiya norm for a given set of parameters.

Orlicz_norm_with_stars(Orlicz_function, x[, k_min, ...])

Computes the Orlicz norm and k^{*} and k^{**} of the function "x(t)"

Luxemburg_norm_with_stars(Orlicz_function, x[, k_min, ...])

Computes the Luxemburg norm and k^{*} and k^{**} of the function "x(t)"

p_Amemiya_norm_with_stars(Orlicz_function, x, p_norm)

Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)"

p_Amemiya_norm_with_stars_by_decimal(/ 100000, k_max, ...)

Computes the p-Amemiya norm and k^{*} and k^{**} of the function "x(t)"

Module Contents

numerical_function_spaces.orlicz_spaces.norms.kappa(Orlicz_function, x, k, p_norm)[source]

Calculates the kappa value for a given set of parameters.

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used.

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • k (float) – must be positive.

  • p_norm (float) – The p-norm to be calculated.

Returns:

The kappa value

Return type:

np.float64.

Raises:

ValueError – If x[1, :] contains non-positive values.:

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)
numerical_function_spaces.orlicz_spaces.norms.p_Amemiya_norm(Orlicz_function, x: numpy.ndarray, p_norm: float)[source]

Calculates the p_Amemiya norm for a given set of parameters.

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used.

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • p_norm (float) – The p-norm to be calculated.

Returns:

value of the p-Amemiya norm

Return type:

np.float64.

Raises:

ValueError – If x[1, :] contains non-positive values.:

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)
numerical_function_spaces.orlicz_spaces.norms.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)[source]

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

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used.

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • k_min (float, optional) – The minimum value of the k domain, by default 0.000001.

  • k_max (float, optional) – The maximum value of the k domain, by default 100.

  • dk (float, optional) – Step of k_domain, by default None When given, more important than len_domain_k

  • len_domain_k (int, optional) – The number of points in the k domain, by default 1000.

  • show_progress (bool, optional) – Whether to show a progress bar during computation, by default, False.

Return type:

  • A tuple containing the value of the Orlicz norm, k^{*}, k^{**}.

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))
numerical_function_spaces.orlicz_spaces.norms.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)[source]

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

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used.

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • k_min (float, optional) – The minimum value of the k domain, by default 0.000001.

  • k_max (float, optional) – The maximum value of the k domain, by default 100.

  • dk (float, optional) – Step of k_domain, by default None When given, more important than len_domain_k

  • len_domain_k (int, optional) – The number of points in the k domain, by default 1000.

  • show_progress (bool, optional) – Whether to show a progress bar during computation, by default, False.

Return type:

  • A tuple containing the value of the Luxemburg norm, k^{*}, k^{**}.

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))
numerical_function_spaces.orlicz_spaces.norms.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)[source]

Computes the p-Amemiya norm and k^{*} and k^{**} of the function “x(t)” in Orlicz space for a given set of parameters

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used.

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • p_norm (float) – The p-norm to be calculated.

  • k_min (float, optional) – The minimum value of the k domain, by default 0.000001.

  • k_max (float, optional) – The maximum value of the k domain, by default 100.

  • dk (float, optional) – Step of k_domain, by default None When given, more important than len_domain_k

  • len_domain_k (int, optional) – The number of points in the k domain, by default 1000.

  • show_progress (bool, optional) – Whether to show a progress bar during computation, by default, False.

Return type:

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().

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))
numerical_function_spaces.orlicz_spaces.norms.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[source]

Computes the p-Amemiya norm and k^{*} and k^{**} of the function “x(t)” in Orlicz space for a given set of parameters

Parameters:
  • Orlicz_function (function) – The Orlicz function to be used in form accepting decimal numbers

  • x (np.ndarray) – A 2D numpy array representing x(t).

  • p_norm (float) – The p-norm to be calculated (in decimal form).

  • k_min (float, optional) – The minimum value of the k domain in decimal form, by default 1/100000.

  • k_max (float, optional) – The maximum value of the k domain in decimal form, by default 100.

  • dk (float, optional) – Step of k_domain, by default None When given, more important than len_domain_k

  • len_domain_k (int, optional) – The number of points in the k domain in decimal form, by default 1000.

  • show_progress (bool, optional) – Whether to show a progress bar during computation, by default False.

Return type:

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.:

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'))