adot: Aitchison Scalar Product for Vectors

Description Usage Arguments Value Examples

View source: R/6-dotProduct.R

Description

This function computes the Aitchison scalar product of two compositions, defined as the sum of the product of all pairwise log-ratios of x and of w, scaled by the number of components.

Usage

1
adot(x, w)

Arguments

x

A composition of node values.

w

A composition of node weights.

Value

A scalar product.

Examples

1
2
3
x <- randAcomp(20)[1,]
w <- randAcomp(20)[1,]
adot(x, w)

tpq/amalgam documentation built on March 14, 2020, 10:27 a.m.