|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--Reasoner.ConstraintPropagator.Partition
Maintains the contents of a partition of object inferences that reference each other and no object inferences in other partitions.
| Field Summary | |
java.util.ArrayList |
adjacencies
|
int |
partition_num
|
| Constructor Summary | |
private |
ConstraintPropagator.Partition()
|
| Method Summary | |
void |
addAdjacency(ConstraintPropagator.Adjacency adjacency)
Adds an adjacency to this partition. |
private void |
applyDOFAdjustments(ObjectInference object_inference,
DOFAdjustmentNode dof_adjustment)
Applies a degree-of-freedom adjustment (if present) to the position and/or attitude of an object inference. |
private void |
assignCardinalDirections()
Assigns a random attitude to each object inference in this partition based on whether it has a constraint to face a cardinal direction. |
private void |
buildTransitiveClosure(ObjectInference source_object_inference,
java.util.HashMap transitive_closures)
Builds the transitive closure of the 'in' relation to indicate which object inferences may interpenetrate an object inference. |
private void |
buildTransitiveClosures()
Builds the transitive closure of the 'in' relation to indicate which object inferences may interpenetrate each other. |
private boolean |
containsRelationship(ObjectInference object_inference1,
ObjectInference object_inference2,
java.lang.String relation_name)
Returns whether two object inferences participate in a relationship (in either direction). |
private ConstraintPropagator.Adjacency |
getObjectInference(ObjectInference object_inference)
Returns the first adjacency containing an object inference. |
private boolean |
isTransitivelyEnclosed(ObjectInference object_inference1,
ObjectInference object_inference2)
Returns whether two object inferences are linked through a transitive closure of the 'in' relation. |
private int |
propagate(int max_attempts)
Propagates the constraints in this partition. |
private void |
resetPropagationStates()
Resets the position and attitude states of all object inferences in this partition. |
private void |
sort(int sort_mode)
Orders the object inferences in this partition. |
java.lang.String |
toString()
Returns a string representation of this class. |
private boolean |
verifyNonInterpenetration(ObjectInference base_object_inference)
Returns whether an object inference penetrates an other object inference when it is not allowed to. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.util.ArrayList adjacencies
public int partition_num
| Constructor Detail |
private ConstraintPropagator.Partition()
| Method Detail |
public void addAdjacency(ConstraintPropagator.Adjacency adjacency)
adjacency - - the adjacency
private void applyDOFAdjustments(ObjectInference object_inference,
DOFAdjustmentNode dof_adjustment)
object_inference - - the object inferencedof_adjustment - - the degree-of-freedom adjustment, which can be null
private void assignCardinalDirections()
throws java.lang.Exception
java.lang.Exception - - if the constrain is malformed
private void buildTransitiveClosure(ObjectInference source_object_inference,
java.util.HashMap transitive_closures)
source_object_inference - - the object inference serving as the source of the closuretransitive_closures - - the list of closures to build. This is an in/out parameterprivate void buildTransitiveClosures()
private boolean containsRelationship(ObjectInference object_inference1,
ObjectInference object_inference2,
java.lang.String relation_name)
object_inference1 - - an object inferenceobject_inference2 - - an object inferencerelation_name - - the relation
private boolean isTransitivelyEnclosed(ObjectInference object_inference1,
ObjectInference object_inference2)
object_inference1 - - the source object inferenceobject_inference2 - - the target object inference
private ConstraintPropagator.Adjacency getObjectInference(ObjectInference object_inference)
object_inference - - the object inference to check for
private int propagate(int max_attempts)
throws java.lang.Exception
java.lang.Exception - - if propagation failsprivate void resetPropagationStates()
private void sort(int sort_mode)
sort_mode - - the ordering: 1 for descending by cardinality, 2 for ascending by cardinality, and
3 or higher for randomized. Literal values are used instead of constants to allow this to be
driven by a counterpublic java.lang.String toString()
toString in class java.lang.Object
private boolean verifyNonInterpenetration(ObjectInference base_object_inference)
throws java.lang.Exception
base_object_inference - - the object inference
java.lang.Exception - - if verification fails (due to a developer error)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||