From: Andy A. <ad...@si...> - 2003-12-13 18:48:08
|
On Sat, 13 Dec 2003, Paul Kienzle wrote: > It would be a little more convincing if other operators didn't > convert to full as necessary, like + and /. I haven't checked > functions like cos/sin though. I didn't think + converted to full. "/" will, though. I didn't think it was used enough to bother implementing. All the advanced functions (sin/cos etc.) will convert to full. For cos it doesn't make sense to have a sparse implementation since cos(0)=1. ie. the matrix will become filled with ones. For sin, sinh, tan, erf, abs, conj, floor, round, ceil, fix, tanh, sign, asin, asinh, atan, sqrt (any more?) in which func(0)= 0, I could write a template that does the function on each non-sparse element. Then we could define sp_func for each, which could dispatch for sparse operands. Is this worth the work? Andy |