public Node() { Neighbors = new List<Node>(); Type = NodeTypeEnum.Normal; MoveableDirections = new HashSet<Direction>(); }
public Node(string name, NodeTypeEnum nodeType, Node parent = null, string correlationKey = null) { Value = name; NodeType = nodeType; Parent = parent; CorrelationKey = correlationKey ?? Guid.NewGuid().ToString(); }
public PentagoNode(PentagoBoard currentState, PentagoNode parent) : base(parent.Depth + 1) { this.currentState = currentState; this.currentTurn = parent.NextTurn(); this.Parent = parent; this.maxDepth = parent.maxDepth; this.nodeType = (parent.nodeType == NodeTypeEnum.MAX) ? NodeTypeEnum.MIN : NodeTypeEnum.MAX; //System.Diagnostics.Debug.WriteLine(Depth+" "+currentTurn.State); }
/// <summary> /// constructor for root node /// </summary> /// <param name="currentState">current board</param> /// <param name="currentTurn">current turn(who is moving now)</param> public PentagoNodeEx(PentagoBoard currentState, Status currentTurn, int maxDepth) : base(0) { this.CurrentState = currentState; this.currentTurn = currentTurn; this.currentTurn = this.NextTurn(); this.Parent = null; this.maxDepth = maxDepth; this.nodeType = NodeTypeEnum.MAX; System.Diagnostics.Debug.WriteLine(Depth); }
private TreeNode GetParentNodeByType(TreeNode oNode, NodeTypeEnum eType) { if (oNode.Type == eType) { return(oNode); } else { return(this.GetParentNodeByType(((TreeNode)oNode.Parent), eType)); } }
public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis) { this.JointIndex = index; this.Type = type; if (NodeTypeEnum.END != Type) Children = new ArrayList(); this.Parent = parent; if(parent != null) parent.AddChild(this); this.Axis = axis; }
//查询函数,返回节点列表中指定类型的所有节点 public List <IfCoreNode> GetNodesOfType(NodeTypeEnum type) { List <IfCoreNode> ResultList = new List <IfCoreNode>(); //遍历节点列表 foreach (IfCoreNode curNode in NodeList) { if (curNode.Type.Type == type) {//将符合type要求的节点加入返回结果列表 ResultList.Add(curNode); } } return(ResultList); }
internal IEnumerable <TransitionInstanceEntity> GetTransitonInstance(string appName, int appInstanceID, Guid processGUID, NodeTypeEnum toActivityType) { var sql = "SELECT * FROM WfTransitionInstance WHERE AppName=@appName AND AppInstanceID=@appInstanceID AND ProcessGUID=@processGUID AND ToActivityType=@toActivityType ORDER BY CreatedDateTime DESC"; var nodeList = TransitionInstanceRepository.Query <TransitionInstanceEntity>(sql, new { appName = appName, appInstanceID = appInstanceID, processGUID = processGUID, toActivityType = toActivityType }); return(nodeList); }
public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis) { this.JointIndex = index; this.Type = type; if (NodeTypeEnum.END != Type) { Children = new ArrayList(); } this.Parent = parent; if (parent != null) { parent.AddChild(this); } this.Axis = axis; }
public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint) { this.IsKinectJoint = isKinectJoint; this.JointIndex = index; Name = isKinectJoint ? index.ToString() : name; this.BaseAxis = axis; this.Type = type; if(Type != NodeTypeEnum.END) Children = new ArrayList(); if (null != parent) { this.Parent = parent; parent.AddChild(this); } }
public JointNode(string name, JointType index, JointNode parent, Axis axis, NodeTypeEnum type, bool isKinectJoint) { this.IsKinectJoint = isKinectJoint; this.JointIndex = index; Name = isKinectJoint ? index.ToString() : name; this.BaseAxis = axis; this.Type = type; if (Type != NodeTypeEnum.END) { Children = new ArrayList(); } if (null != parent) { this.Parent = parent; parent.AddChild(this); } }
public static List <INode> Get(NodeTypeEnum @enum) { return(servers.Where(m => m.Node.NodeType == @enum).Select(m => m.Node).ToList()); }
//连边类型构造函数 public NodeType(string sTypeName) { intType = NameToType(sTypeName); }
//连边类型构造函数 public NodeType(NodeTypeEnum iType) { intType = iType; }
public void SetConditionNodeType(NodeTypeEnum value) { this.ConditionNodeType = (int)value; }
/// <summary> /// Formula node /// </summary> protected BaseFormulaNode(NodeTypeEnum typeKey) { TypeKey = typeKey; }
public TreeNode GetParentNodeByType(NodeTypeEnum eType) { return(this.GetParentNodeByType(this, eType)); }
public PropertyNode(string name, NodeTypeEnum nodeType, string correlationKey = null, Node parent = null) : base(name, nodeType, parent, correlationKey) { }
public BaseNode(string Name, NodeTypeEnum NodeType) { _name = Name; _nodeType = NodeType; _childNodes = new ArrayList(); }
public NodeProperty(int nodeId, NodeTypeEnum nodeType) { NodeId = nodeId; NodeType = nodeType; }
public ValueNode(string value, NodeTypeEnum nodeType, Node parent = null) : base(value, nodeType, parent, null) { }