コード例 #1
0
        public bool Post(string username, string password, int craft_slide, int complexity,
                         int wineOrBeer, int wineCheck, int beerCheck, int spiritCheck, double priceRange)
        {
            UrLocalDB conn = new UrLocalDB();

            return(conn.add_user(username, password, craft_slide, complexity, wineOrBeer, wineCheck, beerCheck, spiritCheck, priceRange));
        }
コード例 #2
0
        public bool Post(string barname, int craft_slide, int complexity,
                         int wineOrBeer, int wineCheck, int beerCheck, int spiritCheck, double lowerQuartileMeal,
                         double lowerQuartileBeer, double upperQuartileMeal, double upperQuartileBeer, string location)
        {
            UrLocalDB conn = new UrLocalDB();

            return(conn.add_bar(barname, craft_slide, complexity, wineOrBeer, wineCheck, beerCheck, spiritCheck, lowerQuartileMeal,
                                lowerQuartileBeer, upperQuartileMeal, upperQuartileBeer, location));
        }
コード例 #3
0
        public (string, string) Get(int id)
        {
            UrLocalDB conn = new UrLocalDB();

            (List <int> bar_id, List <int> craftBeers, List <int> complexities, List <int> wineOrBeers,
             List <bool[]> checkBox, List <double> lowerQuartileMeal, List <double> lowerQuartileBeer, List <double> upperQuartileMeal,
             List <double> upperQuartileBeer) = conn.get_bar();
            K_Nearest_Neighbour knn = new K_Nearest_Neighbour();

            knn.training(id);
            int bestBar = 0;

            for (int i = 0; i < bar_id.Count; i++)
            {
                bestBar = knn.testing(bar_id[i], craftBeers[i], complexities[i],
                                      wineOrBeers[i], checkBox[i], lowerQuartileMeal[i], lowerQuartileBeer[i], upperQuartileMeal[i], upperQuartileBeer[i]);
            }
            (string bar_name, string bar_location) = conn.bar_location(bestBar);
            return(bar_name, bar_location);
        }
コード例 #4
0
        public int Get(string username, string password)
        {
            UrLocalDB conn = new UrLocalDB();

            return(conn.userIdentification(username, password));
        }