/// <summary> /// Evaluates the join map /// </summary> /// <typeparam name="T"></typeparam> /// <param name="source"></param> /// <returns></returns> public override IEnumerable <LabelledTreeNode <object, Term> > Evaluate <T>(IGraphSource source) { var tempSet = new List <LabelledTreeNode <object, Term> >(); foreach (var treeJoin in InputMap2.Evaluate <T>(source)) { tempSet.Add(treeJoin); } foreach (var treeBase in InputMap1.Evaluate <T>(source)) { var result = treeBase; bool isCompatible = false; foreach (var treeJoin in tempSet) { if (JoinHelper.Compatible(treeBase, treeJoin, _addressPairList)) { isCompatible = true; result = JoinHelper.Join(result, treeJoin, _addressPairList); } } if (isCompatible) { yield return(result); } } }
/// <summary> /// Evaluates the union map /// </summary> /// <typeparam name="T"></typeparam> /// <param name="source"></param> /// <returns></returns> public override IEnumerable <LabelledTreeNode <object, Term> > Evaluate <T>(IGraphSource source) { foreach (var tree in InputMap1.Evaluate <T>(source)) { yield return(tree); } foreach (var tree in InputMap2.Evaluate <T>(source)) { yield return(tree); } }