Learn R Programming

cayleyR (version 0.2.1)

.manhattan_distance_matrix_gpu_batch: Single-batch GPU pairwise Manhattan distance

Description

Uses 3D tensors: repeat s1 along dim2, repeat s2 along dim1, then sub -> abs -> sum_rows. Result shape is (1, N1, N2) which gives the N1 x N2 distance matrix.

Usage

.manhattan_distance_matrix_gpu_batch(states1, states2)

Value

Numeric matrix (N1 x N2)

Arguments

states1

Numeric matrix (N1 x n)

states2

Numeric matrix (N2 x n)