Skip to content
Snippets Groups Projects
Commit 485544d4 authored by tpapp's avatar tpapp Committed by Nikodemus Siivola
Browse files

generic MEAN and MEDIAN, new function DISPLACE-ARRAY

 Objects other than sequences have means and medians (eg probability
 distributions, arrays, sequences/arrays wrapped in another object, etc), so
 it makes sense to make these functions generic.

 DISPLACE-ARRAY is a small utility function that is used in the implementation
 of MEDIAN for arrays, but is also of general utility because it makes the
 creation of displaced arrays simpler, dispensing with the need to specify the
 element type, and offering sensible defaults when one wants vectors.

 Also added tests for all the new functions/methods.
parent 36800ad1
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment