Revision 1109 trunk/src/df1b2-separable/df3fun.cpp

df3fun.cpp (revision 1109)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7

  
8 8
#include <df1b2fun.h>
......
55 55

  
56 56
 dvector value(const df3_one_vector& v)
57 57
 {
58
   
59 58
   int mmin=v.indexmin();
60 59
   int mmax=v.indexmax();
61 60
   dvector cv(mmin,mmax);
......
65 64
   }
66 65
   return cv;
67 66
 }
68
   
67

  
69 68
 dvector first_derivatives(const df3_one_vector& v)
70 69
 {
71
   
72 70
   int mmin=v.indexmin();
73 71
   int mmax=v.indexmax();
74 72
   dvector cv(mmin,mmax);
......
78 76
   }
79 77
   return cv;
80 78
 }
81
   
82 79

  
83 80
 dvector second_derivatives(const df3_one_vector& v)
84 81
 {
85
   
86 82
   int mmin=v.indexmin();
87 83
   int mmax=v.indexmax();
88 84
   dvector cv(mmin,mmax);
......
92 88
   }
93 89
   return cv;
94 90
 }
95
   
91

  
96 92
 dvector third_derivatives(const df3_one_vector& v)
97 93
 {
98
   
99 94
   int mmin=v.indexmin();
100 95
   int mmax=v.indexmax();
101 96
   dvector cv(mmin,mmax);
......
105 100
   }
106 101
   return cv;
107 102
 }
108
   
109 103

  
110 104
  void df3_one_vector::initialize(void)
111 105
  {
......
139 133
    }
140 134
    if ( (shape=new vector_shapex(min,max,v)) == NULL)
141 135
    {
142
      cerr << "Error trying to allocate memory for df3_one_vector" 
136
      cerr << "Error trying to allocate memory for df3_one_vector"
143 137
           << endl;;
144 138
      ad_exit(1);
145 139
    }
146 140
    v-=min;
147 141
  }
148
  
142

  
149 143
  void df3_one_vector::allocate(void)
150 144
  {
151 145
    index_min=0;
......
153 147
    v=0;
154 148
    shape=0;
155 149
  }
156
    
157 150

  
158 151
 dmatrix value(const df3_one_matrix& v)
159 152
 {
160
   
161 153
   int rmin=v.indexmin();
162 154
   int rmax=v.indexmax();
163 155
   dmatrix cm(rmin,rmax);
......
165 157
   {
166 158
     int cmin=v(i).indexmin();
167 159
     int cmax=v(i).indexmax();
168
     cm(i).allocate(cmin,cmax); 
160
     cm(i).allocate(cmin,cmax);
169 161
     for (int j=cmin;j<=cmax;j++)
170 162
     {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff