RDFTensor (version 1.3)

tensor2mat: Reduce tensor to matrix

Description

Reduce the tensor to one matrix by summing all slices efficiently.

Usage

tensor2mat(X,binary=FALSE,symmetrize=FALSE)

Arguments

X

List of tensor slices (Latent folding).

binary

when true returns binary matrix (i.e. ignores multiple connections between entities), default FALSE.

symmetrize

when true all relations are considered symetric before adding the slices, default FALSE.

Value

Adjacency matrix according to flags binary and symmetrize.