예제 #1
0
        public override DataTable GetSkylineTable(String querySQL, String preferenceOperators)
        {
            DataTable dt;

            if (HasIncomparablePreferences)
            {
                //Hexagon incomparable needs additional parameters
                SPSkylineHexagon skyline = new SPSkylineHexagon();

                AdditionParameters[4] = AdditionParameters[4].Trim().Replace("''", "'").Trim('\'');
                //Change operators array and SQL query (replace INCOMPARABLES values)
                skyline.CalculateOperators(ref preferenceOperators, AdditionParameters, ConnectionString, Provider, ref querySQL);

                dt = skyline.GetSkylineTable(querySQL, preferenceOperators, RecordAmountLimit, true, ConnectionString, Provider, AdditionParameters, SortType);
                TimeMilliseconds    = skyline.TimeInMs;
                NumberOfComparisons = skyline.NumberOfOperations;
                NumberOfMoves       = skyline.NumberOfMoves;
            }
            else
            {
                SPSkylineHexagonLevel skyline = new SPSkylineHexagonLevel();
                dt = skyline.GetSkylineTable(querySQL, preferenceOperators, RecordAmountLimit, true, ConnectionString, Provider, AdditionParameters, SortType);
                TimeMilliseconds    = skyline.TimeInMs;
                NumberOfComparisons = skyline.NumberOfOperations;
                NumberOfMoves       = skyline.NumberOfMoves;
            }
            return(dt);
        }
예제 #2
0
        public override DataTable GetSkylineTable(String querySQL, String preferenceOperators)
        {
            DataTable dt;
            if (HasIncomparablePreferences)
            {
                //Hexagon incomparable needs additional parameters
                SPSkylineHexagon skyline = new SPSkylineHexagon();

                AdditionParameters[4] = AdditionParameters[4].Trim().Replace("''", "'").Trim('\'');
                //Change operators array and SQL query (replace INCOMPARABLES values)
                skyline.CalculateOperators(ref preferenceOperators, AdditionParameters, ConnectionString, Provider, ref querySQL);

                dt = skyline.GetSkylineTable(querySQL, preferenceOperators, RecordAmountLimit, true, ConnectionString, Provider, AdditionParameters, SortType);
                TimeMilliseconds = skyline.TimeInMs;
                NumberOfComparisons = skyline.NumberOfOperations;
                NumberOfMoves = skyline.NumberOfMoves;
            }
            else
            {
                SPSkylineHexagonLevel skyline = new SPSkylineHexagonLevel();
                dt = skyline.GetSkylineTable(querySQL, preferenceOperators, RecordAmountLimit, true, ConnectionString, Provider, AdditionParameters, SortType);
                TimeMilliseconds = skyline.TimeInMs;
                NumberOfComparisons = skyline.NumberOfOperations;
                NumberOfMoves = skyline.NumberOfMoves;
            }
            return dt;
        }
예제 #3
0
        public static void GetSkyline(SqlString strQuery, SqlString strOperators, SqlInt32 numberOfRecords, SqlInt32 sortType, SqlString strSelectIncomparable, int weightHexagonIncomparable)
        {
            SPSkylineHexagon skyline = new SPSkylineHexagon();
            string[] additionalParameters = new string[6];
            additionalParameters[4] = strSelectIncomparable.ToString();
            additionalParameters[5] = weightHexagonIncomparable.ToString();
            string preferenceOperators = strOperators.Value;
            string querySQL = strQuery.Value;

            //Change operators array and SQL query (replace INCOMPARABLES values)
            skyline.CalculateOperators(ref preferenceOperators, additionalParameters, Helper.CnnStringSqlclr, Helper.ProviderClr, ref querySQL);

            skyline.GetSkylineTable(querySQL, preferenceOperators, numberOfRecords.Value, false, Helper.CnnStringSqlclr, Helper.ProviderClr, additionalParameters, sortType.Value);
        }
예제 #4
0
        public static void GetSkyline(SqlString strQuery, SqlString strOperators, SqlInt32 numberOfRecords, SqlInt32 sortType, SqlString strSelectIncomparable, int weightHexagonIncomparable)
        {
            SPSkylineHexagon skyline = new SPSkylineHexagon();

            string[] additionalParameters = new string[6];
            additionalParameters[4] = strSelectIncomparable.ToString();
            additionalParameters[5] = weightHexagonIncomparable.ToString();
            string preferenceOperators = strOperators.Value;
            string querySQL            = strQuery.Value;

            //Change operators array and SQL query (replace INCOMPARABLES values)
            skyline.CalculateOperators(ref preferenceOperators, additionalParameters, Helper.CnnStringSqlclr, Helper.ProviderClr, ref querySQL);

            skyline.GetSkylineTable(querySQL, preferenceOperators, numberOfRecords.Value, false, Helper.CnnStringSqlclr, Helper.ProviderClr, additionalParameters, sortType.Value);
        }