public void Setup()
        {
            nearestNeighbours = new NearestNeighbourList<Planet, float>(5, new FloatMath());

            neighbouringPlanets = new List<Planet>();
            neighbouringPlanets.AddRange(new Planet[]
            {
                new Planet() { Name = "Mercury", DistanceFromEarth =   91700000f },
                new Planet() { Name = "Venus",   DistanceFromEarth =   41400000f },
                new Planet() { Name = "Mars",    DistanceFromEarth =   78300000f },
                new Planet() { Name = "Jupiter", DistanceFromEarth =  624400000f },
                new Planet() { Name = "Saturn",  DistanceFromEarth = 1250000000f },
                new Planet() { Name = "Uranus",  DistanceFromEarth = 2720000000f },
                new Planet() { Name = "Neptune", DistanceFromEarth = 4350000000f }
            });
        }
Пример #2
0
        public void Setup()
        {
            nearestNeighbours = new NearestNeighbourList <Planet, float>(5, new FloatMath());

            neighbouringPlanets = new List <Planet>();
            neighbouringPlanets.AddRange(new Planet[]
            {
                new Planet()
                {
                    Name = "Mercury", DistanceFromEarth = 91700000f
                },
                new Planet()
                {
                    Name = "Venus", DistanceFromEarth = 41400000f
                },
                new Planet()
                {
                    Name = "Mars", DistanceFromEarth = 78300000f
                },
                new Planet()
                {
                    Name = "Jupiter", DistanceFromEarth = 624400000f
                },
                new Planet()
                {
                    Name = "Saturn", DistanceFromEarth = 1250000000f
                },
                new Planet()
                {
                    Name = "Uranus", DistanceFromEarth = 2720000000f
                },
                new Planet()
                {
                    Name = "Neptune", DistanceFromEarth = 4350000000f
                }
            });
        }
 public void TearDown()
 {
     nearestNeighbours = null;
 }
Пример #4
0
 public void TearDown()
 {
     nearestNeighbours = null;
 }