void RandomParkMiller::Skip(unsigned long numberOfPaths){ MJArray tmp(GetDimensionality()); for(unsigned long j=0;j<numberOfPaths;j++){ GetUniforms(tmp); } }
bool RenderEngine::Initialize(ShaderProgram * shaderP) { if (!BufferManager::Initialize())return false; m_shaderProgramPtr = shaderP; if (!GetUniforms())return false; GameLogger::Log(LogMsgType::cProcess, "RenderEngine::Initialize() successful."); return true; }
void RandomBase::GetGaussian(std::vector<double>& variates) { GetUniforms(variates); for (unsigned long i = 0; i < Dimensionality; i++) { double x = variates[i]; variates[i] = InverseCumulativeNormal(x); } }
void AntiThetic::Skip(unsigned long numberOfPaths) { if (numberOfPaths ==0) return; if (OddEven){ OddEven = false; numberOfPaths--; } InnerGenerator->Skip(numberOfPaths / 2); if (numberOfPaths % 2){ MJArray tmp(GetDimensionality()); GetUniforms(tmp); } }
void AntiThetic::Skip(unsigned long numberOfPaths) { if (numberOfPaths == 0) return; if (!OddEven) { OddEven = true; // ensure the skip is considered from an odd position --numberOfPaths; } InnerGenerator->Skip(numberOfPaths / 2); if (numberOfPaths % 2) { std::vector<double> tmp(GetDimensionality()); GetUniforms(tmp); } }
void AntiThetic::Skip(unsigned long numberOfPaths) { //not skip if (numberOfPaths==0) return; // if next step have to do anti-thetic, reverse the flag and reduce one path if (OddEven) { OddEven = false; numberOfPaths--; } InnerGenerator -> Skip(numberOfPaths/2); if (numberOfPaths %2) { MJArray tmp(GetDimensionality()); GetUniforms(tmp); } }
//---------------------------------------------- Shader::ShaderPtr Shader::Create(const char* vs, const char* fs) { ShaderPtr shader(new Shader()); std::vector<GLuint> stages; stages.push_back(CompileShader(vs, GL_VERTEX_SHADER)); stages.push_back(CompileShader(fs, GL_FRAGMENT_SHADER)); if (LinkShader(shader->impl->obj, stages)) { shader->Activate(); GetUniforms(shader->impl->obj, shader->impl->paramList); shader->Deactivate(); } else { shader.reset(); shader = NULL; } std::for_each(stages.begin(), stages.end(), glDeleteShader); return shader; }
void RandomParkMiller::Skip(unsigned long NumberOfPaths) { std::vector<double> tmp(GetDimensionality()); for(unsigned long j=0; j<NumberOfPaths; j++) GetUniforms(tmp); }