Learn R Programming

cayleyR (version 0.2.1)

calculate_differences_gpu: Calculate Manhattan Distances on GPU

Description

Computes Manhattan distance from a reference state to each row of a matrix using ggml Vulkan backend: sub -> abs -> sum_rows.

Usage

calculate_differences_gpu(start_state, states_matrix)

Value

Numeric vector of Manhattan distances (length nrow)

Arguments

start_state

Integer vector, the reference state (length n)

states_matrix

Numeric matrix (nrow x n), each row is a state