📄 gen_06.cc
字号:
// file: $isip/class/algo/Generator/gen_06.cc// version: $Id: gen_06.cc,v 1.1 2002/07/04 01:51:05 picone Exp $//// isip include files//#include "Generator.h"// method: setPhase//// arguments:// float phase: (input) phase value//// return: a boolean value indicating status//// this method sets the phase value//boolean Generator::setPhase(float phase_a) { // branch on the phase mode: RANDOM // if (phmode_d == RANDOM) { // initialize random generator // Random rand; rand.setAlgorithm(Random::UNIFORM); rand.setImplementation(Random::SUBTRACTIVE); rand.seed((long)seed_d); phase_d = rand.get() * 2.0 * Integral::PI; } // else: use the value as is // else { phase_d = phase_a; } // exit gracefully // is_valid_d = false; return true;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -