Commit b3861759 authored by katrien's avatar katrien
Browse files

added function to check whether a node is the initial node

parent c7a92709
......@@ -64,7 +64,6 @@
:direction (direction cip)
:resulting-cfs (initial-cfs cip))
:cip cip :created-at 0
:priority 1.0
:diagnostics (unless fcg-2 (diagnostics (original-cxn-set (construction-inventory cip))))
:repairs (unless fcg-2 (repairs (original-cxn-set (construction-inventory cip)))))))
(setf (top-node cip) top-node)
......@@ -120,7 +119,7 @@
:accessor applied-constructions
:documentation "All constructions that have been applied so far")
(priority
:type number :initarg :priority :initform 0.0 :accessor priority
:type number :initarg :priority :initform 1.0 :accessor priority
:documentation "The higher, the more in front in the queue")
(goal-test-data
:type blackboard :accessor goal-test-data :initform (make-blackboard)
......@@ -151,6 +150,11 @@
(defmethod parent ((node cip-node))
(first (all-parents node)))
(defun initial-node-p (node)
"Checks if a node is the initial node."
(when (= (created-at node) 0)
t))
(defun upward-branch (cipn &key (include-initial t))
"Returns the given cipn and all its parents"
(cons cipn (if include-initial
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment