delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/24/12:13:50

From: Ian Chapman <ichapman AT nortelnetworks DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Histograms
Date: Thu, 24 Feb 2000 11:28:30 -0500
Organization: Nortel
Lines: 22
Message-ID: <38B55C2E.6F9355C1@nortelnetworks.com>
NNTP-Posting-Host: bcarib90.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.7 [en] (Win95; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all,
	I've been using the SampleHistogram class.  My first difficulty was I 
could not find the header files.  After using grep I found that they
were called SmpHist.h and SmpStat.h not _data.h and I got it to compile
and link.  Bit inconsistent there however I got over that.  I could not
find a ref to the header in info.

	I had another slight glitch with x=h.mean; should be x=h.mean();

	My current hick is:-
SampleHistogram h(lo, hi, width); //lo, hi and width declared double.

Int n =h.buckets(); //returns 3 regardless of width.
Int n =h.buckets(); //returns 12 when width is left as default.

	I can work with 12 buckets but thought I'd mention it.  I expected
h.buckets to return width.  Also I do not see why width should be double
I'd have though int would be more appropriate.  I must be missing a
fundamental point somewhere.  Maybe someone could put me straight.  The
rest seems to work like I expected.

		Regards Ian.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019