Miscellaneous¶
This module provides various following miscellaneous functions.
- pyrigi.misc.is_isomorphic_graph_list(list1, list2)[source]¶
Return whether two lists of graphs are the same up to graph isomorphism.
- Return type:
- pyrigi.misc.is_zero(expr, numerical=False, tolerance=1e-09)[source]¶
Return if the given expression is zero.
- pyrigi.misc.is_zero_vector(vector, numerical=False, tolerance=1e-09)[source]¶
Return if the given vector is zero.
- Parameters:
vector (
Sequence
[int
|float
|str
]) – Vector that is checked.numerical (
bool
) – IfTrue
, then the check is done only numerically with the given tolerance. IfFalse
(default), the check is done symbolically,sympy
attributeis_zero
is used.tolerance (
float
) – The tolerance that is used in the numerical check coordinate-wise.
- Return type:
- pyrigi.misc.point_to_vector(point)[source]¶
Return point as single column sympy Matrix.
- Return type:
- Parameters:
- pyrigi.misc.sympy_expr_to_float(expression, tolerance=1e-09)[source]¶
Convert a sympy expression to (numerical) floats.
If the given
expression
is aSequence
ofNumbers
or aMatrix
, then each individual element is evaluated and a list offloat
is returned. If the input is just a single sympy expression, it is evaluated and returned as afloat
.- Parameters:
- Return type:
Notes
The method
data_type.point_to_vector()
is used to ensure that the input is consistent with the sympy format.