Revision 1921 trunk/src/linad99/dvec_acc.cpp

dvec_acc.cpp (revision 1921)
19 19
*/
20 20
double& dvector::operator[](int i)
21 21
{
22
#ifdef SAFE_ARRAYS
23 22
  if (i < index_min || index_max < i)
24 23
  {
25 24
  #if defined(USE_EXCEPTIONS)
......
29 28
    "double& dvector::operator[] (int i)", index_min, index_max, i);
30 29
  #endif
31 30
  }
32
#endif
33 31
  return *(v+i);
34 32
}
35 33
/**
......
39 37
*/
40 38
double& dvector::operator()(int i)
41 39
{
42
#ifdef SAFE_ARRAYS
43 40
  if (i < index_min || index_max < i)
44 41
  {
45 42
  #if defined(USE_EXCEPTIONS)
......
49 46
    "double& dvector::operator[] (int i)", index_min, index_max, i);
50 47
  #endif
51 48
  }
52
#endif
53 49
  return *(v+i);
54 50
}
55 51
/**
......
59 55
*/
60 56
const double& dvector::operator[](int i) const
61 57
{
62
#ifdef SAFE_ARRAYS
63 58
  if (i < index_min || index_max < i)
64 59
  {
65 60
  #if defined(USE_EXCEPTIONS)
......
69 64
    "double& dvector::operator[] (int i)", index_min, index_max, i);
70 65
  #endif
71 66
  }
72
#endif
73 67
  return *(v+i);
74 68
}
75 69
/**
......
79 73
*/
80 74
const double& dvector::operator()(int i) const
81 75
{
82
#ifdef SAFE_ARRAYS
83 76
  if (i < index_min || index_max < i)
84 77
  {
85 78
  #if defined(USE_EXCEPTIONS)
......
89 82
    "double& dvector::operator[] (int i)", index_min, index_max, i);
90 83
  #endif
91 84
  }
92
#endif
93 85
  return *(v+i);
94 86
}
95 87
#endif

Also available in: Unified diff