sp2graph.linalg_utils

Simple linear algebra functions.

sp2graph.linalg_utils.unitA(array)[source]

Returns the unit array

sp2graph.linalg_utils.closeV(iv, V, radius, displ=None)[source]

Returns an array off 1st neighbours indexes

sp2graph.linalg_utils.parallel(pt1, pt2)[source]

Returns a pair of points in \(\mathbb{R}^2\) belonging to a line parallel to the one defined by the provided points.

sp2graph.linalg_utils.ptOrtho(v1, v2, v3)[source]

Return a point slightly distant from ‘v2’ and belonging to the line orthogonal to (\(\overline{v2-v1}+\overline{v3-v2}\)) and that contains ‘v2’.

sp2graph.linalg_utils.findClosest(array, value)[source]

Returns the element index from ‘array’ that is closer to ‘value’.