Learn R Programming

stokes (version 1.0-8)

rform: Random kforms and ktensors

Description

Random \(k\)-form objects and \(k\)-tensors, intended as quick “get you going” examples

Usage

rform(terms=9,k=3,n=7,coeffs)
rtensor(terms=9,k=3,n=7,coeffs)

Arguments

terms

Number of distinct terms

k,n

A \(k\)-form maps \(V^k\) to \(R\), where \(V=R^n\)

coeffs

The coefficients of the form; if missing use seq_len(terms)

Value

All functions documented here return an object of class kform or ktensor.

Details

What you see is what you get, basically.

Note that argument terms is an upper bound, as the index matrix might contain repeats which are combined.

Examples

Run this code
# NOT RUN {
rform()
rform() %^% rform()

rtensor() %X% rtensor()

dx <- as.kform(1)
dy <- as.kform(2)
rform() %^% dx
rform() %^% dx %^% dy

# }

Run the code above in your browser using DataLab