-
graphicle.matrix.cut_adj(matrix: ndarray[Any, dtype[float64]], cut: float, mode: 'max' | 'min' =
'max', self_loop: bool =False, weighted: bool =False) ndarray[Any, dtype[float64]][source] Produce a directed adjacency matrix with outward edges towards the neighbours within a cut range, determined from the input affinity matrix.
The
cutrepresents the limiting value of the affinity matrix for elements to form edges in the adjacency matrix.New in version 0.1.0.
- Parameters:¶
- matrix : ndarray[float64]¶
Particle affinities.
- cut : float¶
Value beyond which affinities are not sufficient to form edges.
- mode : {'max', 'min'}¶
Sets whether affinities should be above or below cut. ‘max’ implies
matrix < cut, ‘min’ impliesmatrix > cut. Default is ‘max’.- self_loop : bool¶
If
Falsewill remove self-edges. Default isFalse.- weighted : bool¶
If
Trueedges weighted by affinity, ifFalseedge is binary. Default isFalse.
- Returns:¶
adj – Adjacency matrix representing particle connectivity.
- Return type:¶
ndarray[bool_] or ndarray[float64]
Notes
If weighted is
False, the returned adjacency matrix will be boolean.
Last update:
Jun 27, 2025