pairwise_adjacency: Compute a pairwise adjacency matrix for multiple graphs

View source: R/spatial_weights.R

pairwise_adjacencyR Documentation

Compute a pairwise adjacency matrix for multiple graphs

Description

This function computes a pairwise adjacency matrix for multiple graphs with a given set of spatial coordinates and feature vectors. The function takes two user-defined functions to compute within-graph and between-graph similarity measures.

Usage

pairwise_adjacency(Xcoords, Xfeats, fself, fbetween)

Arguments

Xcoords

A list of numeric matrices or data.frames containing the spatial coordinates of the nodes of each graph.

Xfeats

A list of numeric matrices or data.frames containing the feature vectors for the nodes of each graph.

fself

A function that computes similarity for nodes within the same graph (e.g., Xi_1, Xi_2).

fbetween

A function that computes similarity for nodes across graphs (e.g., Xi_1, Xj_1).

Value

A sparse matrix representing the pairwise adjacency matrix for the input graphs.


bbuchsbaum/graphweights documentation built on April 4, 2024, 7:19 p.m.