本文整理汇总了C++中ParameterList::GetMultiDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterList::GetMultiDouble方法的具体用法?C++ ParameterList::GetMultiDouble怎么用?C++ ParameterList::GetMultiDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterList
的用法示例。
在下文中一共展示了ParameterList::GetMultiDouble方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WignerDStrategy
std::shared_ptr<FunctionTree> AmpWigner2::SetupTree(
ParameterList& sample, std::string suffix)
{
std::shared_ptr<FunctionTree> newTree(new FunctionTree());
int sampleSize = sample.GetMultiDouble(0)->GetNValues();
//----Strategies needed
std::shared_ptr<WignerDStrategy> angdStrat(
new WignerDStrategy("AngD"+suffix) );
newTree->createHead("AngD_"+suffix, angdStrat, sampleSize);
newTree->createLeaf("spin",_spin.Val(), "AngD_"+suffix); //spin
newTree->createLeaf("m", _mu, "AngD_"+suffix); //OutSpin 1
newTree->createLeaf("n", _muPrime, "AngD_"+suffix); //OutSpin 2
newTree->createLeaf("AngD_sample", sample.GetMultiDouble(_varId), "AngD_"+suffix);
return newTree;
}
示例2: Append
void ParameterList::Append(const ParameterList& addList)
{
for(int i=0; i<addList.GetNBool(); i++ )
AddParameter(addList.GetBoolParameter(i));
for(int i=0; i<addList.GetNInteger(); i++ )
AddParameter(addList.GetIntegerParameter(i));
for(int i=0; i<addList.GetNDouble(); i++ )
AddParameter(addList.GetDoubleParameter(i));
for(int i=0; i<addList.GetNComplex(); i++ )
AddParameter(addList.GetComplexParameter(i));
for(int i=0; i<addList.GetNMultiDouble(); i++ )
AddParameter(addList.GetMultiDouble(i));
for(int i=0; i<addList.GetNMultiComplex(); i++ )
AddParameter(addList.GetMultiComplex(i));
for(int i=0; i<addList.GetNMultiUnsignedInteger(); i++ )
AddParameter(addList.GetMultiUnsignedInteger(i));
}
示例3: execute
bool WignerDStrategy::execute(ParameterList& paras,
std::shared_ptr<AbsParameter>& out)
{
#ifdef DEBUG
if( checkType != out->type() ) {
throw( WrongParType( std::string("Output Type ")
+ParNames[out->type()]+std::string(" conflicts expected type ")
+ParNames[checkType]+std::string(" of ")+name+" Wigner strat") );
return false;
}
#endif
double _inSpin = paras.GetDoubleParameter(0)->GetValue();
double _outSpin1 = paras.GetDoubleParameter(1)->GetValue();
double _outSpin2 = paras.GetDoubleParameter(2)->GetValue();
ComPWA::Physics::DPKinematics::DalitzKinematics* kin =
dynamic_cast<ComPWA::Physics::DPKinematics::DalitzKinematics*>(
Kinematics::instance()
);
std::shared_ptr<MultiDouble> _angle = paras.GetMultiDouble(0);
std::vector<double> results(_angle->GetNValues(), 0.);
for(unsigned int ele=0; ele<_angle->GetNValues(); ele++){
try{
results.at(ele)=AmpWigner2::dynamicalFunction(
_inSpin,_outSpin1,_outSpin2,_angle->GetValue(ele)
);
} catch (std::exception &ex) {
BOOST_LOG_TRIVIAL(error) << "WignerDStrategy::execute() | "
<<ex.what();
throw std::runtime_error("WignerDStrategy::execute() | "
"Evaluation of dynamical function failed!");
}
}//end element loop
out = std::shared_ptr<AbsParameter>(
new MultiDouble(out->GetName(),results));
return true;
}