本文整理汇总了C#中BlockList.ExecuteAll方法的典型用法代码示例。如果您正苦于以下问题:C# BlockList.ExecuteAll方法的具体用法?C# BlockList.ExecuteAll怎么用?C# BlockList.ExecuteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockList
的用法示例。
在下文中一共展示了BlockList.ExecuteAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public double Run(double[] data, int detailLevel)
{
var sb = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sb.Append(data[i]);
if (i < data.Length - 1) sb.Append(",");
}
string datastring = sb.ToString();
var textBlock = new ImportFromTextBlock
{
Text = datastring,
ColumnSeparator = ",",
SignalStart = 0,
SignalNameInFirstColumn = false
};
var dwtBlock = new DWTBlock
{
WaveletName = "db10",
Level = detailLevel,
ExtensionMode = SignalExtension.ExtensionMode.ZeroPadding
};
var b = new BlockList();
b.Add(textBlock);
b.Add(dwtBlock);
textBlock.ConnectTo(dwtBlock);
b.ExecuteAll();
int length = dwtBlock.OutputNodes[dwtBlock.OutputNodes.Count-1].Object[detailLevel - 1].Samples.Length;
double val = dwtBlock.OutputNodes[dwtBlock.OutputNodes.Count-1].Object[detailLevel - 1].Samples[length - 1];
return val;
}
示例2: FFTTransform
public static List<double> FFTTransform(List<double> serie)
{
//Declaring the blocks
var inputSeriesBlock = new InputSeriesBlock();
inputSeriesBlock.SetSeries(serie);
var outputSeriesBlock = new OutputSeriesBlock();
var fFTBlock = new FFTBlock
{
Mode = ManagedFFTModeEnum.UseLookupTable
};
//Connecting the blocks
inputSeriesBlock.OutputNodes[0].ConnectTo(fFTBlock.InputNodes[0]);
fFTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);
//Appending the blocks to a block list and execute all
var blockList = new BlockList();
blockList.Add(inputSeriesBlock);
blockList.Add(fFTBlock);
blockList.Add(outputSeriesBlock);
blockList.ExecuteAll();
return outputSeriesBlock.GetSeries();
}
示例3: processOneSeries
private List<double> processOneSeries(List<double> serie)
{
//Declaring the blocks
var inputSeriesBlock = new InputSeriesBlock();
inputSeriesBlock.SetSeries(serie);
var dWTBlock = new DWTBlock
{
WaveletName = "Daubechies 10 (db10)",
Level = 1,
Rescale = false,
ExtensionMode = WaveletStudio.SignalExtension.ExtensionMode.AntisymmetricWholePoint
};
var outputSeriesBlock = new OutputSeriesBlock();
//Connecting the blocks
inputSeriesBlock.OutputNodes[0].ConnectTo(dWTBlock.InputNodes[0]);
dWTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);
//Appending the blocks to a block list and execute all
var blockList = new BlockList();
blockList.Add(inputSeriesBlock);
blockList.Add(dWTBlock);
blockList.Add(outputSeriesBlock);
blockList.ExecuteAll();
return outputSeriesBlock.GetSeries();
}
示例4: WaveletTransform
public static List<double> WaveletTransform(List<double> serie)
{
//Declaring the blocks
var inputSeriesBlock = new InputSeriesBlock();
inputSeriesBlock.SetSeries(serie);
var dWTBlock = new DWTBlock
{
WaveletName = "coif4",
Level = 1,
Rescale = false,
ExtensionMode = SignalExtension.ExtensionMode.AntisymmetricWholePoint
};
var outputSeriesBlock = new OutputSeriesBlock();
//Connecting the blocks
inputSeriesBlock.OutputNodes[0].ConnectTo(dWTBlock.InputNodes[0]);
// dWTBlock.OutputNodes[1].ConnectTo(dWTBlock2.InputNodes[0]);
dWTBlock.OutputNodes[1].ConnectTo(outputSeriesBlock.InputNodes[0]);
//Appending the blocks to a block list and execute all
var blockList = new BlockList();
blockList.Add(inputSeriesBlock);
blockList.Add(dWTBlock);
//blockList.Add(dWTBlock2);
blockList.Add(outputSeriesBlock);
blockList.ExecuteAll();
return outputSeriesBlock.GetSeries();
}