public void TestFlowOptional() { var rootCartNodeAllOpt = (RootCartProdAssemblyNode) new RootCartProdAssemblyNodeFactory(1, 5, true).MakeAssemblerUnassociated(); rootCartNodeAllOpt.AddChild(new SupportJoinProcNode(2, 5)); rootCartNodeAllOpt.AddChild(new SupportJoinProcNode(3, 5)); rootCartNodeAllOpt.AddChild(new SupportJoinProcNode(4, 5)); parentNode.AddChild(rootCartNodeAllOpt); rootCartNodeAllOpt.Init(null); IList <EventBean[]> resultFinalRows = new List <EventBean[]>(); rootCartNodeAllOpt.Process(null, resultFinalRows, null); // 5 generated rows: 2 (stream 2) + 2 (stream 3) + 1 (self, Node 2) Assert.AreEqual(1, parentNode.RowsList.Count); var rowArr = supportJoinResultNodeFactory.ConvertTo2DimArr(parentNode.RowsList); EPAssertionUtil.AssertEqualsAnyOrder( new[] { new EventBean[] { null, null, null, null, null } }, rowArr); }
public void SetUp() { optAssemblyNode = new BranchOptionalAssemblyNode(1, 4); parentNode = new SupportJoinProcNode(-1, 4); parentNode.AddChild(optAssemblyNode); resultMultipleEvents = supportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 2, 1); // 2 nodes 1 event each for (1) resultSingleEvent = supportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 1, 1); // 1 nodes 1 event each for (1) }
public void SetUp() { _rootCartNodeOneReq = new RootCartProdAssemblyNode(1, 5, false, new int[] { 0, 0, 0, 1, 2 }); _parentNode = new SupportJoinProcNode(-1, 5); _parentNode.AddChild(_rootCartNodeOneReq); // add child nodes to indicate what sub-streams to build the cartesian product from _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(2, 5)); _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(3, 5)); _rootCartNodeOneReq.AddChild(new SupportJoinProcNode(4, 5)); }
public void SetUp() { _optCartNode = new CartesianProdAssemblyNode(1, 4, true, new int[] { 0, 0, 0, 1 }); _parentNode = new SupportJoinProcNode(-1, 4); _parentNode.AddChild(_optCartNode); // add child nodes to indicate what sub-streams to build the cartesian product from _optCartNode.AddChild(new SupportJoinProcNode(2, 4)); _optCartNode.AddChild(new SupportJoinProcNode(3, 4)); _resultMultipleEvents = SupportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 2, 1); // 2 nodes 1 event each for (1) _resultSingleEvent = SupportJoinResultNodeFactory.MakeOneStreamResult(4, 1, 1, 1); // 1 nodes 1 event each for (1) }
public void TestGetSubstreams() { SupportJoinProcNode top = new SupportJoinProcNode(2, 3); SupportJoinProcNode child_1 = new SupportJoinProcNode(5, 3); SupportJoinProcNode child_2 = new SupportJoinProcNode(1, 3); top.AddChild(child_1); top.AddChild(child_2); SupportJoinProcNode child_1_1 = new SupportJoinProcNode(6, 3); SupportJoinProcNode child_1_2 = new SupportJoinProcNode(7, 3); child_1.AddChild(child_1_1); child_1.AddChild(child_1_2); SupportJoinProcNode child_1_1_1 = new SupportJoinProcNode(0, 3); child_1_1.AddChild(child_1_1_1); int[] result = top.Substreams; EPAssertionUtil.AssertEqualsAnyOrder(new int[] { 2, 5, 1, 6, 7, 0 }, result); }
public void SetUp() { _leafNode = new LeafAssemblyNode(1, 4); _parentNode = new SupportJoinProcNode(-1, 4); _parentNode.AddChild(_leafNode); }
public void SetUp() { reqNode = new BranchRequiredAssemblyNode(1, 3); parentNode = new SupportJoinProcNode(-1, 3); parentNode.AddChild(reqNode); }