Package | Description |
---|---|
com.example.sulemaia.Fragment | |
com.example.sulemaia.Model | |
com.example.sulemaia.Thread |
Modifier and Type | Field and Description |
---|---|
private HeuristicPathTree.Node[][] |
AStar.nodes |
private HeuristicPathTree.Node[][] |
FirstBest.nodes |
private HeuristicPathTree.Node[][] |
UniformCost.nodes |
Modifier and Type | Field and Description |
---|---|
private HeuristicPathTree.Node |
HeuristicPathTree.anchor |
private HeuristicPathTree.Node |
HeuristicPathTree.Node.father |
private HeuristicPathTree.Node |
HeuristicPathTree.lastNode |
Modifier and Type | Field and Description |
---|---|
private ArrayList<HeuristicPathTree.Node> |
HeuristicPathTree.Node.children |
Modifier and Type | Method and Description |
---|---|
HeuristicPathTree.Node |
HeuristicPathTree.getAnchor()
Method to get the first node of the tree.
|
HeuristicPathTree.Node |
HeuristicPathTree.Node.getFather()
Get the father related to a certain node.
|
HeuristicPathTree.Node |
HeuristicPathTree.getFinalNode()
Obtain the final node of the tree.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<HeuristicPathTree.Node> |
HeuristicPathTree.Node.getChildren()
Get the children related to a certain node.
|
Modifier and Type | Method and Description |
---|---|
private void |
HeuristicPathTree.Node.addChild(HeuristicPathTree.Node child)
Add a child to a specific father node.
|
void |
HeuristicPathTree.addMovementAccumulative(HeuristicPathTree.Node child)
Create a step movement between father and child for Uniform Cost Algorithm.
|
void |
HeuristicPathTree.addMovementAll(HeuristicPathTree.Node child)
Create a step movement between father and child for A* algorithm.
|
void |
HeuristicPathTree.addMovementRemaining(HeuristicPathTree.Node child)
Create a step movement between father and child for First Best Algorithm.
|
void |
HeuristicPathTree.addNode(HeuristicPathTree.Node father,
HeuristicPathTree.Node child)
This method adds a child to the specified node.
|
private void |
HeuristicPathTree.inAstar(HeuristicPathTree.Node father) |
private void |
HeuristicPathTree.inOrderFirst(HeuristicPathTree.Node father)
Algorithm to obtain the tree in an Inorder organization, to make sure it will
be displayed correctly.
|
private void |
HeuristicPathTree.inUniformCost(HeuristicPathTree.Node father) |
void |
HeuristicPathTree.setAnchor(HeuristicPathTree.Node anchor)
Method to set the anchor node to the heuristic tree.
|
void |
HeuristicPathTree.Node.setFather(HeuristicPathTree.Node father)
Set a father to a certain node.
|
void |
HeuristicPathTree.setFinal(HeuristicPathTree.Node node)
Method to set the final configuration of the tree.
|
void |
HeuristicPathTree.setInitial(HeuristicPathTree.Node node)
Method to set the initial configuration of the tree.
|
void |
HeuristicPathTree.setLastNode(HeuristicPathTree.Node lastNode)
Method to set the last node for the tree.
|
Constructor and Description |
---|
HeuristicPathTree(HeuristicPathTree.Node anchor)
Constructor of the Heuristic Path Tree.
|
Modifier and Type | Field and Description |
---|---|
private HeuristicPathTree.Node[][] |
ResolverUniformCostThread.nodes |
private HeuristicPathTree.Node[][] |
ResolverAStarThread.nodes |
private HeuristicPathTree.Node[][] |
ResolverFirstBestThread.nodes |
Modifier and Type | Field and Description |
---|---|
private ArrayList<HeuristicPathTree.Node> |
ResolverUniformCostThread.expandedNodes |
private ArrayList<HeuristicPathTree.Node> |
ResolverAStarThread.expandedNodes |
private ArrayList<HeuristicPathTree.Node> |
ResolverFirstBestThread.expandedNodes |
private HashSet<HeuristicPathTree.Node> |
ResolverUniformCostThread.visitedNodes |
private HashSet<HeuristicPathTree.Node> |
ResolverAStarThread.visitedNodes |
private HashSet<HeuristicPathTree.Node> |
ResolverFirstBestThread.visitedNodes |
Modifier and Type | Method and Description |
---|---|
private HeuristicPathTree.Node |
ResolverUniformCostThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
check if the direction in which the node is trying to be expanded is available or has any limitations.
|
private HeuristicPathTree.Node |
ResolverAStarThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
Method to expand a node in all directions, following the expansion order set by the user,
making sure the expansion is possible, rather for map access, or limitations by the user.
|
private HeuristicPathTree.Node |
ResolverFirstBestThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
Method to expand a node in all directions, following the expansion order set by the user,
making sure the expansion is possible, rather for map access, or limitations by the user.
|
Modifier and Type | Method and Description |
---|---|
private void |
ResolverUniformCostThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Expand the nodes correctly, according to the limitations of the map.
|
private void |
ResolverAStarThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
private void |
ResolverFirstBestThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
protected void |
ResolverUniformCostThread.onProgressUpdate(HeuristicPathTree.Node... values)
Every time the thread refreshes, we have to move the character in the UI.
|
protected void |
ResolverAStarThread.onProgressUpdate(HeuristicPathTree.Node... values)
Every time the thread makes a step, we change the character's position.
|
protected void |
ResolverFirstBestThread.onProgressUpdate(HeuristicPathTree.Node... values)
Every time the thread makes a step, we change the character's position.
|
private void |
ResolverFirstBestThread.setFitness(HeuristicPathTree.Node response)
With the fitness, we either use the Euclidean or Manhattan measurement, and set the remaining
measures to the node.
|
private void |
ResolverUniformCostThread.setFitness(HeuristicPathTree.Node response,
HeuristicPathTree.Node Father)
Fitness method so we know which node to select each time.
|
private void |
ResolverAStarThread.setFitness(HeuristicPathTree.Node response,
HeuristicPathTree.Node Father)
With the fitness, we either use the Euclidean or Manhattan measurement, and set the remaining
measures to the node.
|
Modifier and Type | Method and Description |
---|---|
private HeuristicPathTree.Node |
ResolverUniformCostThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
check if the direction in which the node is trying to be expanded is available or has any limitations.
|
private HeuristicPathTree.Node |
ResolverAStarThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
Method to expand a node in all directions, following the expansion order set by the user,
making sure the expansion is possible, rather for map access, or limitations by the user.
|
private HeuristicPathTree.Node |
ResolverFirstBestThread.expandInDirection(String direction,
int y,
int x,
HashSet<HeuristicPathTree.Node> visitedNodes)
Method to expand a node in all directions, following the expansion order set by the user,
making sure the expansion is possible, rather for map access, or limitations by the user.
|
private void |
ResolverUniformCostThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Expand the nodes correctly, according to the limitations of the map.
|
private void |
ResolverUniformCostThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Expand the nodes correctly, according to the limitations of the map.
|
private void |
ResolverAStarThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
private void |
ResolverAStarThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
private void |
ResolverFirstBestThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
private void |
ResolverFirstBestThread.getNodesNextStep(HeuristicPathTree.Node node,
ArrayList<HeuristicPathTree.Node> expandedNodes,
HashSet<HeuristicPathTree.Node> visitedNodes)
Get the children of a node, if they are reachable (the is map available), and if the node
is accessible by the options written by the user.
|
Constructor and Description |
---|
ResolverAStarThread(HeuristicPathTree.Node[][] nodes,
ArrayList<String> expansionOrder,
long updateTime,
iAStar iMethods,
int measureMode)
First Best algorithm constructor.
|
ResolverFirstBestThread(HeuristicPathTree.Node[][] nodes,
ArrayList<String> expansionOrder,
long updateTime,
iFirstTheBest iMethods,
int measureMode)
First Best algorithm constructor.
|
ResolverUniformCostThread(HeuristicPathTree.Node[][] nodes,
ArrayList<String> expansionOrder,
long updateTime,
iUniformCost iMethods)
Constructor of the whole resolver for the Uniform Cost Thread.
|