Package | Description |
---|---|
be.ac.ulb.infof307.g02.controllers | |
be.ac.ulb.infof307.g02.models | |
be.ac.ulb.infof307.g02.utils | |
be.ac.ulb.infof307.g02.views |
Modifier and Type | Field and Description |
---|---|
private Position |
MapController.destinationPos
The starting position of a bestTour
|
private Position |
MapController.startingPos
The starting position of a bestTour
|
Modifier and Type | Method and Description |
---|---|
Position |
ControllerMaster.getUserPosition() |
Position |
MapController.getUserPosition()
Returns the user position.
|
Modifier and Type | Method and Description |
---|---|
void |
MapController.onPositionsForTourReady(Position start,
Position end)
Called when the starting and the destination position have been
clicked on the map.
|
void |
ControllerMaster.showResultsScreen(GroceryList groceryList,
Position position)
Shows the result view
|
void |
ControllerMaster.updateUserPosition(Position position)
Updates the position of the user in the Session
|
void |
MapController.updateUserPosition(Position position)
Updates the user position.
|
Modifier and Type | Field and Description |
---|---|
private Position |
BestTourFinder.endPos |
private Position |
Session.position
The current position of a logged in user
|
private Position |
Shop.position |
private Position |
BestTourFinder.startPos |
private Position |
ShopFilterer.userPosition |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Position> |
BestTourFinder.bestTourPositions |
private java.util.List<Position> |
BestTour.tour
The list of positions for the best tour: the starting position, the position of each shop in the best tour
and the ending position.
|
Modifier and Type | Method and Description |
---|---|
Position |
BestTourFinder.getEndPos() |
Position |
Session.getPosition() |
Position |
Shop.getPosition() |
Position |
BestTourFinder.getStartPos() |
Modifier and Type | Method and Description |
---|---|
java.util.List<Position> |
BestTourFinder.getBestTourPositions()
Returns all the positions of the tour: the start position, the shops (in order) and the end position.
|
java.util.List<Position> |
BestTour.getTour()
Gets the besTour found buy the algorithm
|
Modifier and Type | Method and Description |
---|---|
private double |
BestTourFinder.distance(Position posA,
Position posB)
Give the linear distance between two points
|
void |
Session.setPosition(Position position) |
Constructor and Description |
---|
BestTourFinder(Position startPos,
Position endPos,
java.util.List<Shop> shops,
GroceryList groceryList)
Constructor that finds the best tour to buy all the products in the grocery list
among the given shops that starts at the startPos and ends at endPos.
|
Position(Position position) |
Shop(int id,
java.lang.String name,
Schedule schedule,
Position position)
Construct the Shop with an empty stock.
|
Shop(int id,
java.lang.String name,
Schedule schedule,
Position position,
java.util.Map<Product,Article> stock)
Construct the Shop given the ID (from the database).
|
Shop(java.lang.String name,
Schedule schedule,
Position position,
java.util.Map<Product,Article> stock)
Construct the Shop without a real ID (indicated by having ID=1).
|
ShopFilterer(java.util.List<Shop> shops,
Position userPosition) |
Constructor and Description |
---|
BestTour(java.util.List<GroceryList> groceryLists,
java.util.List<Position> tour) |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<java.lang.String> |
DistanceCalculator.convertPositionsToStringList(Position position1,
Position position2)
Converts each position to a String and returns a list with both strings
|
static double |
DistanceCalculator.getLinearDistance(Position position1,
Position position2)
Calculates distance between two points in latitude and longitude using the
Haversine method.
|
static double |
DistanceCalculator.getRealDistance(Position position1,
Position position2)
Calculates the real route distance between two points in latitude and longitude using
GraphHopperAPI
|
Modifier and Type | Field and Description |
---|---|
private Position |
MapComponent.userPosition |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Position> |
MapComponent.markerPositions
The positions of the markers displayed on the map
|
Modifier and Type | Method and Description |
---|---|
Position |
MapView.getUserPosition() |
Modifier and Type | Method and Description |
---|---|
void |
MapView.acknowledgeControllerTourReady(Position start,
Position end)
Tells the Controller that the map is ready to display the Best Tour
|
void |
MapComponent.addMarker(Position position,
java.lang.String markerContent)
Adds a marker to the list that will be given to the JavaScript
|
Modifier and Type | Method and Description |
---|---|
private void |
MapView.showBestTourRoute(java.util.List<Position> path)
Shows the User the route he has to take for a best tour
|