当前位置: 首页>>代码示例>>C#>>正文


C# BlockList.ExecuteAll方法代码示例

本文整理汇总了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;
        }
开发者ID:ifzz,项目名称:QuantSys,代码行数:41,代码来源:SignalTransform.cs

示例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();
 }
开发者ID:Bruhankovi4,项目名称:Emotyper,代码行数:21,代码来源:DataTransformations.cs

示例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();
        }
开发者ID:Bruhankovi4,项目名称:Emotyper,代码行数:26,代码来源:MainWindow.xaml.cs

示例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();
        }
开发者ID:Bruhankovi4,项目名称:Emotyper,代码行数:28,代码来源:DataTransformations.cs


注:本文中的BlockList.ExecuteAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。