write_sdpa_format_file: Write a SDPA format file

View source: R/RcppExports.R

write_sdpa_format_fileR Documentation

Write a SDPA format file

Description

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

Usage

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


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")


volesti documentation built on Sept. 19, 2023, 5:08 p.m.