isHomogeneousQspray {qspray}R Documentation

Whether a 'qspray' polynomial is homogeneous

Description

Checks whether the polynomial defined by a qspray object is homogeneous, and also returns the degree if this is true.

Usage

isHomogeneousQspray(qspray)

Arguments

qspray

a qspray object

Value

A Boolean value indicating whether the polynomial defined by qspray is homogeneous. Moreover, if it is homogeneous, the degree is given in the attribute "degree" of the output.

Examples

lambda <- c(3, 2, 1)
p <- PSFpoly(4, lambda)
( homogeneous <- isHomogeneousQspray(p) ) # should be TRUE
attr(homogeneous, "degree") == sum(lambda) # should be TRUE

[Package qspray version 3.1.0 Index]