chebycenter: chebycenter Computes the centroid of a convex polytope

Description Usage Arguments Value Details Examples

View source: R/chebycenter.R

Description

chebycenter Computes the centroid of a convex polytope

Usage

1

Arguments

A

a matrix

b

a vector of length equals to nrow(A)

Value

a vector corresponding to the centroid of the polytope

Details

This code is a translation of the matlab code that can be found there (https://ch.mathworks.com/matlabcentral/fileexchange/34208-uniform-distribution-over-a-convex-polytope) It computes the centroid of the complex polytope defined by A \cdot x ≤qslant b

Examples

1
2
3
4
5
6
7
8
n <- 20
A1 <- -diag(n)
b1 <- as.matrix(rep(0,n))
A2 <- diag(n)
b2 <- as.matrix(rep(1,n))
A <- rbind(A1,A2)
b <- rbind(b1,b2)
X0 <- chebycenter(A,b)

Irstea/cpgsR documentation built on Jan. 25, 2020, 5:36 p.m.