utility

Utility algorithms

This module contains logical and mathematical utility functions used by other MDCraft modules.

Functions

depth_first_search

Implements the depth-first search algorithm to find connected components in a graph.

find_connected_nodes

Finds connected components in a graph.

get_closest_factors

Finds the \(n\) closest factors for a given number \(N\), sorted in ascending order.

is_lower_triangular

Checks if a matrix is lower triangular.

rebin

Rebins discrete data.

replicate

Replicates points in an unit cell along the \(x\)-, \(y\)-, and \(z\)-directions.