本文整理汇总了C#中de.unika.ipd.grGen.lgsp类的典型用法代码示例。如果您正苦于以下问题:C# de.unika.ipd.grGen.lgsp类的具体用法?C# de.unika.ipd.grGen.lgsp怎么用?C# de.unika.ipd.grGen.lgsp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
de.unika.ipd.grGen.lgsp类属于命名空间,在下文中一共展示了de.unika.ipd.grGen.lgsp类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateNode
public static [email protected] CreateNode(GRGEN_LGSP.LGSPNamedGraph graph, string nodeName)
{
[email protected] node;
if(poolLevel == 0)
node = new [email protected]();
else
{
node = pool[--poolLevel];
node.lgspInhead = null;
node.lgspOuthead = null;
node.lgspFlags &= ~(uint) GRGEN_LGSP.LGSPElemFlags.HAS_VARIABLES;
// implicit initialization, container creation of Node
}
graph.AddNode(node, nodeName);
return node;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:16,代码来源:StdModel.cs
示例2: CreateEdge
public static [email protected] CreateEdge(GRGEN_LGSP.LGSPNamedGraph graph, GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target, string edgeName)
{
[email protected] edge;
if(poolLevel == 0)
edge = new [email protected](source, target);
else
{
edge = pool[--poolLevel];
edge.lgspFlags &= ~(uint) GRGEN_LGSP.LGSPElemFlags.HAS_VARIABLES;
edge.lgspSource = source;
edge.lgspTarget = target;
// implicit initialization, container creation of UEdge
}
graph.AddEdge(edge, edgeName);
return edge;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:16,代码来源:StdModel.cs
示例3: ApplyXGRS_createEdge
public static bool ApplyXGRS_createEdge(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.INode var_n1, GRGEN_LIBGR.INode var_n2, ref GRGEN_LIBGR.IEdge var_e)
{
// it is recommended to create an edge as in the function below, immediately adding it to the graph
// then you must work with LGSPNodes, casting the INodes you receive as parameters to that concrete type (inheriting from INode)
var_e = GRGEN_MODEL.E.TypeInstance.CreateEdge(var_n1, var_n2);
procEnv.graph.AddEdge(var_e);
return true;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:8,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例4: ApplyXGRS_foo
public static bool ApplyXGRS_foo(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, int var_v1, double var_v2, GRGEN_MODEL.ENUM_Enu var_v3, string var_v4, bool var_v5, ref int var_r1, ref double var_r2, ref GRGEN_MODEL.ENUM_Enu var_r3, ref string var_r4, ref bool var_r5)
{
var_r1 = var_v1;
var_r2 = var_v2;
var_r3 = var_v3;
var_r4 = var_v4;
var_r5 = var_v5;
return true;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:9,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例5: ApplyXGRS_huh
public static bool ApplyXGRS_huh(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv)
{
object x = procEnv.GetVariableValue("x");
GRGEN_LGSP.LGSPGraph graph = procEnv.graph;
GRGEN_LGSP.LGSPActions actions = procEnv.curActions;
object a = procEnv.GetVariableValue("a");
GRGEN_MODEL.N node_a = (GRGEN_MODEL.N)a;
int val_x = (int)x;
// announce change so that debugger can show new value or transaction manager can record it and roll it back
graph.ChangingNodeAttribute(node_a, GRGEN_MODEL.NodeType_N.AttributeType_i, GRGEN_LIBGR.AttributeChangeType.Assign, val_x, null);
node_a.i = val_x;
// add reflexive edge
GRGEN_MODEL.E someEdge = GRGEN_MODEL.E.CreateEdge(graph, node_a, node_a);
// here you could do other nifty things like deleting nodes, retyping graph elements, or calling rules
return false;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:16,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例6: Filter_filterBass_auto
public static void Filter_filterBass_auto(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.IMatchesExact<Rule_filterBass.IMatch_filterBass> matches)
{
if(matches.Count<2)
return;
List<Rule_filterBass.IMatch_filterBass> matchesArray = matches.ToList();
for(int i = 0; i < matchesArray.Count; ++i)
{
if(matchesArray[i] == null)
continue;
for(int j = i + 1; j < matchesArray.Count; ++j)
{
if(matchesArray[j] == null)
continue;
if(GRGEN_LIBGR.SymmetryChecker.AreSymmetric(matchesArray[i], matchesArray[j], procEnv.graph))
matchesArray[j] = null;
}
}
matches.FromList();
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:19,代码来源:ExternalFiltersAndSequencesActionsExternalFunctions.cs
示例7: CreateEdgewritesTo
public @[email protected] CreateEdgewritesTo(GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target, string edgeName)
{
return @[email protected](this, source, target, edgeName);
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ProgramGraphsOriginalModel.cs
示例8: Filter_f2
public static void Filter_f2(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.IMatchesExact<Rule_filterBass.IMatch_filterBass> matches)
{
// inspect matches carefully and manipulate as needed
IEnumerator<Rule_filterBass.IMatch_filterBass> e = matches.GetEnumeratorExact();
while(e.MoveNext())
{
Rule_filterBass.IMatch_filterBass match = e.Current;
if(match.node_n.i != 42)
break;
}
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:11,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例9: Filter_f1
public static void Filter_f1(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.IMatchesExact<Rule_filterBase.IMatch_filterBase> matches)
{
// just let pass
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例10: CreateEdgemethodBodyContains
public @[email protected] CreateEdgemethodBodyContains(GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target, string edgeName)
{
return @[email protected](this, source, target, edgeName);
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ProgramGraphsOriginalModel.cs
示例11: ApplyXGRS_bla
public static bool ApplyXGRS_bla(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_MODEL.IN var_v1, GRGEN_MODEL.IE var_v2, ref GRGEN_MODEL.IN var_r1, ref GRGEN_MODEL.IE var_r2)
{
var_r1 = var_v1;
var_r2 = var_v2;
return true;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:6,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例12: CreateEdgebindsTo
public @[email protected] CreateEdgebindsTo(GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target)
{
return @[email protected](this, source, target);
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ProgramGraphsOriginalModel.cs
示例13: ApplyXGRS_bar
public static bool ApplyXGRS_bar(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, object var_v1, object var_v2, ref object var_r1)
{
var_r1 = var_v1 ?? var_v2;
return true;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:5,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例14: base
public @UEdge(GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target)
: base(GRGEN_MODEL.EdgeType_UEdge.typeVar, source, target)
{
// implicit initialization, container creation of UEdge
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:5,代码来源:StdModel.cs
示例15: CreateEdgeclassContainsClass
public @[email protected] CreateEdgeclassContainsClass(GRGEN_LGSP.LGSPNode source, GRGEN_LGSP.LGSPNode target, string edgeName)
{
return @[email protected](this, source, target, edgeName);
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ProgramGraphsOriginalModel.cs
示例16: Filter_f3
public static void Filter_f3(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.IMatchesExact<Rule_filterBass.IMatch_filterBass> matches)
{
// inspect matches carefully and manipulate as needed,
// transforming to a List<IMatch> for easier manipulation and back to an IMatchesExact if needed
List<Rule_filterBass.IMatch_filterBass> matchesArray = matches.ToList();
matchesArray.Reverse();
Rule_filterBass.IMatch_filterBass match = matchesArray[matchesArray.Count-1];
matchesArray[matchesArray.Count - 1] = null; // setting to null is an efficient way to delete, better than List.RemoveAt
++match.node_n.i;
matchesArray.Add(match);
matchesArray.Reverse();
matches.FromList();
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:13,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例17: StdIndexSet
public StdIndexSet(GRGEN_LGSP.LGSPGraph graph)
{
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:3,代码来源:StdModel.cs
示例18: Filter_f4
public static void Filter_f4(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.IMatchesExact<Rule_filterHass.IMatch_filterHass> matches, System.Int32 i, System.String s)
{
// inspect matches carefully and manipulate as needed, depending on input parameters
// transforming to a List<IMatch> for easier manipulation and back to an IMatchesExact if needed
List<Rule_filterHass.IMatch_filterHass> matchesArray = matches.ToList();
for(int j = 0; j < matchesArray.Count; ++j)
{
Rule_filterHass.IMatch_filterHass match = matchesArray[j];
if(match.node_n.i < i)
{
matchesArray[j] = null; // setting to null is an efficient way to delete, better than List.RemoveAt
}
if(match.node_n.s != s)
{
match.node_n.s = s;
}
}
matches.FromList();
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:19,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
示例19: FillAsClone
public void FillAsClone(GRGEN_LGSP.LGSPGraph originalGraph, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap)
{
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:3,代码来源:StdModel.cs
示例20: ApplyXGRS_isnull
public static bool ApplyXGRS_isnull(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, object var_v1)
{
return var_v1 == null;
}
开发者ID:ArsenShnurkov,项目名称:GrGen,代码行数:4,代码来源:ExternalFiltersAndSequencesActionsExternalFunctionsImpl.cs
注:本文中的de.unika.ipd.grGen.lgsp类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论