Operators functions

Adj2vec

pygsp.operators.adj2vec(G)[source]

Prepare the graph for the gradient computation.

Parameters:G : Graph structure

Divergence

pygsp.operators.div(G, s)[source]

Compute Graph divergence of a signal.

Parameters:

G : Graph structure

s : ndarray

Signal living on the nodes

Returns:

di : float

The graph divergence

Gradient

pygsp.operators.grad(G, s)[source]

Compute the Graph gradient.

Parameters:

G : Graph structure

s : ndarray

Signal living on the nodes

Returns:

gr : ndarray

Gradient living on the edges

Gradient Matriciel

pygsp.operators.grad_mat(G)[source]

Gradient sparse matrix of the graph G.

Parameters:

G : Graph structure

Returns:

D : ndarray

Gradient sparse matrix

Gwft

pygsp.operators.generalized_wft(G, g, f, lowmemory=True)[source]

Graph windowed Fourier transform

Parameters:

G : Graph

g : ndarray or Filter

Window (graph signal or kernel)

f : ndarray

Graph signal

lowmemory : bool

use less memory (default=True)

Returns:

C : ndarray

Coefficients

Gwft2

pygsp.operators.gabor_wft(G, f, k)[source]

Graph windowed Fourier transform

Parameters:

G : Graph

f : ndarray

Graph signal

k : #TODO

kernel

Returns:

C : Coefficient.

Gwft Frame Matrix

pygsp.operators.gwft_frame_matrix(G, g)[source]

Create the matrix of the GWFT frame

Parameters:

G : Graph

g : window

Returns:

F : ndarray

Frame

Igft

pygsp.operators.igft(G, f_hat)[source]

Compute inverse graph Fourier transform.

Parameters:

G : Graph or Fourier basis

f_hat : ndarray

Signal

Returns:

f : ndarray

Inverse graph Fourier transform of f_hat

Ngwft

pygsp.operators.ngwft(G, f, g, lowmemory=True)[source]

Normalized graph windowed Fourier transform

Parameters:

G : Graph

f : ndarray

Graph signal

g : ndarray

Window

lowmemory : bool

Use less memory. (default = True)

Returns:

C : ndarray

Coefficients

Ngwft Frame Matrix

pygsp.operators.ngwft_frame_matrix(G, g)[source]

Create the matrix of the GWFT frame

Parameters:

G : Graph

g : ndarray

Window

Output parameters:

F : ndarray

Frame

Compute Fourier Basis

Compute Chebyshev Coefficient

pygsp.operators.compute_cheby_coeff(f, *args, **kwargs)

Chebyshev Operator

pygsp.operators.cheby_op(G, c, signal, **kwargs)[source]

Chebyshev polynomial of graph Laplacian applied to vector.

Parameters:

G : Graph

c : ndarray or list of ndarrays

Chebyshev coefficients for a Filter or a Filterbank

signal : ndarray

Signal to filter

Returns:

r : ndarray

Result of the filtering

Localize

pygsp.operators.localize(g, i)[source]

Localize a kernel g to the node i.

Parameters:

g : Filter

kernel (or filterbank)

i : int

Index of vertex

Returns:

gt : ndarray

Translated signal

Modulate

pygsp.operators.modulate(G, f, k)[source]

Tranlate the signal f to the node i.

Parameters:

G : Graph

f : ndarray

Signal (column)

k : int

Index of frequencies

Returns:

fm : ndarray

Modulated signal

Translate

pygsp.operators.translate(G, f, i)[source]

Tranlate the signal f to the node i

Parameters:

G : Graph

f : ndarray

Signal

i : int

Indices of vertex

Returns:

ft : translate signal