Commit 485544d4 authored by Committed by Nikodemus SiivolaBrowse 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.
Showing with 87 additions and 9 deletions