Skip to content

Commit 276710b

Browse files
TolisChalvissarion
andauthored
version1.1.2-2 (#168)
* remove loadSdpaFormatFile function * update the description file and the news_md file * Make load_sdpa_format_file internal (#27) * update the Rd files and the namespace * update the description file Co-authored-by: Vissarion Fisikopoulos <fisikop@gmail.com>
1 parent 0ccd791 commit 276710b

13 files changed

+33
-120
lines changed

.github/workflows/R-CDM-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
config:
23-
- {os: macOS-latest, r: 'devel'}
23+
# - {os: macOS-latest, r: 'devel'}
2424
- {os: macOS-latest, r: 'release'}
25-
- {os: windows-latest, r: 'devel'}
25+
# - {os: windows-latest, r: 'devel'}
2626
- {os: windows-latest, r: 'release'}
2727
# - {os: ubuntu-latest, r: 'devel'} # error in "Run r-lib/actions/setup-r@master"
2828
# - {os: ubuntu-latest, r: 'release'} ##[error]Error in library(devtools) : there is no package called ‘devtools’
File renamed without changes.
File renamed without changes.

R-proj/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Description: Provides an R interface for 'volesti' C++ package. 'volesti' comput
1111
(a.k.a. zonotopes). There are three algorithms for volume estimation as well as algorithms
1212
for sampling, rounding and rotating polytopes. Moreover, 'volesti' provides algorithms for
1313
estimating copulas useful in computational finance.
14-
Version: 1.1.2
15-
Date: 2020-10-18
14+
Version: 1.1.2-2
15+
Date: 2021-07-14
1616
Maintainer: Vissarion Fisikopoulos <vissarion.fisikopoulos@gmail.com>
1717
Depends: Rcpp (>= 0.12.17)
1818
Imports: methods, stats

R-proj/NAMESPACE

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export(gen_rand_zonotope)
1414
export(gen_simplex)
1515
export(gen_skinny_cube)
1616
export(inner_ball)
17-
export(loadSdpaFormatFile)
18-
export(load_sdpa_format_file)
19-
export(readSdpaFormatFile)
17+
export(read_sdpa_format_file)
2018
export(rotate_polytope)
2119
export(round_polytope)
2220
export(sample_points)

R-proj/R/RcppExports.R

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,13 @@ inner_ball <- function(P) {
142142
.Call(`_volesti_inner_ball`, P)
143143
}
144144

145-
#' Read a SDPA format file
145+
#' An internal Rccp function to read a SDPA format file
146146
#'
147147
#' @param input_file Name of the input file
148148
#'
149-
#' @return A list with two named items: an item "matrices" which is a list of the matrices and an vector "objFunction"
149+
#' @keywords internal
150150
#'
151-
#' @examples
152-
#' path = system.file('extdata', package = 'volesti')
153-
#' l = load_sdpa_format_file(paste0(path,'/sdpa_n2m3.txt'))
154-
#'
155-
#' @export
151+
#' @return A list with two named items: an item "matrices" which is a list of the matrices and an vector "objFunction"
156152
load_sdpa_format_file <- function(input_file = NULL) {
157153
.Call(`_volesti_load_sdpa_format_file`, input_file)
158154
}
@@ -302,7 +298,7 @@ volume <- function(P, settings = NULL, rounding = FALSE) {
302298
#' A1 = matrix(c(-1,0,0,0,0,1,0,1,0), nrow=3, ncol=3, byrow = TRUE)
303299
#' A2 = matrix(c(0,0,-1,0,0,0,-1,0,0), nrow=3, ncol=3, byrow = TRUE)
304300
#' lmi = list(A0, A1, A2)
305-
#' S = Spectrahedron(matrices = lmi);
301+
#' S = Spectrahedron(matrices = lmi)
306302
#' objFunction = c(1,1)
307303
#' write_sdpa_format_file(S, objFunction, "output.txt")
308304
#' }
@@ -311,21 +307,6 @@ write_sdpa_format_file <- function(spectrahedron, objective_function, output_fil
311307
invisible(.Call(`_volesti_write_sdpa_format_file`, spectrahedron, objective_function, output_file))
312308
}
313309

314-
#' Read a SDPA format file
315-
#'
316-
#' @param inputFile Name of the input file
317-
#'
318-
#' @return A list with two named items: an item "matrices" which is a list of the matrices and an vector "objFunction"
319-
#'
320-
#' @examples
321-
#' path = system.file('extdata', package = 'volesti')
322-
#' l = loadSdpaFormatFile(paste0(path,'/sdpa_n2m3.txt'))
323-
#'
324-
#' @export
325-
loadSdpaFormatFile <- function(inputFile = NULL) {
326-
.Call(`_volesti_loadSdpaFormatFile`, inputFile)
327-
}
328-
329310
#' An internal Rccp function for the over-approximation of a zonotope
330311
#'
331312
#' @param Z A zonotope.

R-proj/R/read_sdpa_file.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#'
1010
#' @examples
1111
#' path = system.file('extdata', package = 'volesti')
12-
#' l = readSdpaFormatFile(paste0(path,'/sdpa_n2m3.txt'))
12+
#' l = read_sdpa_format_file(paste0(path,'/sdpa_n2m3.txt'))
1313
#' Spectrahedron = l$spectrahedron
1414
#' objFunction = l$objFunction
1515
#' @export
@@ -18,8 +18,8 @@
1818
#' @importFrom Rcpp loadModule
1919
#' @importFrom "methods" "new"
2020
#' @exportPattern "^[[:alpha:]]+"
21-
readSdpaFormatFile <- function(path){
22-
l = loadSdpaFormatFile(path)
21+
read_sdpa_format_file <- function(path){
22+
l = load_sdpa_format_file(path)
2323
S = Spectrahedron(matrices = l$matrices)
2424

2525
return(list("spectrahedron"=S, "objFunction"= l$objFunction))

R-proj/man/loadSdpaFormatFile.Rd

Lines changed: 0 additions & 22 deletions
This file was deleted.

R-proj/man/load_sdpa_format_file.Rd

Lines changed: 3 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)