changeset 35:eb23eeae4198 PR_univ

updated include paths
author Sean Halle <seanhalle@yahoo.com>
date Fri, 20 Sep 2013 00:01:08 -0700
parents 8166ea441cb5
children 6bdcb337576b
files DblHist.c FloatHist.c Histogram.c Histogram.h prhistogram.h
diffstat 5 files changed, 107 insertions(+), 105 deletions(-) [+]
line diff
     1.1 --- a/DblHist.c	Tue Jul 23 07:32:47 2013 -0700
     1.2 +++ b/DblHist.c	Fri Sep 20 00:01:08 2013 -0700
     1.3 @@ -7,7 +7,8 @@
     1.4   */
     1.5  
     1.6  #include <stdio.h>
     1.7 -#include "Histogram.h"
     1.8 +#include <PR__include/prmalloc.h>
     1.9 +#include <PR__include/prhistogram.h>
    1.10  
    1.11  
    1.12  /*This Histogram Abstract Data Type has a number of bins, the starting
     2.1 --- a/FloatHist.c	Tue Jul 23 07:32:47 2013 -0700
     2.2 +++ b/FloatHist.c	Fri Sep 20 00:01:08 2013 -0700
     2.3 @@ -6,7 +6,7 @@
     2.4   *
     2.5   */
     2.6  #include <stdio.h>
     2.7 -#include "Histogram.h"
     2.8 +#include <PR__include/prhistogram.h>
     2.9  
    2.10  /*This Histogram Abstract Data Type has a number of bins, the starting
    2.11   * value, and the width of each bin, as a float, all chosen at creation.
     3.1 --- a/Histogram.c	Tue Jul 23 07:32:47 2013 -0700
     3.2 +++ b/Histogram.c	Fri Sep 20 00:01:08 2013 -0700
     3.3 @@ -7,8 +7,8 @@
     3.4   */
     3.5  #include <stdio.h>
     3.6  #include <string.h>
     3.7 -#include "Histogram.h"
     3.8 -#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h"
     3.9 +#include <PR__include/prhistogram.h>
    3.10 +#include <PR__include/prmalloc.h>
    3.11  
    3.12  /*This Histogram Abstract Data Type has a number of bins plus a range of
    3.13   * values that the bins span, both chosen at creation.
     4.1 --- a/Histogram.h	Tue Jul 23 07:32:47 2013 -0700
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,101 +0,0 @@
     4.4 -/*
     4.5 - *  Copyright 2010 OpenSourceResearchInstitute.org
     4.6 - *  Licensed under GNU General Public License version 2
     4.7 - *
     4.8 - * Author: seanhalle@yahoo.com
     4.9 - * 
    4.10 - */
    4.11 -
    4.12 -
    4.13 -#ifndef _HISTOGRAM_H
    4.14 -#define	_HISTOGRAM_H
    4.15 -
    4.16 -#include "PR__common_includes/PR__primitive_data_types.h"
    4.17 -
    4.18 -
    4.19 -typedef struct
    4.20 - {
    4.21 -   char  *name;
    4.22 -   int32  startOfRange;
    4.23 -   int32  endOfRange;
    4.24 -   int32  numBins;
    4.25 -   int32  binWidth;
    4.26 -   int32 *bins;
    4.27 - }
    4.28 -Histogram;
    4.29 -
    4.30 -typedef struct
    4.31 - {
    4.32 -   float32  startOfRange;
    4.33 -   float32  endOfRange;
    4.34 -   int32    numBins;
    4.35 -   float32  binWidth;
    4.36 -   int32   *bins;
    4.37 - }
    4.38 -FloatHist;
    4.39 -
    4.40 -typedef struct
    4.41 - {
    4.42 -   float64 startOfRange;
    4.43 -   float64  endOfRange;
    4.44 -   int32    numBins;
    4.45 -   float64  binWidth;
    4.46 -   int32   *bins;
    4.47 - }
    4.48 -DblHist;
    4.49 -
    4.50 -Histogram *
    4.51 -makeHistogram( int32 numBins, int32 startOfRange, int32 endOfRange );
    4.52 -
    4.53 -Histogram *
    4.54 -makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth,
    4.55 -                  char *name );
    4.56 -
    4.57 -Histogram *
    4.58 -makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth,
    4.59 -                     char *name );
    4.60 -
    4.61 -void inline
    4.62 -addToHist( int32 value, Histogram *hist );
    4.63 -
    4.64 -void inline
    4.65 -addIntervalToHist( uint32 startIntvl, uint32 endIntvl, Histogram *hist );
    4.66 -
    4.67 -void inline
    4.68 -subIntervalFromHist( int32 startIntvl, int32 endIntvl, Histogram *hist );
    4.69 -
    4.70 -void
    4.71 -saveHistToFile(Histogram *hist);
    4.72 -
    4.73 -void
    4.74 -printHist( Histogram *hist );
    4.75 -
    4.76 -FloatHist *
    4.77 -makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth );
    4.78 -
    4.79 -void
    4.80 -addToFloatHist( float32 value, FloatHist *hist );
    4.81 -
    4.82 -void
    4.83 -printFloatHist( FloatHist *hist );
    4.84 -
    4.85 -void
    4.86 -freeHistExt( Histogram *hist );
    4.87 -
    4.88 -void
    4.89 -freeHist( Histogram *hist );
    4.90 -
    4.91 -DblHist *
    4.92 -makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth );
    4.93 -
    4.94 -void
    4.95 -addToDblHist( float64 value, DblHist *hist );
    4.96 -
    4.97 -void
    4.98 -printDblHist( DblHist *hist );
    4.99 -
   4.100 -void
   4.101 -freeDblHist( DblHist *hist );
   4.102 -
   4.103 -#endif	/* _HISTOGRAM_H */
   4.104 -
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/prhistogram.h	Fri Sep 20 00:01:08 2013 -0700
     5.3 @@ -0,0 +1,102 @@
     5.4 +/*
     5.5 + *  Copyright 2010 OpenSourceResearchInstitute.org
     5.6 + *  Licensed under GNU General Public License version 2
     5.7 + *
     5.8 + * Author: seanhalle@yahoo.com
     5.9 + * 
    5.10 + */
    5.11 +
    5.12 +
    5.13 +#ifndef _PRHISTOGRAM_H
    5.14 +#define	_PRHISTOGRAM_H
    5.15 +
    5.16 +#include <PR__include/prmalloc.h>
    5.17 +#include <PR__include/PR__primitive_data_types.h>
    5.18 +
    5.19 +
    5.20 +typedef struct
    5.21 + {
    5.22 +   char  *name;
    5.23 +   int32  startOfRange;
    5.24 +   int32  endOfRange;
    5.25 +   int32  numBins;
    5.26 +   int32  binWidth;
    5.27 +   int32 *bins;
    5.28 + }
    5.29 +Histogram;
    5.30 +
    5.31 +typedef struct
    5.32 + {
    5.33 +   float32  startOfRange;
    5.34 +   float32  endOfRange;
    5.35 +   int32    numBins;
    5.36 +   float32  binWidth;
    5.37 +   int32   *bins;
    5.38 + }
    5.39 +FloatHist;
    5.40 +
    5.41 +typedef struct
    5.42 + {
    5.43 +   float64 startOfRange;
    5.44 +   float64  endOfRange;
    5.45 +   int32    numBins;
    5.46 +   float64  binWidth;
    5.47 +   int32   *bins;
    5.48 + }
    5.49 +DblHist;
    5.50 +
    5.51 +Histogram *
    5.52 +makeHistogram( int32 numBins, int32 startOfRange, int32 endOfRange );
    5.53 +
    5.54 +Histogram *
    5.55 +makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth,
    5.56 +                  char *name );
    5.57 +
    5.58 +Histogram *
    5.59 +makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth,
    5.60 +                     char *name );
    5.61 +
    5.62 +void inline
    5.63 +addToHist( int32 value, Histogram *hist );
    5.64 +
    5.65 +void inline
    5.66 +addIntervalToHist( uint32 startIntvl, uint32 endIntvl, Histogram *hist );
    5.67 +
    5.68 +void inline
    5.69 +subIntervalFromHist( int32 startIntvl, int32 endIntvl, Histogram *hist );
    5.70 +
    5.71 +void
    5.72 +saveHistToFile(Histogram *hist);
    5.73 +
    5.74 +void
    5.75 +printHist( Histogram *hist );
    5.76 +
    5.77 +FloatHist *
    5.78 +makeFloatHistogram( int numBins, float32 startOfRange, float32 binWidth );
    5.79 +
    5.80 +void
    5.81 +addToFloatHist( float32 value, FloatHist *hist );
    5.82 +
    5.83 +void
    5.84 +printFloatHist( FloatHist *hist );
    5.85 +
    5.86 +void
    5.87 +freeHistExt( Histogram *hist );
    5.88 +
    5.89 +void
    5.90 +freeHist( Histogram *hist );
    5.91 +
    5.92 +DblHist *
    5.93 +makeDblHistogram( int numBins, float64 startOfRange, float64 binWidth );
    5.94 +
    5.95 +void
    5.96 +addToDblHist( float64 value, DblHist *hist );
    5.97 +
    5.98 +void
    5.99 +printDblHist( DblHist *hist );
   5.100 +
   5.101 +void
   5.102 +freeDblHist( DblHist *hist );
   5.103 +
   5.104 +#endif	/* _HISTOGRAM_H */
   5.105 +