Skip to content
Snippets Groups Projects
Forked from alexandria / alexandria
1755 commits behind the upstream repository.
  • tpapp's avatar
    485544d4
    generic MEAN and MEDIAN, new function DISPLACE-ARRAY · 485544d4
    tpapp authored
     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.
    485544d4
    History
    generic MEAN and MEDIAN, new function DISPLACE-ARRAY
    tpapp authored
     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.