adjoint: Fedeew-Leverrier

View source: R/Community.R

adjointR Documentation

Fedeew-Leverrier

Description

Adjoint matrix and Characteristic Polynomial

Usage

adjoint(A)

charpoly(A)

Arguments

A

a square matrix

Details

These functions compute the adjoint matrix and characteristic polynomial of A by the Fedeew-Leverrier algorithm.

If A has integer elements and the computations are performed with integer arithmetic the result is exact.

Value

adjoint returns the adjoint matrix of A

charpoly returns the coefficients of the characteristic polynomial of A as a vector.

Examples

edges <- parse.digraph(c(
  "E *-> D",
  "D *-> C",
  "C -> E",
  "E *-> B",
  "B *-> A",
  "A -> E",
  "D -> B"))
edges <- enforce.limitation(edges)
A <- adjacency.matrix(edges,labels=TRUE)
adjoint(A)

SWotherspoon/QPress documentation built on Sept. 26, 2022, 2:27 a.m.