Revision 753 trunk/src/df1b2-separable/f1b2v10.cpp

f1b2v10.cpp (revision 753)
136 136
    return(y);
137 137
}
138 138
/**
139
 \brief raise v1 to the power v2.
140
 \param v1 vector of bases
141
 \param v2 vector of exponents	
142
 */
143
  dvar_vector pow(const dvar_vector& v1, const dvector& v2)
144
  {
145
    RETURN_ARRAYS_INCREMENT();
146
    dvar_vector tmp(v1.indexmin(),v1.indexmax());
147
    for (int i=v1.indexmin();i<=v1.indexmax();i++)
148
    {
149
      tmp.elem(i)=pow(v1.elem(i),v2.elem(i));             
150
    }
151
    RETURN_ARRAYS_DECREMENT();
152
    return(tmp);
153
  }        
154
/**
155
 \brief raise x to the power v.
156
 \param x vector of bases
157
 \param v vector of exponents	
158
 */  
159
  df1b2vector pow(df1b2vector const& _x,dvector const& v)
160
  {
161
   ADUNCONST(df1b2vector,x);
162
   int mmin=v.indexmin();
163
   int mmax=v.indexmax();
164
   df1b2vector tmp;
165
   tmp.noallocate(mmin,mmax);
166
   for (int i=mmin;i<=mmax;i++) tmp(i)=pow(x(i),v(i));
167
   return tmp;
168
  }
169
  
170
/**
139 171
 * Description not yet available.
140 172
 * \param
141 173
 */

Also available in: Unified diff