R/class_polyMatrixCharPolynomial.R

# Title     : Class of characteristic polynomial of a polynomial matrix
# Objective : We use polyMatrix to store polynomial coefficients
# Created by: namezys
# Created on: 2021. 05. 05.


PMCP <- "polyMatrixCharPolynomial"

.check.polyMatrixCharClass <- function (object) {
  if (nrow(object@coef) != 1) {
    return("Char polynomial matrix should contain only one row")
  }
  return(TRUE)
}

#' A class to repesent characteristic polynomial of a polynomial matrix
#'
#' Characteristic polynomial of a polynomial matrix is a polynomial with polynomial coefficients
#' @export
polyMatrixCharClass <- setClass(
  PMCP,
  slots = c(coef=PM),
  validity = .check.polyMatrixCharClass
)

Try the polyMatrix package in your browser

Any scripts or data that you put into this service are public.

polyMatrix documentation built on July 18, 2021, 5:06 p.m.