grade {weyl}R Documentation

The grade of a weyl object

Description

The grade of a homogeneous term of a Weyl algebra is the sum of the powers. Thus the grade of \(4xy^2\partial_x^3\partial_y^4\) is \(1+2+3+4=10\).

The functionality documented here closely follows the equivalent in the clifford package.

Coutinho calls this the symbol map.

Usage

grade(C, n, drop=TRUE)
grade(C,n) <- value
grades(x)

Arguments

C, x

Weyl object

n

Integer vector specifying grades to extract

value

Replacement value, a numeric vector

drop

Boolean, with default TRUE meaning to coerce a constant operator to numeric, and FALSE meaning not to

Details

Function grades() returns an (unordered) vector specifying the grades of the constituent terms. Function grades<-() allows idiom such as grade(x,1:2) <- 7 to operate as expected [here to set all coefficients of terms with grades 1 or 2 to value 7].

Function grade(C,n) returns a Weyl object with just the elements of grade g, where g %in% n.

The zero grade term, grade(C,0), is given more naturally by constant(C).

Value

Integer vector or weyl object

Author(s)

Robin K. S. Hankin

Examples


a <- rweyl(30)

grades(a)
grade(a,1:4)
grade(a,5:9) <- -99
a

[Package weyl version 0.0-4 Index]