Skip to contents

Create objects representing Jordan decompositions.

Usage

JordanDecomposition(values, vectors, heights, ...)

Arguments

values

eigenvalues, a vector of length equal to the number of Jordan chains.

vectors

the (generalised) eigenvectors, a matrix.

heights

a vector of positive integers, heights[i] is the height of values[i].

...

further arguments that may be needed by methods.

Details

JordanDecomposition is an S4 generic function. It creates objects representing Jordan decompositions. Dispatch is on the first two arguments, values and vectors.

The names of the arguments correspond to slots in class "JordanDecompositionDefault", which is the class of the objects created by methods in package mcompanion and inherits from the virtual class "JordanDecomposition".

Value

an object inheriting from "JordanDecomposition"

Author

Georgi N. Boshnakov

Methods

signature(values = "ANY", vectors = "ANY")

the default method; currently raises an error.

signature(values = "JordanDecomposition", vectors = "missing")

simply returns values.

signature(values = "list", vectors = "missing")

In this case values can be a list with components "values", "vectors" and "heights". This method has an additional argument "names" which can be used when the components of the list are different, e.g.

names = c(values = "eigval", vectors = "eigvec", heights = "len.block").

signature(values = "missing", vectors = "matrix")

This is equivalent to the case values = "number" with values set to a vector of missing values.

signature(values = "missing", vectors = "missing")

values (vectors) is set to a vector (matrix) of missing values. The dimensions are deduced from argument heights, so heights cannot be missing for this signature.

signature(values = "number", vectors = "matrix")

This is equivalent to calling new for class "JordanDecompositionDefault" with arguments values, vectors and heights.

signature(values = "number", vectors = "missing")

This is equivalent to the case vectors = "matrix" with vectors set to a matrix of missing values.

signature(values = "SmallMultiCompanion", vectors = "missing")

This computes the Jordan decomposition of an object from class "SmallMultiCompanion".

Examples

m <- matrix(c(1,2,4,10), nrow = 2)
m <- matrix(c(1,2,4,10), nrow = 2)
m <- matrix(c(5, 12, 3, 4), nrow = 2)

JordanDecomposition(values = rep(0,2), vectors = m)
#> An object of class "JordanDecompositionDefault"
#> Slot "values":
#> [1] 0 0
#> 
#> Slot "heights":
#> [1] 1 1
#> 
#> Slot "vectors":
#>      [,1] [,2]
#> [1,]    5    3
#> [2,]   12    4
#> 
jd <- JordanDecomposition(values = c(0.9, 0.3), vectors = m)
as(jd, "matrix")
#>       [,1]   [,2]
#> [1,] -0.45 0.5625
#> [2,] -1.80 1.6500
eigen(jd)
#> eigen() decomposition
#> $values
#> [1] 0.9 0.3
#> 
#> $vectors
#>            [,1] [,2]
#> [1,] -0.3846154 -0.6
#> [2,] -0.9230769 -0.8
#> 
## the eigenvectors are scaled versions of m's columns:
eigen(jd)$vectors %*% diag(c(5 / eigen(jd)$vectors[1,1], -5))
#>      [,1] [,2]
#> [1,]    5    3
#> [2,]   12    4
## == m

## eigenvalues are not supplied, so set to  NA's here:
JordanDecomposition(vectors = m)
#> An object of class "JordanDecompositionDefault"
#> Slot "values":
#> [1] NA NA
#> 
#> Slot "heights":
#> [1] 1 1
#> 
#> Slot "vectors":
#>      [,1] [,2]
#> [1,]    5    3
#> [2,]   12    4
#> 

## eigenvectors are set to vectors of NA's here:
JordanDecomposition(values = rep(0,2), height = c(1,1))
#> An object of class "JordanDecompositionDefault"
#> Slot "values":
#> [1] 0 0
#> 
#> Slot "heights":
#> [1] 1 1
#> 
#> Slot "vectors":
#>      [,1] [,2]
#> [1,]   NA   NA
#> [2,]   NA   NA
#>