Revision 327 trunk/src/df1b2separable/f1b2v10.cpp
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) 20082011 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 
*/ 
Also available in: Unified diff