Ejemplo n.º 1
0
        public static CPointer <TVal> bsearch <TKey, TVal>(TKey key, CPointer <TVal> array, int n, Func <TKey, TVal, int> compare)
        {
            var list = new List <TVal>(array.ToArray().Take(n));
            var idx  = list.BinarySearch(default(TVal), new bcomparer <TKey, TVal>(key, compare));

            return(idx >= 0 ? array + idx : new CPointer <TVal>());
        }
Ejemplo n.º 2
0
        public static void qsort <T>(CPointer <T> array, int n, Comparison <T> compare)
        {
            var list = new List <T>(array.ToArray().Take(n));

            list.Sort(compare);
            for (int i = 0; i < list.Count; i++)
            {
                array[i] = list[i];
            }
        }
Ejemplo n.º 3
0
 public void swe_cotrans_sp(CPointer <double> xpo, CPointer <double> xpn, double eps)
 {
     SwephLib.swe_cotrans_sp(xpo, xpn, eps);
 }
Ejemplo n.º 4
0
 public int swe_houses_ex(double tjd_ut, Int32 iflag, double geolat, double geolon, char hsys, CPointer <double> hcusps, CPointer <double> ascmc)
 {
     return(SweHouse.swe_houses_ex(tjd_ut, iflag, geolat, geolon, hsys, hcusps, ascmc));
 }