Class CorrelationSpectrahedron
-
template<typename Point>
class CorrelationSpectrahedron : public Spectrahedron<Point> This class handles the spectrahedra of correlation matrices The PointType here is stored as vector. For the matrix PointType class, refer to CorrelationSpectrahedron_MT
- Template Parameters:
Point – Point Type
Public Types
-
typedef Precompute<NT, MT, VT> PrecomputationOfValues
Public Functions
-
inline CorrelationSpectrahedron(unsigned int n)
Constructor of correlation matrix spectrahedra.
-
inline unsigned int matrixSize() const
- Returns:
The size of the matrix
-
inline void buildMatrix(VT const &pvector, unsigned int const n, MT &mat) const
Build a correlation matrix from a vector of entries
- Parameters:
vector – [in] of coefficients
the – [in] matrix to be assigned
-
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 void createMatricesForPositiveLinearIntersection(VT const &p, VT const &v)
Construct the generalized eigenvalue problem [Bt - A ] for positive_intersect.
- Parameters:
p – [in] Input vector
v – [in] Input vector
_precomputedValues – [inout] Holds matrices B = I - A(v), A = A(p)
-
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 void unit_normal(VT p, VT const &e, VT &ret) const
Compute the gradient of the determinant of the LMI at p
- Parameters:
p – [in] Input parameter
Input – [in] vector: the eigenvector A(p)*e = 0
ret – [out] The unit normal vector at p
-
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 is_normalized()
-
inline void normalize()