vech_dup_idx: Constructs index vector for transforming a vech vector into a...

View source: R/helpers.R

vech_dup_idxR Documentation

Constructs index vector for transforming a vech vector into a vec vector to create an n*n symmetric matrix from the vech vector. tensor$index_select(0, idx)$view(3,3)

Description

Constructs index vector for transforming a vech vector into a vec vector to create an n*n symmetric matrix from the vech vector. tensor$index_select(0, idx)$view(3,3)

Usage

vech_dup_idx(n)

Arguments

n

size of the resulting square matrix

Value

array containing the indices


vankesteren/tensorsem documentation built on Aug. 22, 2023, 7:41 a.m.