예제 #1
0
파일: Split.cs 프로젝트: JRY-Zheng/ligral
        protected override List <Signal> Calculate(List <Signal> values)
        {
            Signal inputSignal = values[0];

            if (!inputSignal.IsMatrix)
            {
                throw logger.Error(new ModelException(this, "Double cannot be splitted."));
            }
            else if (inputSignal.Count() != Results.Count)
            {
                throw logger.Error(new ModelException(this, "Item count inconsistency."));
            }
            else
            {
                inputSignal.ZipApply <Signal>(Results, (value, signal) => signal.Pack(value));
            }
            return(Results);
        }