Exemplo n.º 1
0
 public CenterDataContract(ICenter center)
 {
     Id              = center.Id;
     Name            = center.Name;
     StreetAddress   = center.StreetAddress;
     CenterTypeValue = center.CenterTypeValue;
 }
Exemplo n.º 2
0
 public ServiceCenterController()
 {
     _centerRepo       = new Center();
     _dropdown         = new DropdownBindController();
     _empRepo          = new Employee();
     _log              = new CallLog();
     _emailSmsServices = new EmailsmsServices();
     _templateRepo     = new Template();
 }
 public ClientDataController()
 {
     _RepoUploadFile   = new UploadFiles();
     _dropdown         = new DropdownBindController();
     _RepoCallLog      = new CallLog();
     _centerRepo       = new Center();
     _contactPerson    = new ContactPerson();
     _emailSmsServices = new EmailsmsServices();
     _templateRepo     = new Template();
 }
 public ManageServiceCentersController()
 {
     _Center           = new Center();
     dropdown          = new DropdownBindController();
     _bank             = new Bank();
     _contactPerson    = new ContactPerson();
     _Provider         = new Provider();
     _templateRepo     = new doorserve.Repository.EmailSmsTemplate.Template();
     _emailSmsServices = new Repository.EmailsmsServices();
     _services         = new Services();
     _RepoUploadFile   = new UploadFiles();
 }
Exemplo n.º 5
0
        public static void fit_mat(out double[,] A, ICenter[] Centers, IBasisFunction rbf, IRBFPolynomial Poly, double Relaxation)
        {
            // find out
            int dim = Centers.Length;
            int fits = dim;

            fits += Poly.Terms;// for polynomial terms

            A = new double[fits, fits];
            // create A matrix
            double r;
            double a = 0;//for scaling relaxation parameter
            int i, j;
            for (i = 0; i < dim; ++i)
            {
                for (j = i + 1; j < dim; ++j)
                {
                    // PHI11 - PHINN
                    r = Centers[j].radius(Centers[i].ToArray());
                    A[i, j] = A[j, i] = rbf.val(r); // symmetric
                    a += 2 * r;
                }
            }
            a /= dim * dim; // calculate relaxation normalizer
            //a /= fits * fits; // fits = dims + Poly.Terms(3)
            //a /= Math.Pow(fits, 2);
            // calculate fit mat diagonals and poly terms
            double relax = Relaxation;
            for (i = 0; i < dim; ++i)
            {
                //A[i, i] = BLAS.is_equal(relax, 0) ? 1 : a * a * relax;
                A[i, i] = a * a * relax;

                for (j = 0; j < Poly.Terms; j++)
                    A[i, dim + j] = A[dim + j, i] = Poly.FitMat(i, j);

                #region old
                //A[i, dim + 0] = A[dim + 0, i] = Centers[i][0];
                //A[i, dim + 1] = A[dim + 1, i] = Centers[i][1];

                //// poly values: Ax + By + C POLY
                //A[i, dim + 2] = A[dim + 2, i] = 1;

                // poly values: Ax + By + Cxy POLY
                //A[i, dim + 2] = A[dim + 2, i] = Centers[i][1] * Centers[i][0];

                // parabaloid values: A(x-h)^2 + B(y-k)^2 POLY
                //A[i, dim + 0] = A[dim + 0, i] = Math.Pow(Centers[i][0] - middle[0],2);
                //A[i, dim + 1] = A[dim + 1, i] = Math.Pow(Centers[i][1] - middle[1], 2);
                #endregion
            }
        }
Exemplo n.º 6
0
 public Appointment(ICenter center)
 {
     Center = center;
 }
 public SwarmCenterGuideProvider(ICenter centerStrategy)
 {
     CenterStrategy = centerStrategy;
 }
 public CenterBasedGuideProvider(int number, ICenter centerStrategy)
 {
     Number         = number;
     CenterStrategy = centerStrategy;
 }
Exemplo n.º 9
0
 public CallAppointmentController()
 {
     _centerRepo = new Center();
     _dropdown   = new DropdownBindController();
 }
Exemplo n.º 10
0
        //public static int solve(double[,] A, double[] fitz, CenterArrayNode CenterNode, IRBFPolynomial Poly)
        //{
        //     System.Diagnostics.Debug.Assert(fitz.Length == A.GetLength(0));
        //     System.Diagnostics.Debug.Assert(A.GetLength(0) == A.GetLength(1));
        //     int[] pivot = new int[A.GetLength(0)];
        //     int i;//,j,k;
        //     //double[] d = new double[A.Length];
        //     //for (j = 0; j < A.GetLength(0); j++)
        //     //     for (k = 0; k < A.GetLength(1); k++)
        //     //          d[k + j * A.GetLength(0)] = A[j, k];
        //     //DumpD(d, A.GetLength(1), A.GetLength(0), "c:\\before.csv");
        //     double[,] fit = new double[fitz.Length, 1];
        //     for (i = 0; i < fitz.GetLength(0); i++)
        //          fit[i, 0] = fitz[i];
        //     double[,] w2 = BLAS.SimultaneousSolver(A, fit);
        //     //var matrixA = new DenseMatrix(A);
        //     //var vectorB = new DenseVector(fitz);
        //     //Vector<double> resultX = matrixA.LU().Solve(vectorB);
        //     //MCroutPPS.Decomp(Tolerance, ref d, ref pivot, ref error, A.GetLength(1), A.GetLength(0));
        //     //DumpD(d, A.GetLength(1), A.GetLength(0), "c:\\after.csv");
        //     //if (error <= 0)
        //     //{
        //     //	return error;
        //     //}
        //     //double[] w = new double[A.GetLength(0)];// create weights vector
        //     double[] w = new double[A.GetLength(0)];
        //     for (i = 0; i < w2.GetLength(0); i++)
        //          w[i] = w2[i, 0];
        //     //MCroutPPS.Desolv(ref d, ref w, ref fitz, ref pivot, ref error, A.GetLength(0));
        //     //DumpW(w, "c:\\w.csv");
        //     i = 0;
        //     foreach (double weight in w)
        //     {
        //          if (i < CenterNode.Centers.Count)
        //               CenterNode[i].w = weight; // set the center's weight
        //          else
        //               Poly[i - CenterNode.Centers.Count] = weight;
        //          //polycofs[i - Centers.Count] = weight; //store the polynomial coefficients
        //          ++i;
        //     }
        //     return 0;
        //}
        public static int solve(double[,] A, double[] fitz, ICenter[] Centers, IRBFPolynomial Poly)
        {
            var matrixA = new DenseMatrix(A);
            var vectorB = new DenseVector(fitz);
            Vector<double> resultX = matrixA.LU().Solve(vectorB);
            List<double> w2 = new List<double>(resultX.ToArray());

            int i = 0;

            w2.ForEach((double weight) =>
            {
                if (i < Centers.Length)
                    Centers[i].w = weight; // set the center's weight
                else
                    Poly[i - Centers.Length] = weight;//store the polynomial coefficients

                ++i;
            });

               return 0;
        }
Exemplo n.º 11
0
        static void Main(string [] args)
        {
            string yen = Path.Combine(@"c:\windows", "hoge.txt");


            var del = new Derived();

            del.method1();
            return;



            MoveableOject mover = new MoveableOject();


            ILeft left = new MoveableOject();

            left.Move();

            ICenter center = (ICenter)left;

            center.Hover();

            IAnimal animal = new Dog();

            animal.Move();


            var numbers        = Enumerable.Range(0, 100);
            var parallelResult = numbers.AsParallel( ).AsOrdered()
                                 .Where(i => i % 2 == 0)
                                 .ToArray( );

            //foreach( int i in parallelResult)
            //{
            //    Console.WriteLine( i );
            //}

            var parallelResult2 = numbers.AsParallel( ).AsOrdered( )
                                  .Where(i => i % 2 == 0);

            parallelResult2.ForAll(e => Console.WriteLine(e));

            Console.WriteLine("------------------------------");

            //var result = numbers
            //    .Where( i => i % 2 == 0 )
            //    .ToArray( );

            //foreach ( int i in result )
            //{
            //    Console.WriteLine( i );
            //}

            int a = 1;

            if (a == 1)
            {
                // エラー	2	ローカルの変数 'a' をこのスコープで宣言することはできません。これは、'親またはカレント' スコープで別の意味を持つ 'a' の意味が変更されるのを避けるためです。

                //int a = 100;
                //Console.WriteLine( a.ToString( ) );

                //foreach( int a in new [] {1,2,3})
                //{
                //  ;
                //}
            }


            CreateAndRaise();
        }