Open PaperOpt
OpenPaperOpt/DistributionFromFiberSamples.h
Go to the documentation of this file.
00001 #ifndef DISTRIBUTIONFROMFIBERSAMPLES_H
00002 #define DISTRIBUTIONFROMFIBERSAMPLES_H
00003 
00004 #include "utilities.h"
00005 #include "utilities.h"
00006 #include "Distribution.h"
00007 #include <string>
00008 #define DEFAULT_MAXREAD_FIBERSAMPLES 20000
00009 
00010 using namespace std;
00011 
00012 namespace Distributions{
00013         class DistributionFromFiberSamples{
00014 
00015         public:
00016 
00017                 DistributionFromFiberSamples(){}
00018                 ~DistributionFromFiberSamples(){}
00019 
00020                 void GenerateRandomNumber(double *len, double *rad, double *Cfactor) ;
00021 
00022                 int LoadSamples(string fname,int minWid,int maxWid,int maxElem=DEFAULT_MAXREAD_FIBERSAMPLES);
00023                                                      //Loads adissional data to the set
00024                                                      //True on error
00025                                                      //Fails if number of elemenrs>=maxElem
00026                                                      //Ignores all fibers that don'r fit limits
00027 
00028 
00029         private:
00030                 vector<FiberSample> mSampleData;
00031         };
00032 }
00033 
00034 
00035 
00036 #endif