[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reduction funs optimizations + min/max question
From: |
Søren Hauberg |
Subject: |
Re: reduction funs optimizations + min/max question |
Date: |
Tue, 17 Feb 2009 11:31:14 +0100 |
tir, 17 02 2009 kl. 08:56 +0100, skrev Jaroslav Hajek:
> Well, it would take some work, but seems relatively straightforward.
I would consider this a very low-priority task. I was mainly asking
because if it was nothing more than a few lines of code, then these
functions would be nice to have. But I'm guessing that these functions
would only be used rarely.
> We'd need to settle on a specification, though.
> So, my idea:
> y = cummax (x, dim);
> returns cumulative maximum along dimension dim. If dim is omitted,
> operates along the first non-singleton dimension.
> [y, i] = cummax (x);
> returns also cumulative maximum indices.
> cummin is analogical.
This seems like the obvious choice.
> So, the question is: Is it worth doing this for 3.2?
I'd consider this low priority.
> It seems to me that this function cannot be reasonably simulated in
> m-code without using a loop or sacrificing the O(N) complexity. Can
> anyone elaborate on expected usage?
I cannot remember the expected usage. I could probably see some uses of
such functions in image analysis, where you easily work with large
matrices, in which a loop implementation would be too slow to be of any
use.
Soren
- RE: reduction funs optimizations + min/max question, (continued)