SpherePackingScenarioGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
AbstractDistribution.h
Go to the documentation of this file.
00001 /*
00002  * AbstractDistribution.h
00003  *
00004  *  Created on: May 4, 2012
00005  *      Author: tanlin
00006  */
00007 
00008 #ifndef ABSTRACTDISTRIBUTION_H_
00009 #define ABSTRACTDISTRIBUTION_H_
00010 
00011 #include <vector>
00012 #include <iostream>
00013 #include <algorithm>
00014 
00015 namespace algorithms {
00016   namespace distributions {
00017     class AbstractDistribution;
00018   }
00019 }
00020 
00021 class algorithms::distributions::AbstractDistribution
00022 {
00023 public:
00024   enum DISTRIBUTIONS {LINEAR, NORMAL};
00025   AbstractDistribution(unsigned int number);
00026   virtual  ~AbstractDistribution();
00027   virtual void generate() = 0;
00028   void sort();
00029   double getSphereSize(unsigned int k);
00030   std::vector<double> getDistribution() {
00031     return _distribution;
00032   }
00033   void getSphereSizeAsDoubleArray(double* array, unsigned int number) const;
00034   void plotDistribution() const;
00035 
00036 protected:
00037   std::vector<double> _distribution;
00038   unsigned int _number;
00039 };
00040 
00041 #endif /* ABSTRACTDISTRIBUTION_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines