Ejemplo n.º 1
0
        public static KnnSingleDimension Create(Knn.INeighbour[] population)
        {
            if (population == null || population.Length == 0) throw new ArgumentException("Population was null or empty");
            if (population[0].KnnVector == null || population[0].KnnVector.Length == 0) throw new ArgumentException("Zero dimensionality knn vector");

            KnnSingleDimension knn = new KnnSingleDimension(population);

            return knn;
        }
        public static KnnSingleDimension Create(Knn.INeighbour[] population)
        {
            if (population == null || population.Length == 0)
            {
                throw new ArgumentException("Population was null or empty");
            }
            if (population[0].KnnVector == null || population[0].KnnVector.Length == 0)
            {
                throw new ArgumentException("Zero dimensionality knn vector");
            }

            KnnSingleDimension knn = new KnnSingleDimension(population);

            return(knn);
        }