File: Quad-opts.h

package info (click to toggle)
octave2.1 1%3A2.1.73-13
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 37,028 kB
  • ctags: 20,874
  • sloc: cpp: 106,508; fortran: 46,978; ansic: 5,720; sh: 4,800; makefile: 3,186; yacc: 3,132; lex: 2,892; lisp: 1,715; perl: 778; awk: 174; exp: 134
file content (70 lines) | stat: -rw-r--r-- 1,359 bytes parent folder | download | duplicates (5)
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
66
67
68
69
70
// DO NOT EDIT!
// Generated automatically from Quad-opts.in.

#if !defined (octave_Quad_options_h)
#define octave_Quad_options_h 1

#include <cfloat>
#include <cmath>



class
Quad_options
{
public:

  Quad_options (void) { init (); }

  Quad_options (const Quad_options& opt) { copy (opt); }

  Quad_options& operator = (const Quad_options& opt)
    {
      if (this != &opt)
        copy (opt);

      return *this;
    }

  ~Quad_options (void) { }

  void init (void)
    {
      x_absolute_tolerance = ::sqrt (DBL_EPSILON);
      x_relative_tolerance = ::sqrt (DBL_EPSILON);
      reset = true;
    }

  void copy (const Quad_options& opt)
    {
      x_absolute_tolerance = opt.x_absolute_tolerance;
      x_relative_tolerance = opt.x_relative_tolerance;
      reset = opt.reset;
    }

  void set_options (const Quad_options& opt) { copy (opt); }

  void set_default_options (void) { init (); }

  void set_absolute_tolerance (double val)
    { x_absolute_tolerance = val; reset = true; }

  void set_relative_tolerance (double val)
    { x_relative_tolerance = val; reset = true; }
  double absolute_tolerance (void) const
    { return x_absolute_tolerance; }

  double relative_tolerance (void) const
    { return x_relative_tolerance; }

private:

  double x_absolute_tolerance;
  double x_relative_tolerance;

protected:

  bool reset;
};

#endif