Revision 327

trunk/src/df1b2-separable/df1b2fun.h (revision 327)
1228 1228
df1b2vector pow(const df1b2vector& v,const df1b2vector & x);
1229 1229
df1b2vector pow(const df1b2variable& v,const df1b2vector & x);
1230 1230
df1b2vector pow(double v,const df1b2vector & x);
1231
df1b2vector pow(const dvector& x,  const df1b2vector& a);
1232
df1b2vector pow(const dvector& x,  const df1b2variable& a);
1231 1233

  
1232 1234
df1b2vector operator / (const dvector& x,const df1b2variable& y);
1233 1235
df1b2vector operator + (const dvector& x,const df1b2variable& y);
trunk/src/df1b2-separable/f1b2v10.cpp (revision 327)
1 1
/*
2 2
 * $Id$
3 3
 *
4
 * Author: David Fournier
4
 * Author: David Fournier and Mollie Brooks
5 5
 * Copyright (c) 2008-2011 Regents of the University of California 
6 6
 */
7 7
/**
......
99 99
  }
100 100
  return tmp;
101 101
}
102
/**
103
 \brief raise x to the power a.
104
 \param x vector of bases
105
 \param a the exponent	
106
 */
107
df1b2vector pow(const dvector& x,  const df1b2variable& a)
108
{
109
    RETURN_ARRAYS_INCREMENT();	
110
	df1b2vector y(x.indexmin(), x.indexmax());
111
	
112
	for(int i=x.indexmin(); i<=x.indexmax(); i++)
113
	{
114
		y(i)=pow(x(i),a);
115
	}	
102 116

  
117
	RETURN_ARRAYS_DECREMENT();	
118
    return(y);
119
}
103 120
/**
121
 \brief raise x to the power a.
122
 \param x vector of bases
123
 \param a vector of exponents	
124
 */
125
df1b2vector pow(const dvector& x,  const df1b2vector& a)
126
{
127
    RETURN_ARRAYS_INCREMENT();	
128
	df1b2vector y(x.indexmin(), x.indexmax());
129

  
130
	for(int i=x.indexmin(); i<=x.indexmax(); i++)
131
	{
132
		y(i)=pow(x(i),a(i));
133
	}	
134

  
135
	RETURN_ARRAYS_DECREMENT();	
136
    return(y);
137
}
138
/**
104 139
 * Description not yet available.
105 140
 * \param
106 141
 */
trunk/src/linad99/fvar.hpp (revision 327)
2157 2157
     dvar_vector pow(_CONST dvar_vector& t1,_CONST prevariable&);
2158 2158
     dvar_vector pow(_CONST dvector& t1,_CONST prevariable&);
2159 2159
     dvar_vector pow(_CONST prevariable&,_CONST dvar_vector& t1);
2160
	dvar_vector pow(const dvector& x,const dvar_vector& a);
2160 2161

  
2161 2162
// end of dvar_vector mathematical functions
2162 2163

  
trunk/src/linad99/fvar_a29.cpp (revision 327)
644 644
  save_double_derivative(dfe,epos);
645 645
  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
646 646
}
647
dvar_vector pow(const dvector& x,const dvar_vector& a)
648
{
649
    RETURN_ARRAYS_INCREMENT();	
650
	dvar_vector y(x.indexmin(), x.indexmax());
651

  
652
	for(int i=x.indexmin(); i<=x.indexmax(); i++)
653
	{
654
		y(i)=pow(x(i),a(i));
655
	}	
656

  
657
	RETURN_ARRAYS_DECREMENT();	
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff