vectors {mosaicCalc}R Documentation

Utilities for vector calculations

Description

⁠%dot%⁠, ⁠%onto%⁠, and ⁠%perp%⁠ are infix operators. The left-hand argument is a vector.

Usage

u %dot% b

b %onto% A

b %perp% A

normalize(A)

as_magnitude(A, metric = c("2", "O", "I", "F", "M"))

Arguments

u

a row vector, but a column vector is acceptable too

b

a column vector

A

a matrix

metric

metric to use for matrix norm

Details

Convenience functions for basic operations relating to vector projection. These use the MOSAIC Calc conventions that require vectors to be one column matrices.

Value

either a number (for ⁠%dot%⁠) or a vector


[Package mosaicCalc version 0.6.4 Index]