carl  24.04
Computer ARithmetic Library
checking.h
Go to the documentation of this file.
1 /*
2  * A struct, which contains the checking policies for FLOAT_T intervals when used as boost intervals.
3  *
4  * @file checking.h
5  * @author Stefan Schupp
6  * @author Benedikt Seidl
7  *
8  * @since 2013-12-05
9  * @version 2014-01-27
10  */
11 
12 #pragma once
13 
15 
16 #include <cassert>
17 
18 namespace carl
19 {
20  template<typename Number>
21  struct checking
22  {
23  static Number pos_inf()
24  {
25  return Number(1);
26  }
27  static Number neg_inf()
28  {
29  return Number(-1);
30  }
31  static Number nan()
32  {
33  assert(false);
34  return Number(0);
35  }
36  static bool is_nan(const Number& /*unused*/)
37  {
38  return false;
39  }
40  static Number empty_lower()
41  {
42  return Number(0);
43  }
44  static Number empty_upper()
45  {
46  return Number(0);
47  }
48  static bool is_empty(const Number& _left, const Number& _right)
49  {
50  return _left > _right;
51  }
52  };
53 }
carl is the main namespace for the library.
static bool is_empty(const Number &_left, const Number &_right)
Definition: checking.h:48
static Number pos_inf()
Definition: checking.h:23
static Number neg_inf()
Definition: checking.h:27
static Number empty_upper()
Definition: checking.h:44
static Number empty_lower()
Definition: checking.h:40
static bool is_nan(const Number &)
Definition: checking.h:36
static Number nan()
Definition: checking.h:31