Detailed Description
Class representing a vertex of the (partial) weight space polyhedron.
A vertex of the (partial) weight space polyhedron is given by a weight vector 'weight_' and an weighted objective value 'weighted_obj_val' and is active for a certain number of inequalities of the form 'weight_ \cdot y >= weighted_obj_val' where y are non-dominated extreme points of the considered problem
Definition at line 47 of file weight_space_vertex.h.
Class representing a vertex of the (partial) weight space polyhedron. More...
#include <weight_space_vertex.h>
Public Types | |
enum | VertexStatus { VertexStatus::marked, VertexStatus::obsolete, VertexStatus::unmarked, VertexStatus::special } |
Public Member Functions | |
WeightSpaceVertex (WeightSpacePolyhedron::FacetContainer incident_facets, WeightType weight, ValueType weighted_obj_val, bool sort_facets=true) | |
WeightSpaceVertex (double obs_coeff, double non_obs_coeff, const WeightSpaceVertex *obs, const WeightSpaceVertex *non_obs, const std::shared_ptr< const WeightSpaceFacet > &incident_facet, std::size_t wsp_dimension) | |
WeightType | getWeight () const |
ValueType | getCurrentWOV () const |
double | getWeightedOutcome (const OutcomeType &outcome) const |
double | computeSlack (const OutcomeType &outcome, bool outcome_is_ray) const |
bool | hasUnitWeight () const |
bool | hasZeroWeight () const |
VertexStatus | getStatus () const |
void | setStatus (VertexStatus status) |
bool | hasSameWeight (const WeightType &weight) const |
void | print (std::ostream &os, bool printFacets=false) const |
Friends | |
bool | WeightSpacePolyhedron::areAdjacent (const WeightSpaceVertex *v, const WeightSpaceVertex *w) |
Member Enumeration Documentation
◆ VertexStatus
|
strong |
Different statuses a weight space vertex can take
Enumerator | |
---|---|
marked | |
obsolete | |
unmarked | |
special |
Definition at line 53 of file weight_space_vertex.h.
Constructor & Destructor Documentation
◆ WeightSpaceVertex() [1/2]
|
explicit |
Default constructor
- Parameters
-
incident_facets Incident facets of the constructed vertex weight Lhs coefficients of the constructed vertex weighted_obj_val Rhs coefficient of the constructed vertex sort_facets if true, incident facets are sorted
Definition at line 52 of file weight_space_vertex.cpp.
◆ WeightSpaceVertex() [2/2]
|
explicit |
Constructor creating a new vertex from an obsolete and non-obsolete vertex via the equality new_vertex = obs_coeff * obs + non_obs_coeff * non_obs
- Parameters
-
obs_coeff Coefficient of obsolete vertex non_obs_coeff Coefficient of non-obsolete vertex obs Obsolete vertex non_obs Non-obsolete vertex incident_facet Incident facet of new vertex wsp_dimension Dimension of the corresponding weight space polyhedron
Definition at line 83 of file weight_space_vertex.cpp.
Member Function Documentation
◆ getWeight()
WeightType polyscip::WeightSpaceVertex::getWeight | ( | ) | const |
Returns associated weight vector of weight space vertex
- Returns
- Weight vector of vertex
Definition at line 122 of file weight_space_vertex.cpp.
Referenced by polyscip::WeightSpacePolyhedron::getUntestedWeight().
◆ getCurrentWOV()
ValueType polyscip::WeightSpaceVertex::getCurrentWOV | ( | ) | const |
Returns weighted objective value of vertex
- Returns
- weighted objective value
Definition at line 68 of file weight_space_vertex.cpp.
Referenced by computeSlack(), and polyscip::WeightSpacePolyhedron::getUntestedVertexWOV().
◆ getWeightedOutcome()
double polyscip::WeightSpaceVertex::getWeightedOutcome | ( | const OutcomeType & | outcome | ) | const |
Outcome vector \cdot weight vector
- Parameters
-
outcome Outcome vector
- Returns
- Scalarproduct of outcome and weight vector of vertex
Definition at line 131 of file weight_space_vertex.cpp.
Referenced by computeSlack().
◆ computeSlack()
double polyscip::WeightSpaceVertex::computeSlack | ( | const OutcomeType & | outcome, |
bool | outcome_is_ray | ||
) | const |
Computes slack
- Parameters
-
outcome Outcome vector outcome_is_ray Indicates whether given outcome corresponds to ray
- Returns
- outcome \cdot weight - weighted_obj_val if outcome corresponds to point; else outcome \cdot weight
Definition at line 146 of file weight_space_vertex.cpp.
References getCurrentWOV(), getWeightedOutcome(), and h.
Referenced by polyscip::WeightSpacePolyhedron::areAdjacent().
◆ hasUnitWeight()
bool polyscip::WeightSpaceVertex::hasUnitWeight | ( | ) | const |
Indicates whether weight vector of vertex corresponds to some unit vector
- Returns
- true if weight vector of vertex corresponds to some unit vector; otherwise false
Definition at line 184 of file weight_space_vertex.cpp.
References hasSameWeight().
◆ hasZeroWeight()
bool polyscip::WeightSpaceVertex::hasZeroWeight | ( | ) | const |
Indicates whether weight vector of vertex corresponds to zero vector
- Returns
- true if weight vector of vertex is zero vector; otherwise false
Definition at line 198 of file weight_space_vertex.cpp.
◆ getStatus()
|
inline |
Get vertex status
- Returns
- Status of vertex
Definition at line 129 of file weight_space_vertex.h.
Referenced by polyscip::WeightSpacePolyhedron::getUntestedVertexWOV().
◆ setStatus()
|
inline |
Set vertex status
- Parameters
-
status New status of vertex
Definition at line 135 of file weight_space_vertex.h.
References polyscip::WeightSpacePolyhedron::areAdjacent(), h, hasSameWeight(), print(), and w.
Referenced by polyscip::WeightSpacePolyhedron::getUntestedVertexWOV(), polyscip::WeightSpacePolyhedron::incorporateKnownOutcome(), and polyscip::WeightSpacePolyhedron::WeightSpacePolyhedron().
◆ hasSameWeight()
bool polyscip::WeightSpaceVertex::hasSameWeight | ( | const WeightType & | weight | ) | const |
Compare weight vectors
- Parameters
-
weight Weight to check against
- Returns
- true if given weight vector coincides with weight vector of vertex; otherwise false
Definition at line 176 of file weight_space_vertex.cpp.
Referenced by polyscip::WeightSpacePolyhedron::getUntestedVertexWOV(), hasUnitWeight(), polyscip::WeightSpacePolyhedron::incorporateKnownOutcome(), polyscip::WeightSpacePolyhedron::incorporateNewOutcome(), and setStatus().
◆ print()
void polyscip::WeightSpaceVertex::print | ( | std::ostream & | os, |
bool | printFacets = false |
||
) | const |
Print function
- Parameters
-
os Output stream to write to printFacets Indicate whehter incident facets should be printed
Definition at line 211 of file weight_space_vertex.cpp.
References marked, obsolete, polyscip::global::print(), special, and unmarked.
Referenced by polyscip::WeightSpacePolyhedron::getUntestedVertexWOV(), and setStatus().
Friends And Related Function Documentation
◆ WeightSpacePolyhedron::areAdjacent
|
friend |
- Parameters
-
v w
- Returns