Exemplo n.º 1
0
 /// <summary>
 /// Instantiates a new PatternYielding object as a copy from the original yielding; for parallelization.
 /// </summary>
 public Object Clone()
 {
     PatternYielding yielding = new PatternYielding(Name, null, NeededNodes, NeededEdges, NeededVariables, NeededVariableTypes);
     yielding.originalYielding = originalYielding;
     yielding.originalSubpatternEmbedding = originalSubpatternEmbedding;
     yielding.ElementaryYieldings = new Yielding[ElementaryYieldings.Length];
     for(int i = 0; i < ElementaryYieldings.Length; ++i)
     {
         yielding.ElementaryYieldings[i] = ElementaryYieldings[i].Copy("");
     }
     return yielding;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Instantiates a new PatternYielding object as a copy from an original yielding, used for inlining.
 /// </summary>
 /// <param name="original">The original yielding to be copy constructed.</param>
 /// <param name="inlinedSubpatternEmbedding">The embedding which just gets inlined.</param>
 /// <param name="renameSuffix">The rename suffix to be applied to all the nodes, edges, and variables used.</param>
 public PatternYielding(PatternYielding original, PatternGraphEmbedding inlinedSubpatternEmbedding, string renameSuffix)
 {
     originalYielding = original;
     originalSubpatternEmbedding = inlinedSubpatternEmbedding;
     Name = original.Name + renameSuffix;
     ElementaryYieldings = new Yielding[original.ElementaryYieldings.Length];
     for(int i = 0; i < original.ElementaryYieldings.Length; ++i)
         ElementaryYieldings[i] = original.ElementaryYieldings[i].Copy(renameSuffix);
     NeededNodes = new String[original.NeededNodes.Length];
     for(int i = 0; i < original.NeededNodes.Length; ++i)
         NeededNodes[i] = original.NeededNodes[i] + renameSuffix;
     NeededEdges = new String[original.NeededEdges.Length];
     for(int i = 0; i < original.NeededEdges.Length; ++i)
         NeededEdges[i] = original.NeededEdges[i] + renameSuffix;
     NeededVariables = new String[original.NeededVariables.Length];
     for(int i = 0; i < original.NeededVariables.Length; ++i)
         NeededVariables[i] = original.NeededVariables[i] + renameSuffix;
     NeededVariableTypes = (VarType[])original.NeededVariableTypes.Clone();
 }