Alex Bikfalvi
SimStream Documentation
Prob.h
00001 /* 00002 * SimPushSelect : simulator of optimal peer selection for P2P IPTV 00003 * 00004 * Developers : alex, jaime 00005 */ 00006 00007 #pragma once 00008 00009 #include "Hyp.h" 00010 #include "SimMutex.h" 00011 00012 class CProb 00013 { 00014 private: 00015 double alpha; 00016 double xmin; 00017 double xmax; 00018 00019 double c1; 00020 double c2; 00021 double c3; 00022 double c4; 00023 00024 Hyp2F1* hyp; 00025 00026 double* cache; 00027 00028 unsigned int cacheEpiMax; 00029 unsigned int cacheEciMax; 00030 00031 double cacheAlpha; 00032 double cacheXmin; 00033 double cacheXmax; 00034 00035 double cacheEpMin; 00036 double cacheEpMax; 00037 double cacheEpDelta; 00038 00039 double cacheEcMin; 00040 double cacheEcMax; 00041 double cacheEcDelta; 00042 00043 CSimMutex mutex; 00044 00045 public: 00046 CProb( 00047 double alpha, 00048 double xmin, 00049 double xmax, 00050 const char* cacheFile 00051 ); 00052 ~CProb(); 00053 00054 double Prob(double ep, double ec); 00055 00056 protected: 00057 double InvCdf0(double ep, double ec); 00058 double Integral(double x, double z, double ep, double ec); 00059 00060 void CacheDefault(); 00061 }; 00062 00063
Last updated: February 8, 2011