projector-class: Class projector

projector-classR Documentation

Class projector

Description

The class "projector" is the subclass of matrices that are square, symmetric and idempotent.

is.projector is the membership function for this class.

degfree is the extractor function for the degrees of freedom and degfree<- is the replacement function.

correct.degfree checks whether the stored degrees of freedom are correct.

Objects from the Class

An object of class "projector" consists of a square, symmetric, idempotent matrix along with its degrees of freedom (rank).

Objects can be created by calls of the form new("projector", data, nrow, ncol, byrow, dimnames, ...). However, this does not add the degrees of freedom to the object. These can be added using the replacement function degfree<-. Alternatively, the function projector creates the new object from a matrix, adding its degrees of freedom at the same time.

Slots

.Data:

Object of class "matrix"

degfree:

Object of class "integer"

Extends

Class "matrix", from data part. Class "array", by class "matrix", distance 2. Class "structure", by class "matrix", distance 3. Class "vector", by class "matrix", distance 4, with explicit coerce.

Methods

coerce

signature(from = "projector", to = "matrix")

print

signature(x = "projector")

show

signature(object = "projector")

Author(s)

Chris Brien

See Also

projector, degfree, correct.degfree in package dae.

Examples

showClass("projector")

## set up a 2 x 2 mean operator that takes the mean of a vector of 2 values
m <- matrix(rep(0.5,4), nrow=2)

## create an object of class projector
proj.m <- projector(m)

## check that it is a valid projector
is.projector(proj.m)

## create a projector based on the matrix m
proj.m <- new("projector", data=m)

## add its degrees of freedom and print the projector
degfree(proj.m) <- proj.m

dae documentation built on June 22, 2024, 9:07 a.m.