R Under development (unstable) (2023-12-13 r85679 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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 <- 5 > npoint <- 50 > set.seed(42) > x <- matrix(rnorm(d * npoint), ncol = d) > > foo <- cbind(1, x) > foo <- cbind(0, foo) > foo <- round(1e4 * foo) > bar <- rep(1e4, length(foo)) > baz <- qdq(foo, bar) > > baz[1:3, ] [,1] [,2] [,3] [,4] [,5] [,6] [1,] "0" "1" "1371/1000" "3219/10000" "1201/1000" "-407/10000" [2,] "0" "1" "-5647/10000" "-3919/5000" "653/625" "-3103/2000" [3,] "0" "1" "3631/10000" "15757/10000" "-627/625" "1459/1250" [,7] [1,] "-20009/10000" [2,] "1669/5000" [3,] "11713/10000" > > out <- scdd(baz, inputincidence = TRUE, representation = "V") > names(out) [1] "output" "inputincidence" "input" > > length(out$inputincidence) [1] 50 > inies <- sapply(out$inputincidence, length) > 0 > length(inies) [1] 50 > sum(inies) [1] 42 > > > proc.time() user system elapsed 0.56 0.03 0.59