Miscellaneous

The following functions are used in the code.

pyrigi.misc.is_zero_vector(vector, numerical=False, tolerance=1e-09)[source]

Check if the given vector is zero.

Parameters:
  • vector (Sequence[int | float | str]) – Vector that is checked.

  • numerical (bool) – If True, then the check is done only numerically with the given tolerance. If False (default), the check is done symbolically, sympy is_zero is used.

  • tolerance (float) – The tolerance that is used in the numerical check coordinate-wise.

Return type:

bool

pyrigi.misc.eval_sympy_vector(vector, tolerance=1e-09)[source]

Converts a sympy vector to a (numerical) list of floats.

Parameters:
  • vector (Sequence[int | float | str]) – The sympy vector.

  • tolerance (float) – Intended level of numerical accuracy.

Return type:

List[float]

Notes

The method data_type.point_to_vector() is used to ensure that the input is consistent with the sympy format.