Class SdpaFormatManager

template<typename NT>
class SdpaFormatManager

Reads/writes files according to the SDPA format for sdps. Currently supported Format:

<objective function vector> <i-th row of j-th matrix>

For example: 2 3 1 1

Template Parameters:

NT – Numerical Type

Public Functions

inline void loadSDPAFormatFile(std::ifstream &is, std::vector<MT> &matrices, VT &objectiveFunction)

Reads an SDPA format file

Parameters:
  • is[in] An open stram pointing to the file

  • matrices[out] the matrices A0, A1, A2, …, An

  • objectiveFunction[out] The objective function of the sdp

inline void writeSDPAFormatFile(std::ostream &os, std::vector<MT> const &matrices, VT const &objectiveFunction)

Create a SDPA format file

Parameters:
  • os[in] Open stream to file

  • matrices[in] The matrices A0, …, An

  • objectiveFunction[in] The objective function of the sdp

template<typename Spectrahedron, typename Point>
inline void loadSDPAFormatFile(std::ifstream &is, Spectrahedron &spectrahedron, Point &objectiveFunction)

Read a spectrahedron and a vector (objective function) from a SDPA format input file

Template Parameters:

Point

Parameters:
  • is[in] opened stream to input file

  • spectrahedron[out]

  • objectiveFunction[out]

template<typename Spectrahedron, typename Point>
inline void writeSDPAFormatFile(std::ostream &os, Spectrahedron const &spectrahedron, Point const &objectiveFunction)

Write a spectrahedron and a vector (objective function) to a SDPA format output file

Template Parameters:

Point

Parameters:
  • is[in] opened stream to output file

  • spectrahedron[in]

  • objectiveFunction[in]