write_sdpa_format_file: Write a SDPA format file

Description Usage Arguments Examples

View source: R/RcppExports.R

Description

Outputs a spectrahedron (the matrices defining a linear matrix inequality) and a vector (the objective function) to a SDPA format file.

Usage

1
write_sdpa_format_file(spectrahedron, objective_function, output_file)

Arguments

spectrahedron

A spectrahedron in n dimensions; must be an object of class Spectrahedron

objective_function

A numerical vector of length n

output_file

Name of the output file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
A0 = matrix(c(-1,0,0,0,-2,1,0,1,-2), nrow=3, ncol=3, byrow = TRUE)
A1 = matrix(c(-1,0,0,0,0,1,0,1,0), nrow=3, ncol=3, byrow = TRUE)
A2 = matrix(c(0,0,-1,0,0,0,-1,0,0), nrow=3, ncol=3, byrow = TRUE)
lmi = list(A0, A1, A2)
S = Spectrahedron(matrices = lmi)
objFunction = c(1,1)
write_sdpa_format_file(S, objFunction, "output.txt")

## End(Not run)

volesti documentation built on July 14, 2021, 5:11 p.m.