linear: A simple free algebra object

linearR Documentation

A simple free algebra object

Description

Create simple free algebra objects including linear expressions. For example:

> linear(1:3)
free algebra element algebraically equal to
+ 1*a + 2*b + 3*c
> linear(1:3,power=5)
free algebra element algebraically equal to
+ 1*aaaaa + 2*bbbbb + 3*ccccc
>

Usage

linear(x,power=1)

Arguments

x

Numeric vector of terms

power

Integer vector of powers

Note

It is instructive to compare the functionality documented here with their mvp equivalents. Many of the functions documented at mvp::special.Rd do not make sense in the context of the free algebra. Function mvp::product(), for example, imposes an order on the expansion.

Function constant() is documented at constant.Rd, but is listed below for convenience.

Author(s)

Robin K. S. Hankin

See Also

constant, zero

Examples

linear(1:3)         
linear(1:3,power=5)
linear(1:3,power=3:1)

RobinHankin/freealg documentation built on Dec. 24, 2024, 3:16 a.m.