Пример #1
0
 public IFunction3 <T> GetEquationForD2y()
 {
     return(new NativeFunction3 <T>(
                Calculator,
                // args = (x, y, y`)
                (args) => (
                    Calculator.Add(
                        Calculator.Add(
                            Calculator.Multiply(Px.Evaluate(args.Item1), args.Item3), //P(x)*y`
                            Calculator.Multiply(Qx.Evaluate(args.Item1), args.Item2)  //Q(x)*y
                            ),
                        Rx.Evaluate(args.Item1)                                       //R(x)
                        )
                    )
                ));
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Qx != 0D)
            {
                hash ^= Qx.GetHashCode();
            }
            if (Qy != 0D)
            {
                hash ^= Qy.GetHashCode();
            }
            if (Qz != 0D)
            {
                hash ^= Qz.GetHashCode();
            }
            if (Qw != 0D)
            {
                hash ^= Qw.GetHashCode();
            }
            return(hash);
        }
Пример #3
0
 /// <summary>
 /// 取权限集合
 /// </summary>
 public void getQxs()
 {
     try
     {
         string        str_con = ConnStr.Instance().Constr;//@"Data Source=169.85.170.18;Initial Catalog=LZK;User ID=lzk;pwd=lzk2009~";
         SqlConnection sqlc    = new SqlConnection(str_con);
         string        str_cm  = "select global_qx.xtid,global_qx.qx from global_user,global_qx where global_user.userid=global_qx.userid   and global_use.name='" + name + "' and global_use.pwd='" + pwd + "'";
         SqlCommand    sqlcomd = new SqlCommand(str_cm, sqlc);
         sqlc.Open();
         SqlDataReader dr = sqlcomd.ExecuteReader();
         while (dr.Read())
         {
             Qx q1 = new Qx();
             q1.xt = dr.GetInt16(0);
             q1.qx = dr.GetInt16(1);
             qxs.Add(q1);
         }
         dr.Close();
         sqlc.Close();
     }
     catch
     {     }
 }