coerce: Coercion

Description Usage Arguments Details Value Author(s) Examples

Description

Various coercions needed in the package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19

Arguments

x,e1

Numeric vector of independent entries

M,H

A matrix

d

Dimensionality of algebra

single

Boolean, indicating whether a single value is to be returned

class

Class of object

...

Further arguments, currently ignored

Details

The numeral “1” in a function name means a single element, usually a matrix.

Functions vec_to_rsm1() et seq convert a numeric vector to a (symmetric, complex, quaternion, octonion) matrix, that is, elements of a matrix-based Jordan algebra.

Functions rsm1_to_vec() convert a (symmetric, complex, quaternion, octonion) matrix to a numeric vector of independent components. The upper triangular components are used; no checking for symmetry is performed (the lower triangular components, and non-real components of the diagonal, are discarded).

Function as.1matrix() is used to convert a jordan object to a list of matrices. Length one jordan objects are converted to a matrix.

Functions as.real_symmetric_matrix(), as.complex_herm_matrix(), as.quaternion_herm_matrix() and as.albert() take a numeric matrix and return a (matrix-based) Jordan object.

Functions numeric_to_real_symmetric_matrix() have not been coded up yet.

Function matrix1_to_jordan() takes a matrix and returns a length-1 (matrix based) Jordan vector. It uses the class of the entries (real, complex, quaternion, octonion) to decide which type of Jordan to return.

Value

Return a coerced value.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
4
5
6
7
8
9
vec_to_chm1(1:16)  # Hermitian matrix

as.1matrix(rchm())

as.complex_herm_matrix(matrix(runif(75),ncol=3))

matrix1_to_jordan(cprod(matrix(rnorm(35),7,5)))
matrix1_to_jordan(matrix(c(1,1+1i,1-1i,3),2,2))
matrix1_to_jordan(Oil + matrix(1,3,3))

jordan documentation built on April 8, 2021, 5:06 p.m.