rform: Random kforms and ktensors

rformR Documentation

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,  ensure=TRUE, integer=TRUE)
rformm(terms=30, k=7, n=20, ensure=TRUE, integer=TRUE)
rformmm(terms=90, k=15, n=30, ensure=TRUE, integer=TRUE)
rtensor(terms=9, k=3, n=7, integer=TRUE)

Arguments

terms

Number of distinct terms

k, n

A k-form maps V^k to \mathbb{R}, where V=\mathbb{R}^n

ensure

Boolean with default TRUE meaning to ensure that the dovs() of the returned value is in fact equal to n. If FALSE, sometimes the dovs() is strictly less than n because of random sampling

integer

Boolean specifying whether the coefficients are integers or not

Details

Random k-form objects and k-tensors.

By default, function rform() returns a simple k-form; rformm() and rformmm() return successively more complicated objects.

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

Value

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

Author(s)

Robin K. S. Hankin

Examples


(a <- rform())
(b <- rform())
a ^ b

a
a ^ dx
a ^ dx ^ dy

(x <- rtensor())
x %X% x




RobinHankin/wedge documentation built on June 9, 2025, 2:53 p.m.