File correlation_spectrahedron_MT.hpp

template<typename CorreMatrix>
class CorrelationSpectrahedron_MT : public Spectrahedron<CorreMatrix>
#include <correlation_spectrahedron_MT.hpp>

This class handles the spectrahedra of correlation matrices

Template Parameters:

CorreMatrix – The Correlation Matrix

Public Types

typedef CorreMatrix PointType

The numeric/matrix/vector types we use.

typedef PointType::FT NT
typedef Eigen::Matrix<NT, Eigen::Dynamic, Eigen::Dynamic> MT
typedef Eigen::Matrix<NT, Eigen::Dynamic, 1> VT

Public Functions

inline CorrelationSpectrahedron_MT(unsigned int n)

Constructor of correlation matrix spectrahedra.

inline unsigned int matrixSize() const
Returns:

The size of the matrix

inline std::pair<PointType, NT> getInnerBall() const
template<typename update_parameters>
inline void compute_reflection(PointType &v, PointType const &r, update_parameters&) const

Computes the reflected direction at a point on the boundary of the spectrahedron.

Parameters:
  • r[in] A point on the boundary of the spectrahedron

  • v[in] The direction of the trajectory as it hits the boundary

  • reflectedDirection[out] The reflected direction

inline NT positiveLinearIntersection(PointType const &r, PointType const &v)

Computes the minimal positive t s.t. r+t*v intersects the boundary of the spectrahedron

Parameters:
  • r[in]

  • v[in]

  • a[out] NT value t

inline std::pair<NT, int> line_positive_intersect(PointType const &r, PointType const &v)
inline std::pair<NT, int> line_positive_intersect(PointType const &r, PointType const &v, VT&, VT&, NT const&)
inline std::pair<NT, int> line_positive_intersect(PointType const &r, PointType const &v, VT&, VT&)
template<typename update_parameters>
inline std::pair<NT, int> line_positive_intersect(PointType const &r, PointType const &v, VT&, VT&, NT const&, update_parameters&)
template<typename update_parameters>
inline std::pair<NT, int> line_positive_intersect(PointType const &r, PointType const &v, VT&, VT&, NT const&, MT const&, update_parameters&)
template<typename update_parameters>
inline std::pair<NT, int> line_first_positive_intersect(PointType const &r, PointType const &v, VT&, VT&, update_parameters&)
inline std::pair<NT, NT> line_intersect(PointType const &r, PointType const &v) const
inline std::pair<NT, NT> line_intersect(PointType const &r, PointType const &v, VT&, VT&) const
inline std::pair<NT, NT> line_intersect(PointType const &r, PointType const &v, VT&, VT&, NT&) const
inline int is_in(PointType const &p, NT tol = NT(0)) const

Test if a point p is in the spectrahedron

Parameters:

p – is the current point

Returns:

true if position is outside the spectrahedron

inline bool isExterior(MT const &mat) const
inline MT get_mat() const

Public Members

unsigned int n

The size of the matrix.

VT eigenvector