Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="type">OWA,OWG</param>
        /// <param name="weights">required</param>
        /// <returns></returns>
        public static IAggregation CreateWeightAggregation(AggregationType type, List <decimal> weights)
        {
            IAggregation aggregation = null;

            switch (type)
            {
            case AggregationType.OWA:
            {
                aggregation = new OWA(weights);
                break;
            }

            case AggregationType.OWG:
            {
                aggregation = new OWG(weights);
                break;
            }

            default:
            {
                throw new NotImplementedException("Not supported yet.");
            }
            }
            return(aggregation);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="type">OWA,OWG</param>
        /// <param name="weights">required</param>
        /// <returns></returns>
        public static IAggregation CreateWeightAggregation(AggregationType type, List<decimal> weights)
        {
            IAggregation aggregation = null;

            switch (type)
            {
                case AggregationType.OWA:
                    {
                        aggregation = new OWA(weights);
                        break;
                    }
                case AggregationType.OWG:
                    {
                        aggregation = new OWG(weights);
                        break;
                    }
                default:
                    {
                        throw new NotImplementedException("Not supported yet.");
                    }
            }
            return aggregation;
        }