[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: c++ Brug af using



On Fri, 23 Mar 2007 12:45:23 +0100, E. wrote:

> I et eksempel skal en median findes.
> I en række med et ulige antal tages den midterste værdi (så langt er vi
> enige), men i en række med et lige antal tager eksemplet gennemsnittet
> af de to midterste værdier. Her holder min kone fast på, at man i en
> række med et lige antal skal tage den værdi, der kommer efter midten.
> Altså medianen af "1 2 4 5" er 4 og ikke 3 (det var med vilje, at jeg
> sprang 3 over).

Wikipedia siger at "man" ofte tager gennemsnittet når der er et lige
antal (og dermed to medianer): <http://en.wikipedia.org/wiki/Median>

I mine ører er det mindre forkert at gøre som din kone og udnævne en
af medianerne til svaret - mens det pernittengrynet korrekte så kunne
være at returnere mængden af alle medianer.


  Mvh.

-- 
 "HALLELUJAH!                                                 Adam Sjøgren
  Så att säga."                                          sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-04-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *