Opened 12 years ago
Last modified 11 years ago
#4917 new Patches
uBLAS element-wise power function
| Reported by: | Owned by: | Gunter | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | uBLAS |
| Version: | Boost Development Trunk | Severity: | Not Applicable |
| Keywords: | Cc: |
Description
I would like to introduce element-wise power function. There are four functions in the patch:
pow( vector_expression, scalar )pow( matrix_expression, scalar )element_pow( vector_expression, vector_expression )element_pow( matrix_expression, matrix_expression )
Synopsis
These functions behave naturally. Let v is a vector, m is a matrix, p is a scalar then
pow( v, p ) and pow( m, p ) just raise each element to the power p. element_pow( v1, v2) is v1[i] ^ v2[i]. element_pow( m1, m2) works similarly.
Rationalize
http://ublas.sourceforge.net mentions "...elements wise basic functions (sin,cos,log,exp,abs,max,min,etc...)"
Patch
The patch contains implementation and also simple test routines.
Attachments (1)
Note:
See TracTickets
for help on using tickets.

good idea