thgsp.graphs

Contents

Graph Classes

class GraphBase(adjacency, coords: Optional[torch.Tensor] = None, cache: bool = True, requires_grad: bool = False, **kwargs)[source]
L(lap_type: str = 'sym')[source]

Compute a specific type of Laplacian matrix. If self._lap_type equals to lap_type and self.cache is True, then return the cached Laplacian matrix. Note that every time you compute Laplacian with a different type from the last, the cached matrix will be overwritten.

Parameters

lap_type (str) – One of [“sym”, “comb”, “rw”]

Returns

Return type

The Laplacian matrix

__init__(adjacency, coords: Optional[torch.Tensor] = None, cache: bool = True, requires_grad: bool = False, **kwargs)[source]
class Graph(adjacency, coords: Optional[torch.Tensor] = None, cache: bool = False, requires_grad: bool = False, copy: bool = True, **kwargs)[source]
class DiGraph(adjacency, coords: Optional[torch.Tensor] = None, cache: bool = False, requires_grad: bool = False, copy: bool = True, **kwargs)[source]