Package | Description |
---|---|
be.ac.ulb.infof307.g02.controllers | |
be.ac.ulb.infof307.g02.database | |
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 Shop |
ImportArticlesController.targetShop
The shop in which the articles need to be imported
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<Shop> |
ShowResultController.allShops
All the shops contained in the database
|
private java.util.List<Shop> |
MapController.displayedShops
The shops currently displayed on the map
|
private java.util.List<Shop> |
MapController.shops
All the shops that can be displayed on the map
|
Modifier and Type | Method and Description |
---|---|
private Shop[] |
ShowResultController.findShopsWithAllProducts()
Finds all the shops that contain all the products of a grocery list
|
private Shop |
MapController.getShopByID(int shopId)
Returns the shop corresponding to a shopID,
if no such shop is found it throws an NoSuchException
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Shop> |
MapController.getShops() |
Modifier and Type | Method and Description |
---|---|
void |
ControllerMaster.onArticlesImport(Shop targetShop)
Shows the Importation view
|
private void |
ShowResultController.showResultsInView(Shop[] shopsWithAllProducts,
java.util.List<java.lang.Double> pricesList,
java.util.List<java.lang.Double> distancesList,
java.util.List<java.lang.Double> autochefScores)
Tells the view to display the results.
|
Constructor and Description |
---|
ImportArticlesController(ControllerMaster master,
Shop targetShop) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Shop> |
ShopDB.getAllShops()
Gets all the shops from the database
|
Modifier and Type | Method and Description |
---|---|
int |
ShopDB.addShop(Shop shop)
Insert a new entry in the table Shop as well as in the table Schedule from
the database.
|
private int |
ShopDB.insertEmptyShop(Shop shop)
Inserts the basic information of a shop (no schedule or stock) in the database.
|
private void |
ShopDB.insertSchedule(Shop shop)
Inserts the schedule of a shop in the database
|
private void |
ShopDB.insertStockForEmptyShop(Shop shop)
Inserts the stock of a shop in the database
|
Modifier and Type | Method and Description |
---|---|
private void |
ShopDB.fillStocks(java.util.List<Shop> shops)
Fills the stocks of a list of shops
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<Shop> |
BestTourFinder.bestTourShops |
private java.util.List<Shop> |
ShopFilterer.filteredShops |
private java.util.Map<Shop,java.util.List<ProductAmount>> |
BestTourFinder.productsAtShop |
private java.util.List<Shop> |
ShopFilterer.shops |
private java.util.List<Shop> |
BestTourFinder.shops |
Modifier and Type | Method and Description |
---|---|
private Shop |
BestTourFinder.findBestShopForProduct(java.util.Set<Shop> solution,
java.util.Set<Shop> remainingShops,
ProductAmount productAmount)
Finds the best shop to buy the given product.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Shop> |
ShopFilterer.filterShops(FilterData filterData)
Filters shops
|
java.util.List<Shop> |
BestTourFinder.getBestTourShops()
Returns the shops (in order) of the best tour.
|
Modifier and Type | Method and Description |
---|---|
private double |
BestTourFinder.getCostForProductInNewShop(ProductAmount productAmount,
Shop shop,
java.util.Set<Shop> solution)
Gets the cost of buying the product in the shop, given that we haven't planned yet to go to that shop.
|
private double |
BestTourFinder.getCostForProductInVisitedShop(ProductAmount productAmount,
Shop shop)
Gets the cost of buying the product in the shop, given that we already planned to visit the shop to buy another
product.
|
private double |
BestTourFinder.getDistanceCostOfAddingShop(Shop shop,
java.util.Set<Shop> solution)
Return the cost of adding a new shop to the actual tour, using an approximation.
|
private double |
BestTourFinder.getProductPriceAtShop(ProductAmount productAmount,
Shop shop)
Returns the price of buying a product in a certain amount at the given shop.
|
private java.util.List<ProductAmount> |
BestTourFinder.getProductsAtShop(Shop shop)
Returns all the products that the purchaser will buy in a given shop during the best tour.
|
Modifier and Type | Method and Description |
---|---|
private void |
BestTourFinder.findBestRoute(java.util.Set<Shop> solution)
Find the shortest path starting at startPos, going through all the shops in the best tour
and ending at endPos, for small instances.
|
private void |
BestTourFinder.findBestRouteUsingBacktrack(java.util.List<Shop> shopList,
java.util.List<Shop> route,
double distance)
extension of the findBestRoute algorithm using backtracking.
|
private void |
BestTourFinder.findBestRouteUsingBacktrack(java.util.List<Shop> shopList,
java.util.List<Shop> route,
double distance)
extension of the findBestRoute algorithm using backtracking.
|
private Shop |
BestTourFinder.findBestShopForProduct(java.util.Set<Shop> solution,
java.util.Set<Shop> remainingShops,
ProductAmount productAmount)
Finds the best shop to buy the given product.
|
private Shop |
BestTourFinder.findBestShopForProduct(java.util.Set<Shop> solution,
java.util.Set<Shop> remainingShops,
ProductAmount productAmount)
Finds the best shop to buy the given product.
|
private double |
BestTourFinder.getCostForProductInNewShop(ProductAmount productAmount,
Shop shop,
java.util.Set<Shop> solution)
Gets the cost of buying the product in the shop, given that we haven't planned yet to go to that shop.
|
private double |
BestTourFinder.getDistanceCostOfAddingShop(Shop shop,
java.util.Set<Shop> solution)
Return the cost of adding a new shop to the actual tour, using an approximation.
|
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.
|
ShopFilterer(java.util.List<Shop> shops,
Position userPosition) |
Modifier and Type | Method and Description |
---|---|
static void |
ArticlesExporter.exportFrom(Shop shop)
Converts a stock into a string, displays a file chooser and saves the
file
|
private void |
ArticleImporterFromFile.importData(java.io.File file,
Shop targetShop)
Checks the consistency of a CSV file and import all the records if it is consistent.
|
void |
ArticleImporterFromFile.importFrom(Shop targetShop)
Displays a file chooser to select a CSV file to import and process the importation.
|
private void |
ArticleImporterFromFile.insertToDatabase(java.util.List<Article> articlesToImport,
Shop shop)
Inserts all the articles into the shop, by adding the products and articles in the database
|
private static java.lang.String |
ArticlesExporter.stockToCsvFormat(Shop shop)
Converts the stock of a shop into a string formatted for a CSV file
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<Shop> |
MapView.shops |
Modifier and Type | Method and Description |
---|---|
java.util.List<Shop> |
MapView.getShops()
Gets all the shops displayed in the view
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
MapView.createShopMarkerContent(Shop shop)
Creates the marker content for the shop, e.g. create a String containing
HTML that shows the shop name and its schedule.
|
Modifier and Type | Method and Description |
---|---|
void |
MapView.filterShops(java.util.List<Shop> shopsToKeep)
Filters the shops markers on the map
|
void |
MapComponent.hideFilteredShops(java.util.List<Shop> shopsToKeep)
Asks the JavaScript to hide some shops
|