Exemple #1
0
        public override AlgebraNode VisitConcatAlgebraNode(ConcatAlgebraNode node)
        {
            ConcatenationIterator concatenationIterator = new ConcatenationIterator();

            concatenationIterator.RowBuffer   = new object[node.OutputList.Length];
            concatenationIterator.Inputs      = new Iterator[node.Inputs.Length];
            concatenationIterator.InputOutput = new IteratorOutput[node.Inputs.Length][];
            for (int i = 0; i < concatenationIterator.Inputs.Length; i++)
            {
                concatenationIterator.Inputs[i] = ConvertAlgebraNode(node.Inputs[i]);

                List <IteratorOutput> inputOutputList = new List <IteratorOutput>();
                foreach (UnitedValueDefinition unitedValueDefinition in node.DefinedValues)
                {
                    IteratorOutput iteratorOutput = new IteratorOutput();
                    iteratorOutput.SourceIndex = Array.IndexOf(node.Inputs[i].OutputList, unitedValueDefinition.DependendEntries[i]);
                    iteratorOutput.TargetIndex = Array.IndexOf(node.OutputList, unitedValueDefinition.Target);
                    inputOutputList.Add(iteratorOutput);
                }
                concatenationIterator.InputOutput[i] = inputOutputList.ToArray();
            }
            SetLastIterator(node, concatenationIterator);

            return(node);
        }
Exemple #2
0
		public override AlgebraNode VisitConcatAlgebraNode(ConcatAlgebraNode node)
		{
			ConcatenationIterator concatenationIterator = new ConcatenationIterator();
			concatenationIterator.RowBuffer = new object[node.OutputList.Length];
			concatenationIterator.Inputs = new Iterator[node.Inputs.Length];
			concatenationIterator.InputOutput = new IteratorOutput[node.Inputs.Length][];
			for (int i = 0; i < concatenationIterator.Inputs.Length; i++)
			{
				concatenationIterator.Inputs[i] = ConvertAlgebraNode(node.Inputs[i]);

				List<IteratorOutput> inputOutputList = new List<IteratorOutput>();
				foreach (UnitedValueDefinition unitedValueDefinition in node.DefinedValues)
				{
					IteratorOutput iteratorOutput = new IteratorOutput();
					iteratorOutput.SourceIndex = Array.IndexOf(node.Inputs[i].OutputList, unitedValueDefinition.DependendEntries[i]);
					iteratorOutput.TargetIndex = Array.IndexOf(node.OutputList, unitedValueDefinition.Target);
					inputOutputList.Add(iteratorOutput);
				}
				concatenationIterator.InputOutput[i] = inputOutputList.ToArray();
			}
			SetLastIterator(node, concatenationIterator);

			return node;
		}