Description Usage Arguments Methods (by generic) Slots Examples
A class to represent matrix of polinomials
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | ## S4 method for signature 'polyMatrix,numeric'
x[[i]]
## S4 method for signature 'polyMatrix'
det(x)
## S4 method for signature 'polyMatrix'
nrow(x)
## S4 method for signature 'polynomial'
nrow(x)
## S4 method for signature 'polyMatrix'
ncol(x)
## S4 method for signature 'polynomial'
ncol(x)
## S4 method for signature 'polyMatrix'
dim(x)
## S4 method for signature 'polyMatrix'
predict(object, newdata)
## S4 method for signature 'polyMatrix'
round(x, digits = 0)
## S4 method for signature 'polyMatrix'
show(object)
## S4 method for signature 'polyMatrix,missing,missing,missing'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'polyMatrix,missing,ANY,missing'
x[i, j]
## S4 method for signature 'polyMatrix,ANY,missing,missing'
x[i, j]
## S4 method for signature 'polyMatrix,logical,logical,missing'
x[i, j]
## S4 method for signature 'polyMatrix,logical,numeric,missing'
x[i, j]
## S4 method for signature 'polyMatrix,numeric,logical,missing'
x[i, j]
## S4 method for signature 'polyMatrix,numeric,numeric,missing'
x[i, j]
## S4 replacement method for signature 'polyMatrix,missing,missing,ANY'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,missing,ANY,ANY'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,ANY,missing,ANY'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,numeric,numeric,numeric'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,numeric,numeric,matrix'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,numeric,numeric,polynomial'
x[i, j] <- value
## S4 replacement method for signature 'polyMatrix,numeric,numeric,polyMatrix'
x[i, j] <- value
## S4 method for signature 'polyMatrix,missing'
e1 + e2
## S4 method for signature 'polyMatrix,polyMatrix'
e1 + e2
## S4 method for signature 'polyMatrix,polynomial'
e1 + e2
## S4 method for signature 'polyMatrix,numeric'
e1 + e2
## S4 method for signature 'polyMatrix,matrix'
e1 + e2
## S4 method for signature 'ANY,polyMatrix'
e1 + e2
## S4 method for signature 'polyMatrix,polyMatrix'
e1 == e2
## S4 method for signature 'polyMatrix,polynomial'
e1 == e2
## S4 method for signature 'polyMatrix,matrix'
e1 == e2
## S4 method for signature 'polyMatrix,numeric'
e1 == e2
## S4 method for signature 'ANY,polyMatrix'
e1 == e2
## S4 method for signature 'polyMatrix,ANY'
e1 != e2
## S4 method for signature 'ANY,polyMatrix'
e1 != e2
## S4 method for signature 'polyMatrix,polyMatrix'
x %*% y
## S4 method for signature 'polyMatrix,matrix'
x %*% y
## S4 method for signature 'matrix,polyMatrix'
x %*% y
## S4 method for signature 'polyMatrix,numeric'
e1 * e2
## S4 method for signature 'polyMatrix,polynomial'
e1 * e2
## S4 method for signature 'polyMatrix,polyMatrix'
e1 * e2
## S4 method for signature 'ANY,polyMatrix'
e1 * e2
## S4 method for signature 'polyMatrix,polyMatrix'
e1 - e2
## S4 method for signature 'polyMatrix,ANY'
e1 - e2
## S4 method for signature 'ANY,polyMatrix'
e1 - e2
|
x |
an matrix object |
i |
the degree to extract matrix of coefficient |
object |
an R object |
newdata |
the value to evaluate |
digits |
integer indicating the number of decimal places (round) or significant digits (signif) to be used |
j |
column indeces |
... |
unused |
drop |
unused |
value |
new value |
e1 |
an left operand |
e2 |
an right operand |
y |
second argument |
[[
: get coefficient matrix by degree
det
: determinant of a polynomial matrix
nrow
: number of rows of a polynomial matrix
nrow
: an polynomial has only one row
ncol
: number of column of a polynomial matrix
ncol
: an polynomial has only one column
dim
: dimension of a polynomial matrix
predict
: value of polynomial matrix in point
round
: round of polynomial matrix is rounding of polynomial coefficients
show
: prints out a text representation of a polynomial matrix
[
: get matrix content
[
: get columns
[
: get rows
[
: get by logical index
[
: get by logical index and numerical indeces
[
: get by logical index and numerical indeces
[
: get by row and column indeces
[<-
: replace matrix content
[<-
: assign rows
[<-
: assign columns
[<-
: assign part of matrix with number
[<-
: assign part of matrix with another matrix
[<-
: assign part of matrix with polynomial
[<-
: assign part of matrix with another polynomial matrix
+
: summation with polynomial matrix
+
: summation of polynomial matrices
+
: summation of polynomial matrix and scalar polynomial
+
: summation of polynomial matrix and scalar nummber
+
: summation of polynomial matrix and numerical matrix
+
: summation of polynomial matrix
==
: equal operator for two polinomial matrices, result is a boolean matrix
==
: equal operator for polinomail matrix and polinomail, result is a matrix
==
: equal operator for polinomial and numerical matrices
==
: equal operator for polinomial matrix and number, result is a matrix
==
: equal operator for aby object and polinomial matrix
!=
: not equal operator
!=
: not equal operator
%*%
: matrix multiplicatoin of polynomial matrices
%*%
: matrix multiplicatoin of polynomial and numerical matrices
%*%
: matrix multiplicatoin of numerical and polynomial matrices
*
: scalar multiplication with number
*
: scalar multiplication with polynomial
*
: scalar multiplication of polynomial mattrices elementwise
*
: scalar multiplication
-
: substractioin
-
: substractioin
-
: substractioin
coef
A matrix of coefficients which are joined into one matrix from lower degree to higher
ncol
Actual number of columns in the polynomial matrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # create a new polynomial matrix by parsing strings
pm <- parse.polyMatrix(
"x; 1 + x^2; 3 x - x^2",
"1; 1 + x^3; - x + x^3"
)
# get coefficient matrix for degree 0
pm[[0]]
## [,1] [,2] [,3]
## [1,] 0 1 0
## [2 ] 1 1 0
# get coefficient matrix for degree 1
pm[[1]]
## [,1] [,2] [,3]
## [1,] 1 0 3
## [2 ] 0 0 -1
# dimensions
nrow(pm) ## 2
ncol(pm) ## 3
dim(pm) ## [1] 2 3
# round
round(parse.polyMatrix(
" 1.0001 - x, 1 - x^2, 1 + 2.0003*x + x^2",
"0.0001 + x - x^2, 1 + x + 0.0001 x^2, 1 - 2*x + x^2"
))
## [,1] [,2] [,3]
## [1,] 1 - x 1 - x^2 1 + 2x + x^2
## [2,] x - x^2 1 + x 1 - 2x + x^2
# print out a polynomial matrix
show(parse.polyMatrix(
" 1.0001 - x, 1 - x^2, 1 + 2.0003*x + x^2",
"0.0001 + x - x^2, 1 + x, 1 - 2*x + x^2",
" 12.3 x^3, 2 + 3.5 x + x^4, -0.7 + 1.6e-3 x^3"
))
## [,1] [,2] [,3]
## [1,] 1.0001 - x 1 - x^2 1 + 2.0003x + x^2
## [2,] 1e-04 + x - x^2 1 + x 1 - 2x + x^2
## [3,] 12.3x^3 2 + 3.5x + x^4 -0.7 + 0.0016x^3
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.