本文整理汇总了C++中Accumulator::addMarSystem方法的典型用法代码示例。如果您正苦于以下问题:C++ Accumulator::addMarSystem方法的具体用法?C++ Accumulator::addMarSystem怎么用?C++ Accumulator::addMarSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accumulator
的用法示例。
在下文中一共展示了Accumulator::addMarSystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: in
void
Talk::cmd_load(mrs_string fname, mrs_natural lineSize)
{
cout << "cmd_load called" << endl;
src_ = new SoundFileSource("src");
src_->updControl("mrs_string/filename", fname);
fname_ = fname;
src_->updControl("mrs_natural/inSamples", lineSize);
AbsMax* absmax = new AbsMax("absmax");
Series *series = new Series("plot");
series->addMarSystem(src_);
series->addMarSystem(absmax);
mrs_natural hops = src_->getctrl("mrs_natural/size")->to<mrs_natural>() * src_->getctrl("mrs_natural/nChannels")->to<mrs_natural>() / src_->getctrl("mrs_natural/inSamples")->to<mrs_natural>() + 1;
Accumulator* acc = new Accumulator("acc");
acc->updControl("mrs_natural/nTimes", hops);
acc->addMarSystem(series);
realvec in(acc->getctrl("mrs_natural/inObservations")->to<mrs_natural>(),
acc->getctrl("mrs_natural/inSamples")->to<mrs_natural>());
realvec out(acc->getctrl("mrs_natural/onObservations")->to<mrs_natural>(),
acc->getctrl("mrs_natural/onSamples")->to<mrs_natural>());
acc->process(in,out);
out.send(communicator_);
// Util util;
// fname_ = fname;
// src_ = util.sfopen(fname, MRS_SF_READ);
// if (src_ == NULL)
// cout << "src_ = NULL" << endl;
// if (src_ != NULL) // File exists
// {
// src_->initWindow(lineSize, lineSize, 0, 0);
// PlotExtractor pextractor(src_, src_->winSize());
// fvec res(src_->iterations());
// pextractor.extract(0, src_->iterations(), res);
// res.send(communicator_);
// }
// else
// {
// fvec res(0);
// res.send(communicator_);
// }
}