コード例 #1
0
        public static int MaxIndex <RealType>(IAlgebraReal <RealType> algebra, IList <RealType> array)
        {
            int      max_index = 0;
            RealType max_value = array[0];

            for (int index = 1; index < array.Count; index++)
            {
                if (algebra.CompareTo(array[index], max_value) == 1)
                {
                    max_index = index;
                    max_value = array[index];
                }
            }
            return(max_index);
        }