コード例 #1
0
        public SEC()
        {
            referencepointService = new ReferencepointService(new ReferencepointRepository(new FruitFlyContext()));
            GetAllPoints().Wait();

            // Make the clusters
            clusters  = new List <Point2D> [k];
            centroids = new Circle2D[k];

            // Select k points from points and set them as centroids.
            // Also create the clusters
            for (int i = 0; i < k; i++)
            {
                clusters[i]  = new List <Point2D>();
                centroids[i] = new Circle2D(new Point2D(0, 0), 0);

                // @TODO make the point selection random
                // Create the center of the SEC.
                centroids[i].p.x = points[i].x;
                centroids[i].p.y = points[i].y;
            }
        }
コード例 #2
0
 public Knearest()
 {
     referencepointService = new ReferencepointService(new ReferencepointRepository(new FruitFlyContext()));
     heatmapService        = new HeatmapService(new HeatmapRepository(new FruitFlyContext()));
     getAllRssiData().Wait();
 }
コード例 #3
0
 public ServiceUnitTest()
 {
     _fruitFlyContext          = new FruitFlyContext(SQLContext.TestDbContextOptions());
     _referencepointRepository = new ReferencepointRepository(_fruitFlyContext);
     _referencepointService    = new ReferencepointService(_referencepointRepository);
 }