Exemplo n.º 1
0
 private void TryCompute(
     IList <EventBean[]> rowsOne,
     IList <EventBean[]> rowsTwo)
 {
     _results.Clear();
     CartesianUtil.ComputeCartesian(rowsOne, _substreamsA, rowsTwo, _substreamsB, _results);
 }
Exemplo n.º 2
0
        private void PostCartesian(
            IList<EventBean[]>[] rowsPerStream,
            ICollection<EventBean[]> resultFinalRows,
            EventBean resultRootEvent)
        {
            IList<EventBean[]> result = new List<EventBean[]>();
            CartesianUtil.ComputeCartesian(
                rowsPerStream[0],
                subStreamsNumsPerChild[0],
                rowsPerStream[1],
                subStreamsNumsPerChild[1],
                result);

            if (rowsPerStream.Length > 2) {
                for (var i = 0; i < subStreamsNumsPerChild.Length - 2; i++) {
                    IList<EventBean[]> product = new List<EventBean[]>();
                    CartesianUtil.ComputeCartesian(
                        result,
                        combinedSubStreams[i],
                        rowsPerStream[i + 2],
                        subStreamsNumsPerChild[i + 2],
                        product);
                    result = product;
                }
            }

            foreach (var row in result) {
                parentNode.Result(row, streamNum, null, null, resultFinalRows, resultRootEvent);
            }
        }