Esempio n. 1
0
        public string ToString(params string[] format)
        {
            string fomega;
            string falpha;
            string frate;

            if (format.Length == 0)
            {
                fomega = "G";
                falpha = "G";
                frate  = "G";
            }
            else if (format.Length == 1)
            {
                fomega = format[0];
                falpha = format[0];
                frate  = format[0];
            }
            else if (format.Length == 3)
            {
                fomega = format[0];
                falpha = format[1];
                frate  = format[2];
            }
            else
            {
                throw new FormatException();
            }

            string[] s = new string[3];
            s[0] = omega.ToString(fomega);
            s[1] = Blas.ArrayToString(alpha, falpha, ",");
            s[2] = Blas.ArrayToString(rate, frate, ",");
            return(string.Join(" | ", s));
        }
Esempio n. 2
0
 public HErlangEMSRM(HErlangParam param) : base("(" + Blas.ArrayToString(param.Shape, "G", ",") + ")-HyperErlang SRGM", param.M, param.GetOmega, new HErlangDist(param.M, param.GetAlpha, param.GetShape, param.GetRate))
 {
     this.param = param;
     tmp1       = new double[param.M];
     tmp2       = new double[param.M];
     a0         = new double[param.M];
     a1         = new double[param.M];
     gam10      = new double[param.M];
     gam11      = new double[param.M];
     gam20      = new double[param.M];
     gam21      = new double[param.M];
     en2        = new double[param.M];
     en3        = new double[param.M];
 }
Esempio n. 3
0
 public string ToString(params string[] format)
 {
     if (format.Length == 0)
     {
         return(Blas.ArrayToString(param, "G", ","));
     }
     else if (format.Length == 1)
     {
         return(Blas.ArrayToString(param, format[0], ","));
     }
     else if (format.Length == param.Length)
     {
         return(Blas.ArrayToString(param, format, ","));
     }
     else
     {
         throw new FormatException();
     }
 }