-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Marginal diagnostics and optimizations (#108)
* improve implementations * improve computation of inner ball for H-polytopes * improve inner ball computation and improve tests * update termination criterions in rounding methods * update Rd file of Birkhoff R generator * improve univariate psrf implemetations * fix c++ tests * update parameters in rounding and minor improvements * fix gcc tests and improve birkhoff generator Rd file * fix c++ tests * improve R tests, remove ine and ext files * fix c++ tests * fix c++ tests for clang * fix c++ tests * merge and improve R examples * change r tests and examples for inner_ball function * improve R examples * change priority in inner ball computation * use only lpsolve for inner ball computation
- Loading branch information
1 parent
b15c2ca
commit 375fa1f
Showing
57 changed files
with
617 additions
and
813 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#' Generator function for Birkhoff polytope | ||
#' | ||
#' This function can be used to generate the full dimensional \eqn{n}-Birkhoff polytope in H-representation. | ||
#' The dimension of the generated polytope is \eqn{(n-1)^2}. | ||
#' | ||
#' @param n The order of the Birkhoff polytope | ||
#' | ||
#' @return A polytope class representing the full dimensional \eqn{n}-Birkhoff polytope in H-representation. | ||
#' @examples | ||
#' # generate the Birkhoff polytope of order 5 | ||
#' P = gen_birkhoff(5) | ||
#' @export | ||
gen_birkhoff <- function(n) { | ||
|
||
kind_gen = 7 | ||
m_gen = 0 | ||
|
||
Mat = poly_gen(kind_gen, FALSE, FALSE, n, m_gen) | ||
|
||
# first column is the vector b | ||
b = Mat[,1] | ||
Mat = Mat[,-c(1)] | ||
|
||
P = Hpolytope$new(Mat, b) | ||
|
||
return(P) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ gen_cross <- function(dimension, representation) { | |
} | ||
|
||
return(P) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.