concepts.dm.crow.planners.regression_planning_impl.crow_regression_planner_priority_tree_v1.PriorityTreeNodeData#
- class PriorityTreeNodeData[source]#
Bases:
NamedTuple
PriorityTreeNodeData(result, left, middle, right, minimize)
Methods
clone
([result, left, middle, right, minimize])count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
is_empty
()This is a helper function to iterate over the right-most statement of the program.
make_empty
(state, middle, minimize)Attributes
Alias for field number 1
Alias for field number 2
Alias for field number 4
Alias for field number 0
Alias for field number 3
- __add__(value, /)#
Return self+value.
- __getitem__(key, /)#
Return self[key].
- __init__()#
- __iter__()#
Implement iter(self).
- __len__()#
Return len(self).
- __mul__(value, /)#
Return self*value.
- static __new__(_cls, result, left, middle, right, minimize)#
Create new instance of PriorityTreeNodeData(result, left, middle, right, minimize)
- Parameters:
result (CrowPlanningResult3)
left (Tuple[ScopedCrowExpression, ...])
middle (CrowBehaviorOrderingSuite | None)
right (Tuple[ScopedCrowExpression, ...])
minimize (ValueOutputExpression | None)
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- iter_from_right()[source]#
This is a helper function to iterate over the right-most statement of the program.
When self.left is not empty, this function moves the left program to the right section.
(L, M, R) <- ([], [], L) || ([], M, R)
When self.right is not empty, this function simply pops the right-most statement and returns the new planning state.
([], M, [R’ | tail]) <- tail || ([], M, R’)
When self.right is empty, this function iterates over the right-most statement of the middle program.
([], (M’ | tail), []) <- tail || ([], M’, [])
- Return type:
Iterator[Tuple[PriorityTreeNodeData, CrowBehaviorOrderingSuite | CrowBehaviorForeachLoopSuite | CrowBehaviorWhileLoopSuite | CrowBehaviorConditionSuite | CrowBindExpression | CrowAssertExpression | CrowRuntimeAssignmentExpression | CrowControllerApplicationExpression | CrowAchieveExpression | CrowUntrackExpression | CrowBehaviorApplicationExpression | CrowBehaviorEffectApplicationExpression | CrowBehaviorCommit | MRProgram, CrowBehaviorOrderingSuite | None, int]]
- classmethod make_empty(state, middle, minimize)[source]#
- Parameters:
minimize (ValueOutputExpression | None)
- Return type:
- left: Tuple[ScopedCrowExpression, ...]#
Alias for field number 1
- middle: CrowBehaviorOrderingSuite | None#
Alias for field number 2
- minimize: ValueOutputExpression | None#
Alias for field number 4
- result: CrowPlanningResult3#
Alias for field number 0
- right: Tuple[ScopedCrowExpression, ...]#
Alias for field number 3