tf_G.utils.math

tf_G.utils.math Module

It contains some math utilities needed to another classes of the tf_G module.

ConvergenceCriterion

class tf_G.utils.math.convergence_criterion.ConvergenceCriterion[source]

Enum class that contains some convergence criteria.

The class has lambda functions that can be accessed as static class methods because it inherits Enum class.

The methods operates with two vectors and a convergence bound value.

INFINITY(i=None, x=None, y=None, c=None, n=None, dist=None)

INFINITY convergence criterion.

The one convergence criterion uses the norm infinity to gets the difference between two vectors and the compare it with the convergence bound c.

Returns:
Tensor that returns True if the difference of the
vectors is inside the convergence criterion interval, and False otherwise.
Return type:(tf.Tensor)
ONE(i=None, x=None, y=None, c=None, n=None, dist=None)

ONE convergence criterion.

The one convergence criterion uses the norm one to gets the difference between two vectors and the compare it with the convergence bound c.

Returns:
Tensor that returns True if the difference of the
vectors is inside the convergence criterion interval, and False otherwise.
Return type:(tf.Tensor)

VectorNorm

class tf_G.utils.math.vector_norm.VectorNorm[source]

Enum class that contains some vectorial norms.

The class has lambda functions that can be accessed as static class methods because it inherits Enum class.

The methods operates with a vector with 1-D rank.

EUCLIDEAN(x)

EUCLIDEAN norm.

The euclidean norm of the vector x.

Returns:Tensor that contains the eucledian norm of the vector.
Return type:(tf.Tensor)
INFINITY(x)

INFINITY norm.

The infinity norm of the vector x.

Returns:Tensor that contains the infinity norm of the vector.
Return type:(tf.Tensor)
ONE(x)

ONE norm.

The one norm of the vector x.

Returns:Tensor that contains the one norm of the vector.
Return type:(tf.Tensor)
P_NORM(x, p)

P-NORM norm.

The p-norm of the vector x.

Returns:Tensor that contains the p-norm of the vector.
Return type:(tf.Tensor)