Skip to contents

See test_polm. This simple tool creates Laurent polynomial matrices for testing purposes. The column_start_matrix, i.e. the matrix consisting of the columns pertaining to the smallest column degrees, the value_at_0, and that column_end_matrix matrix are set in this order. Thus, column_end_matrix may potentially overwrite value_at_0.

Usage

test_lpolm(
  dim = c(1, 1),
  degree_max = 1,
  degree_min = -1,
  random = FALSE,
  col_start_matrix = NULL,
  value_at_0 = NULL,
  col_end_matrix = NULL
)

Arguments

dim

two dimensional vector of non negative integers, determines the dimension of the polynomial matrix to be created. If the prescribed number of rows or number of columns is zero then an "empty" polynomial matrix is generated. In this case all parameters below are ignored.

degree_max, degree_min

Integer, vector, or matrix specifying minimal and maximal (column) degrees

random

If TRUE the coefficents are generated by drawing from a normal distribution. If FALSE then the coefficient of the \(k\)-th power \(z^k\) of the (i,j)-th entry is set equal to "\(ijk\)". In this case the parameters below are ignored!

col_start_matrix

Force a matrix for lowest column degrees

value_at_0

desired value of the polynomial at \(z=0\) (or NULL).

col_end_matrix

desired column end matrix (or NULL).

Value

lpolm object

Details

In contrast to test_polm, the absolute value of the zeros cannot be forced to be larger than a certain lower bound bzeroes.

Examples

(lp = test_lpolm(dim = c(1,1), degree_max = 1, degree_min = -2))
#> ( 1 x 1 ) Laurent polynomial matrix with degree <= 1, and minimal degree >= -2
#>       z^-2 [,1]   z^-1 [,1]  z^0 [,1]  z^1 [,1]
#> [1,] -0.6386418 -0.02363646 -1.415598 -2.130058
(lp = test_lpolm(dim = c(3,3), degree_max = c(0,1,2), degree_min = -2))
#> ( 3 x 3 ) Laurent polynomial matrix with degree <= 2, and minimal degree >= -2
#>        z^-2 [,1]       [,2]       [,3]   z^-1 [,1]      [,2]       [,3]
#> [1,]  0.00172149 -0.5082567  0.2052962 -0.17643686 0.9120409 0.30013345
#> [2,]  0.11169212 -0.2109276  0.1866326 -0.09551422 0.9361289 1.41946783
#> [3,] -1.37265313  0.4562633 -0.3862650 -2.81839037 0.5914964 0.09397515
#>        z^0 [,1]        [,2]      [,3] z^1 [,1]       [,2]       [,3] z^2 [,1]
#> [1,] -1.7735858 -0.09306234 0.2236165        0  0.1575114  0.4842178        0
#> [2,] -0.4488422 -1.60400013 0.4917717        0 -0.5204071  0.2336085        0
#> [3,] -0.2835388  0.73137283 0.3026959        0  0.2433878 -0.7878802        0
#>       [,2]       [,3]
#> [1,]     0 -1.1624028
#> [2,]     0  1.3069491
#> [3,]     0  0.1046523
(lp = test_lpolm(dim = c(3,3), degree_max = 1, degree_min = c(0,-1,-2)))
#> ( 3 x 3 ) Laurent polynomial matrix with degree <= 1, and minimal degree >= -2
#>      z^-2 [,1]  [,2]       [,3] z^-1 [,1]        [,2]       [,3]   z^0 [,1]
#> [1,]         0     0  0.3774721         0 -0.76877520 -2.1662821 -2.4054549
#> [2,]         0     0 -1.0121461         0 -0.07447983 -0.6534886 -1.3293992
#> [3,]         0     0  0.6938027         0 -0.79862800  0.4024766 -0.2519315
#>            [,2]       [,3]    z^1 [,1]       [,2]       [,3]
#> [1,] -0.1290110  0.3391213 -0.65042744 -0.7474391  0.9843586
#> [2,] -1.6525061 -1.5153475 -1.73868216 -0.8449526 -0.7580670
#> [3,] -0.9866644 -0.5726728 -0.04290366 -2.5081827 -0.2795617