Skip to contents

Identical to apply_tensor() but also returns, for each response (reference) row, the in-window ground rows and their resolved window sizes. Powers the webtool Data View per-modality window-span hover. Kept as a separate export so apply_tensor()'s ABI (and tma's direct .Call to it) is unchanged.

Usage

apply_tensor_members(
  tensor,
  dims,
  dims_sender,
  dims_receiver,
  dims_mode,
  context_lookup,
  unit_rows,
  codes,
  times,
  ordered = TRUE
)

Arguments

tensor

Numeric vector (column-major flat tensor)

dims

Integer vector of tensor dimensions

dims_sender

0-based sender axis indices

dims_receiver

0-based receiver axis indices

dims_mode

0-based mode axis indices

context_lookup

Integer matrix (n_context_rows x n_factors), 0-based

unit_rows

0-based response-row indices for this unit

codes

Numeric matrix (n_context_rows x n_codes)

times

Numeric vector of timestamps per context row

ordered

TRUE = directed; FALSE = undirected

Value

List with connection_counts, row_connection_counts, row_window_members (list of 1-based ground-row index vectors, in unit_rows order) and row_window_wins (parallel resolved window sizes).