-
Notifications
You must be signed in to change notification settings - Fork 0
/
InfiniteRatioDistanceException.h
65 lines (46 loc) · 1.79 KB
/
InfiniteRatioDistanceException.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*! \file InfiniteRatioDistanceException.h
* \brief The declaration and definition of the InfiniteRatioDistanceException
* exception class.
* \author Christos Nitsas
* \date 2012
*/
#ifndef INFINITE_RATIO_DISTANCE_EXCEPTION_H
#define INFINITE_RATIO_DISTANCE_EXCEPTION_H
#include <exception>
/*!
* \weakgroup ParetoApproximator Everything needed for the Pareto set approximation algorithms.
* @{
*/
//! The namespace containing everything needed for the Pareto set approximation algorithms.
namespace pareto_approximator {
//! The namespace containing all the exception classes.
namespace exception_classes {
/*!
* \brief Exception thrown when we were asked to compute a ratio distance
* and it turns out that it is infinite.
*
* An exception thrown when:
* - We were trying to compute the ratio distance between a point p
* and a hyperplane h but h's normal vector was perpendicular to p's
* coordinate vector (and p was not on h), so multiplying p by a
* constant moves p in a direction parallel to h. (multiplying p will
* never land it on h)
* - We were trying to compute the ratio distance between a point p
* and a facet f but f's normal vector was perpendicular to p's
* coordinate vector (and p was not on f's supporting hyperplane), so
* multiplying p by a constant moves p in a direction parallel to f.
* (multiplying p will never land it on f's supporting hyperplane)
*/
class InfiniteRatioDistanceException : public std::exception
{
public:
//! Return a simple char* message.
const char* what() const throw()
{
return "The requested ratio distance is infinite.";
}
};
} // namespace exception_classes
} // namespace pareto_approximator
/*! @} */
#endif // INFINITE_RATIO_DISTANCE_EXCEPTION_H