topobench.transforms.data_manipulations.redefine_simplicial_neighbourhoods module#

An transform that redifines simplicial complex neighbourhood.

class RedefineSimplicialNeighbourhoods(**kwargs)#

Bases: BaseTransform

An transform that redifines simplicial complex neighbourhood.

Parameters:
**kwargsoptional

Parameters for the base transform.

__init__(**kwargs)#
forward(data)#

Apply the transform to the input data.

Parameters:
datatorch_geometric.data.Data

The input data.

Returns:
torch_geometric.data.Data

The same data.

data2simplicial(data)#

Convert a data dictionary into a SimplicialComplex object.

Parameters:
datadict

A dictionary containing at least ‘incidence_0’, ‘adjacency_0’, ‘incidence_1’, ‘incidence_2’, and optionally ‘incidence_3’ tensors.

Returns:
SimplicialComplex

A SimplicialComplex object constructed from nodes, edges, triangles, and tetrahedrons.

get_complex_connectivity(complex, max_rank, neighborhoods=None, signed=False)#

Get the connectivity matrices for the complex.

Parameters:
complextoponetx.CellComplex or toponetx.SimplicialComplex

Cell complex.

max_rankint

Maximum rank of the complex.

neighborhoodslist, optional

List of neighborhoods of interest.

signedbool, optional

If True, returns signed connectivity matrices.

Returns:
dict

Dictionary containing the connectivity matrices.