|
From: sfeam (E. Merritt) <eam...@gm...> - 2012-10-04 17:20:53
|
On Thursday, 04 October 2012, Clement Law wrote:
> Hello,
>
> I've written a small patch[a] that adds a harmonic mean function[1] to
> pm3d corners2color. I've pasted into this private pastebin because the
> mailing list seems to chomp up my attachment.
Got it, thanks.
It looks straightforward and can go into CVS after testing.
Just a note for the future:
That pastebin interface is atrocious.
All I can manage to extract from it is a 20K+ line dump of every
difference in your build tree, regardless of whether it's relevant
to the harmonic mean patch or just CVS tracking cruft. Because it
was obvious that the work as described should only touch
pm3d/set/save/show, I was able to poke around with an editor to
extract what I needed but it was painful.
diff -ur cvs/gnuplot/src/ mytree/gnuplot/src
would produce a far more usable patch.
> The correct usages of this harmonic mean is syntactically identical
> to, say, if you wanted to use geometrical mean (geomean):
>
> set pm3d corners2color harmean
>
> The reason why I added another 'mean' function is to complete the set.
> Gnuplot at the moment as two of the three 'pythagorean means'[2]. The
> harmonic mean is useful as it can offer a truer sense of the average.
> See this physics example [3].
>
> One question I have is that the harmonic mean is not defined for
> numbers less than or equal to 0. Should I have harmean4() return 0 in
> these cases?
>
> I hope it's acceptable, I've never written a patch for any open source
> software before.
>
> Clement Law
>
> [a] http://rifers.org/paste/harmean/show/1883
> [1] http://en.wikipedia.org/wiki/Harmonic_mean
> [2] http://en.wikipedia.org/wiki/Pythagorean_means
> [3] http://en.wikipedia.org/wiki/Harmonic_mean#Physics
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
|