import * as tf from '../backend/adapter'; import { SparseMatrix } from './sparse'; /** * For *k*-NN graphs the affinity matrix must be symmetrised * (`A = 0.5 * (A + Aᵀ)`) before calling this function. */ export declare function degree_vector(A: tf.Tensor2D): tf.Tensor1D; /** * L = I − D^{-1/2} · A · D^{-1/2} * * where * • `A` is the affinity / adjacency matrix * • `D` is the diagonal *degree* matrix with `D[i,i] = Σ_j A[i,j]` * * Isolated vertices (zero degree) are handled gracefully by treating * `D^{-1/2}` as **0** for the corresponding diagonal entry which leaves the * row & column of `L` equal to the identity matrix (no connections). */ export declare function normalised_laplacian(A: tf.Tensor2D): tf.Tensor2D; export declare function normalised_laplacian(A: tf.Tensor2D, return_diag: true): { laplacian: tf.Tensor2D; sqrt_degrees: tf.Tensor1D; }; interface MatrixFreeOperator { n: number; matvec: (vector: Float64Array) => Float64Array; } interface SparseNormalisedLaplacian { operator: MatrixFreeOperator; sqrt_degrees: Float64Array; degrees: Float64Array; } export declare function sparse_normalised_laplacian_operator(affinity: SparseMatrix): SparseNormalisedLaplacian; export {};