R Under development (unstable) (2023-04-23 r84305 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library(rcdd) If you want correct answers, use rational arithmetic. See the Warnings sections in help pages for functions that do computational geometry. > > d <- 4 > qux <- makeH(- diag(d), rep(0, d), rep(1, d), 1) > > out <- scdd(qux, adjacency = TRUE) > print(out) $output [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0 0 0 1 [2,] 0 1 0 0 1 0 [3,] 0 1 0 1 0 0 [4,] 0 1 1 0 0 0 attr(,"representation") [1] "V" $adjacency $adjacency[[1]] [1] 2 3 4 $adjacency[[2]] [1] 1 3 4 $adjacency[[3]] [1] 1 2 4 $adjacency[[4]] [1] 1 2 3 > > ########################## > > quux <- addHeq(1:d, (d + 1) / 2, qux) > print(quux) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 1.0 -1 -1 -1 -1 [2,] 0 0.0 1 0 0 0 [3,] 0 0.0 0 1 0 0 [4,] 0 0.0 0 0 1 0 [5,] 0 0.0 0 0 0 1 [6,] 1 2.5 -1 -2 -3 -4 attr(,"representation") [1] "H" > > out <- scdd(quux, adjacency = TRUE) > print(out) $output [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0.50 0.00 0.00 0.50 [2,] 0 1 0.25 0.00 0.75 0.00 [3,] 0 1 0.00 0.50 0.50 0.00 [4,] 0 1 0.00 0.75 0.00 0.25 attr(,"representation") [1] "V" $adjacency $adjacency[[1]] [1] 2 4 $adjacency[[2]] [1] 1 3 $adjacency[[3]] [1] 2 4 $adjacency[[4]] [1] 1 3 > > out <- scdd(quux, incidence = TRUE) > print(out) $output [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0.50 0.00 0.00 0.50 [2,] 0 1 0.25 0.00 0.75 0.00 [3,] 0 1 0.00 0.50 0.50 0.00 [4,] 0 1 0.00 0.75 0.00 0.25 attr(,"representation") [1] "V" $incidence $incidence[[1]] [1] 1 3 4 6 $incidence[[2]] [1] 1 3 5 6 $incidence[[3]] [1] 1 2 5 6 $incidence[[4]] [1] 1 2 4 6 $input [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 1.0 -1 -1 -1 -1 [2,] 0 0.0 1 0 0 0 [3,] 0 0.0 0 1 0 0 [4,] 0 0.0 0 0 1 0 [5,] 0 0.0 0 0 0 1 [6,] 1 2.5 -1 -2 -3 -4 attr(,"representation") [1] "H" > > out <- scdd(quux, inputadjacency = TRUE) > print(out) $output [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0.50 0.00 0.00 0.50 [2,] 0 1 0.25 0.00 0.75 0.00 [3,] 0 1 0.00 0.50 0.50 0.00 [4,] 0 1 0.00 0.75 0.00 0.25 attr(,"representation") [1] "V" $inputadjacency $inputadjacency[[1]] [1] 2 3 4 5 6 $inputadjacency[[2]] [1] 1 4 5 6 $inputadjacency[[3]] [1] 1 4 5 6 $inputadjacency[[4]] [1] 1 2 3 6 $inputadjacency[[5]] [1] 1 2 3 6 $inputadjacency[[6]] [1] 1 2 3 4 5 $inputadjacency[[7]] integer(0) $input [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 1.0 -1 -1 -1 -1 [2,] 0 0.0 1 0 0 0 [3,] 0 0.0 0 1 0 0 [4,] 0 0.0 0 0 1 0 [5,] 0 0.0 0 0 0 1 [6,] 1 2.5 -1 -2 -3 -4 attr(,"representation") [1] "H" > > out <- scdd(quux, inputincidence = TRUE) > print(out) $output [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0.50 0.00 0.00 0.50 [2,] 0 1 0.25 0.00 0.75 0.00 [3,] 0 1 0.00 0.50 0.50 0.00 [4,] 0 1 0.00 0.75 0.00 0.25 attr(,"representation") [1] "V" $inputincidence $inputincidence[[1]] [1] 1 2 3 4 $inputincidence[[2]] [1] 3 4 $inputincidence[[3]] [1] 1 2 $inputincidence[[4]] [1] 1 4 $inputincidence[[5]] [1] 2 3 $inputincidence[[6]] [1] 1 2 3 4 $inputincidence[[7]] integer(0) $input [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 1.0 -1 -1 -1 -1 [2,] 0 0.0 1 0 0 0 [3,] 0 0.0 0 1 0 0 [4,] 0 0.0 0 0 1 0 [5,] 0 0.0 0 0 0 1 [6,] 1 2.5 -1 -2 -3 -4 attr(,"representation") [1] "H" > > > proc.time() user system elapsed 0.20 0.09 0.28