Utils

Misc

Cache([counter])

Class that acts as a cache.

callback_to_list(callback)

Cast callback to list.

IntEnum2(value)

Class that extends enum.IntEnum with alternative constructor.

is_int(obj)

Check whether object is int, numpy.int32, or numpy.int64.

is_iterable(obj)

Check whether object has an iterator.

sparse_format(M, return_as)

Change format of sparse matrix M.

Linalg

SingularLaplaceError([msg, network, weight, ...])

Error that occured while computing the Laplace matrix.

InverseMethod(value)

Enum defining the method to invert a matrix.

CholeskyInverse(cho_fac[, return_reduced])

A class representing the inverse of some matrix based on the cho decomp.

star_inv(matrix[, method, reduced, ...])

Compute the pseudo inverse of matrix mapping into subspace with v_1=0.

star_update_by_edge(net, lstar, edge, delta_c)

Update the Laplace pseudoinverse lstar when edge weight changes.

Other Math

np_divide_a_by_b(a, b[, default_value, ...])

Safely divide a by b.

find_min_col_lex(M)

Find the minimal column of a matrix M lexiographically.

bisec_fast(func[, tol, lo, up, exclude_lo, ...])

Use the bisection method to find a root of func between lo and up.

bisec_method(func[, tol, lo, up, debug, ...])

Execute the bisection method to find a root of func.

Readin

parse_polynomial(poly)

Get polynomial coefficients froms string.

parse_number(number_str[, to_type])

Convert number from str to to_type.

xml_find_root(data[, root_tag])

Find root element in XML data.

xml_add_element(parent, name[, overwrite, ...])

Callback

CallBackFlag(value)

Enum defining callback flags for callbacks.

SimpleTimer()

Callback to generate basic timing infos for iterative solver.

SimpleDebuggerIterativeModel()

Simple callback that stores copies of the model during run.

IO

save_object(obj, file)

Save object via pickle.

load_object(file)

Load object via pickle.

prettify_xml(file)

Prettify an xml file.