using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Collections;

namespace GEP编程
{
    class Program
    {
        public static void Main(string[] args)
        {
            Stopwatch wp = new Stopwatch();
            wp.Start();
            //创建A-F所对应的0-5索引数字
            Hashtable wn = new Hashtable();
            wn.Add('A', 0);
            wn.Add('B', 1);
            wn.Add('C', 2);
            wn.Add('D', 3);
            wn.Add('E', 4);
            wn.Add('F', 5);
            //将1-6转化成A-F的字母
            Hashtable nw = new Hashtable();
            nw.Add(1, 'A');
            nw.Add(2, 'B');
            nw.Add(3, 'C');
            nw.Add(4, 'D');
            nw.Add(5, 'E');
            nw.Add(6, 'F');
            //将字符‘1’-‘6’转化成对应的1-6
            Hashtable hsCN = new Hashtable();
            hsCN.Add('1', 1);
            hsCN.Add('2', 2);
            hsCN.Add('3', 3);
            hsCN.Add('4', 4);
            hsCN.Add('5', 5);
            hsCN.Add('6', 6);
            //PrintHashTable(wn);
            #region 创建初始化数组表
            //创建参照矩阵表
            int[,] cankao = new int[6, 6];
            cankao[0, 0] = 5;
            cankao[0, 1] = 6;
            cankao[0, 2] = 9;
            cankao[0, 3] = 7;
            cankao[0, 4] = 4;
            cankao[0, 5] = 6;
            cankao[1, 0] = 8;
            cankao[1, 1] = 3;
            cankao[1, 2] = 5;
            cankao[1, 3] = 4;
            cankao[1, 4] = 6;
            cankao[1, 5] = 7;
            cankao[2, 0] = 6;
            cankao[2, 1] = 2;
            cankao[2, 2] = 4;
            cankao[2, 3] = 7;
            cankao[2, 4] = 8;
            cankao[2, 5] = 9;
            cankao[3, 0] = 9;
            cankao[3, 1] = 7;
            cankao[3, 2] = 6;
            cankao[3, 3] = 8;
            cankao[3, 4] = 4;
            cankao[3, 5] = 5;
            cankao[4, 0] = 7;
            cankao[4, 1] = 4;
            cankao[4, 2] = 3;
            cankao[4, 3] = 6;
            cankao[4, 4] = 8;
            cankao[4, 5] = 9;
            cankao[5, 0] = 5;
            cankao[5, 1] = 7;
            cankao[5, 2] = 8;
            cankao[5, 3] = 9;
            cankao[5, 4] = 6;
            cankao[5, 5] = 4;
            #endregion
            int[,] xuliehua = new int[6, 6];
            int n = 0;
            for (int p = 0; p < 6; p++)
            {
                for (int q = 0; q < 6; q++)
                {
                    xuliehua[p, q] = n;
                    n++;
                }
            }
            //PrintArray(xuliehua);

Dictionary<int, int> refer = new Dictionary<int, int>();

for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    int p = cankao[i, j];
                    int c = xuliehua[i, j];
                    refer.Add(c, p);
                }
            }
           // PrintDic(refer);

//在此处写出20代循环,但要将随机生成进行处理

int jishu=1;
            List<int> s1 = new List<int>(); //一个个体的前六位
            List<int> s2 = new List<int>();//一个个体的后六位
            List<int> s3 = new List<int>();
            StringBuilder sb = new StringBuilder();
            Dictionary<string, int> dicEntity = new Dictionary<string, int>();  //创建20个个体和对应的词典

//存储子代hs(int,List<int>)
            Hashtable hs1 = new Hashtable();    
            Hashtable hs2 = new Hashtable();

//循环生成第一代的20个不同的个体
            for (int h = 1; h <= 20; h++)
            {
                //sb.Clear();
                //s1.Clear();
                //s2.Clear();
                //s3.Clear();
            
                输出参考数组中[0,0]的参考值
                //Console.Write(refer[0]);
                //PrintArray(cankao);
                //生成两个随机字符串

Console.WriteLine("***************************************************************************");
                Console.WriteLine("         第" + jishu + "代个体群:\n");
                Console.WriteLine("***************************************************************************");

int count = 1;
                if (jishu == 1)
                {

#region 初代循环产生不同的20个个体
                    while (dicEntity.Count < 20)
                    {
                        sb.Clear();
                        s1.Clear();
                        s2.Clear();
                        s3.Clear();
                        //List<int> s4 = new List<int>();
                        randList(s1);
                        randList(s2);
                        //生成的随机一组字符串
                        //Console.WriteLine("生成的随机一组字符串:");
                        //Console.WriteLine("s1的数字串为:");

for (int i = 0; i < 6; i++)
                        {
                            //Console.Write(s1[i] + "  ");
                            sb.Append(s1[i].ToString());
                        }

//Console.WriteLine("\ns2的数字串为:");
                        for (int i = 0; i < 6; i++)
                        {
                            //Console.Write(s2[i] + "  ");
                            char c = (char)nw[s2[i]];
                            //Console.Write(c + "  ");//将1-6转化成A-F的字母
                            sb.Append(c.ToString());
                            s3.Add(Convert.ToInt32(wn[c]));//将字母转化成0-5的索引号并赋值给s3
                        }

//Console.Write(sb);
                        //Console.Write("\n这种情况的下的基因变异程度:  ");
                        int sum = 0;
                        for (int i = 0; i < 6; i++)
                        {
                            int s = s1[i] - 1;
                            int p = s3[i];
                            //sum+=cankao[s,p];
                            //Console.Write(s + "    ");
                            //Console.WriteLine(p);
                            sum += cankao[s, p];
                        }
                        //Console.WriteLine(sum);

if (!dicEntity.ContainsKey(sb.ToString()))
                        {
                            dicEntity.Add(sb.ToString(), sum);
                            Console.Write("第" + count.ToString() + "个个体是:    ");
                            Console.WriteLine(sb.ToString());
                            Console.Write("它的变异度为:    ");
                            Console.WriteLine(sum);
                            Console.WriteLine("");
                            count++;
                        }

}
                    #endregion
                }

else
                {
                    for (int shN = 0; shN < 20; shN++)
                    {

s1.Clear();
                        s2.Clear();
                        s3.Clear();
                        sb.Clear();
                        s1 = (List<int>)hs1[shN];
                        s2 = (List<int>)hs2[shN];

//string ss = "";
                        //string ss1 = "";
                        //string ss2 = "";
                        变异选择子代
                        //List<string> strNext = new List<string>();
                        //strNext = bianyi(strnext);

//for (int g = 0; g < 20; g++)
                        //{
                        //    ss = strNext[g];
                        //    ss2 = ss.Substring(6);
                        //    ss1 = ss.Substring(0, 6);

//    for (int f = 0; f < 6; f++)
                        //    {
                        //        //char cc = ss1[f];
                        //        //Console.Write(cc);
                        //        s1.Add((int)hsCN[ss1[f]]);
                        //        s2.Add((int)wn[ss2[f]] + 1);
                        //    }
                        //}
                        for (int i = 0; i < 6; i++)
                        {
                            //Console.Write(s1[i] + "  ");
                            sb.Append(s1[i].ToString());
                        }

//Console.WriteLine("\ns2的数字串为:");
                        for (int i = 0; i < 6; i++)
                        {
                            //Console.Write(s2[i] + "  ");
                            char c = (char)nw[s2[i]];
                            //Console.Write(c + "  ");//将1-6转化成A-F的字母
                            sb.Append(c.ToString());
                            s3.Add(Convert.ToInt32(wn[c]));//将字母转化成0-5的索引号并赋值给s3
                        }

//Console.Write(sb);
                        //Console.Write("\n这种情况的下的基因变异程度:  ");
                        int sum = 0;
                        for (int i = 0; i < 6; i++)
                        {
                            int s = s1[i] - 1;
                            int p = s3[i];
                            //sum+=cankao[s,p];
                            //Console.Write(s + "    ");
                            //Console.WriteLine(p);
                            sum += cankao[s, p];
                        }

dicEntity.Add(sb.ToString(), sum);
                        Console.Write("第" + count.ToString() + "个个体是:    ");
                        Console.WriteLine(sb.ToString());
                        Console.Write("它的变异度为:    ");
                        Console.WriteLine(sum);
                        Console.WriteLine("");
                        count++;
                    }
                }

//选出变异度最小的那个个体
                Console.WriteLine("***************************************************************************");
                Dictionary<string, int> dicmin = new Dictionary<string, int>();
                dicmin = DicMin(dicEntity);
                string good="";
                int min = 0;
                foreach (KeyValuePair<string, int> kv in dicmin)
                {
                    string key = kv.Key;
                    int value = kv.Value;
                    min = value;
                    good=key;
                    Console.WriteLine("变异度最小的那个个体是:" + key + "     它的适应度为:" + value.ToString());
                }
                Console.WriteLine("***************************************************************************");
                //打印输出20个个体以及各自所对应的适应率
                Dictionary<string, double> dicStrDoubP = new Dictionary<string, double>();
                dicStrDoubP = dicStrDoubleP(dicEntity,min);
                int l = 1;
                Console.WriteLine("***************************************************************************");
                Console.WriteLine("\n         20个个体各自所对应的适应率\n");
                Console.WriteLine("***************************************************************************");
                foreach (KeyValuePair<string,double> kc in dicStrDoubP)
                {
                    string key = kc.Key;
                    double value = kc.Value;
                    Console.WriteLine("\n第"+l+"个体是:" + key + "     它的适应率为:" + value.ToString());
                    l++;
                }
                //打印输出20个个体及其适应度
                Dictionary<string, double> dictable = new Dictionary<string, double>();
                dictable = dicTable(dicStrDoubP);
                List<string> lists = new List<string>();
                List<double> listd = new List<double>();
                int r = 1;
                Console.WriteLine("***************************************************************************");
                Console.WriteLine("\n         20个个体各自所对应的适应度\n");
                Console.WriteLine("***************************************************************************");
                foreach (KeyValuePair<string, double> kc in dictable)
                {
                    string key = kc.Key;
                    double value = kc.Value;
                    lists.Add(key);
                    listd.Add(value);
                    Console.WriteLine("\n第" + r + "个体是:" + key + "     它的适应度为:" + value.ToString());
                    r++;
                }

//随机生成20个4位小数
                Console.WriteLine("***************************************************************************");
                Console.WriteLine("           随机生成19个4位小数");
                Console.WriteLine("***************************************************************************");
                List<double> randdouble = new List<double>();
                string str="";
                randdouble = randDouble();
                foreach (double b in randdouble)
                {
                    Console.Write(b + "  ");
                }
                Console.WriteLine("\n");
                
            
                //判断每个4位小数是否所在的区域并且生成下一代
                List<string> strnext = new List<string>();
                strnext.Add(good);  //选择上一代最好的那个直接遗传到下一代
                for (int N = 0; N < 19; N++)   //比较19次  最优的那个个体直接遗传到下一代
                {
                    for (int M = 0; M < 20; M++)
                    {
                        if (randdouble[N] <= listd[M])
                        {
                            str = lists[M];
                            strnext.Add(str);
                            break;
                        }
                    }

}
                //经过选择变异过的下一代
                List<string> strNext = new List<string>();
                strNext = bianyi(strnext);

Console.WriteLine("***************************************************************************");
                Console.WriteLine("           第2代个体群");
                Console.WriteLine("***************************************************************************");
                foreach (string s in strNext)
                {
                    Console.WriteLine(s);
                }

//再将新个体群分成List<int>s1和List<int>s2
                
                
                //将二代复制给初代的变量,以便循环
                for (int g = 0; g < 20; g++)
                {
                    s1.Clear();
                    s2.Clear();
                    s3.Clear();
                    sb.Clear();
                    string ss = "";
                    string ss1 = "";
                    string ss2 = "";
                    ss = strNext[g];
                    ss2 = ss.Substring(6);
                    ss1 = ss.Substring(0, 6);

for (int f = 0; f < 6; f++)
                    {
                        //char cc = ss1[f];
                        //Console.Write(cc);
                        s1.Add((int)hsCN[ss1[f]]);
                        s2.Add((int)wn[ss2[f]] + 1);
                    }
                    hs1.Add(g, s1);
                    hs2.Add(g, s2);
                }
                    //s4.AddRange(s1);
                    //s5.AddRange(s2);
                    //for (int i = 0; i < 6; i++)
                    //{
                    //    //Console.Write(s1[i] + "  ");
                    //    sb.Append(s1[i].ToString());
                    //}

Console.WriteLine("\ns2的数字串为:");
                    //for (int i = 0; i < 6; i++)
                    //{
                    //    //Console.Write(s2[i] + "  ");
                    //    char c = (char)nw[s2[i]];
                    //    //Console.Write(c + "  ");//将1-6转化成A-F的字母
                    //    sb.Append(c.ToString());
                    //    s3.Add(Convert.ToInt32(wn[c]));//将字母转化成0-5的索引号并赋值给s3
                    //}

Console.Write(sb);
                    Console.Write("\n这种情况的下的基因变异程度:  ");
                    //int sum = 0;
                    //for (int i = 0; i < 6; i++)
                    //{
                    //    int s = s1[i] - 1;
                    //    int p = s3[i];
                    //    //sum+=cankao[s,p];
                    //    //Console.Write(s + "    ");
                    //    //Console.WriteLine(p);
                    //    sum += cankao[s, p];
                    //}

//dicEntity.Add(sb.ToString(), sum);
                    //Console.Write("第" + count.ToString() + "个个体是:    ");
                    //Console.WriteLine(sb.ToString());
                    //Console.Write("它的变异度为:    ");
                    //Console.WriteLine(sum);
                    //Console.WriteLine("");
                    //count++;

//        //for (int i = 0; i < 6; i++)
                //        //{
                //        //    //Console.Write(s1[i] + "  ");
                //        //    sb.Append(s1[i].ToString());
                //        //}

//        Console.WriteLine("\ns2的数字串为:");
                //        //for (int i = 0; i < 6; i++)
                //        //{
                //        //    //Console.Write(s2[i] + "  ");
                //        //    char c = (char)nw[s2[i]];
                //        //    //Console.Write(c + "  ");//将1-6转化成A-F的字母
                //        //    sb.Append(c.ToString());
                //        //    s3.Add(Convert.ToInt32(wn[c]));//将字母转化成0-5的索引号并赋值给s3
                //        //}

//        Console.Write(sb);
                //        Console.Write("\n这种情况的下的基因变异程度:  ");
                //        //int sum = 0;
                //        //for (int i = 0; i < 6; i++)
                //        //{
                //        //    int s = s1[i] - 1;
                //        //    int p = s3[i];
                //        //    //sum+=cankao[s,p];
                //        //    //Console.Write(s + "    ");
                //        //    //Console.WriteLine(p);
                //        //    sum += cankao[s, p];
                //        //}

//        //dicEntity.Add(sb.ToString(), sum);
                //        //Console.Write("第" + count.ToString() + "个个体是:    ");
                //        //Console.WriteLine(sb.ToString());
                //        //Console.Write("它的变异度为:    ");
                //        //Console.WriteLine(sum);
                //        //Console.WriteLine("");
                //        //count++;

//int count = 1;
                //foreach (KeyValuePair<string, int> keyvaluepair in dicEntity)
                //{
                //    Console.Write("第" + count.ToString() + "个个体是:    ");
                //    Console.WriteLine(keyvaluepair.Key.ToString());
                //    Console.Write("它的变异度为:  ");
                //    Console.WriteLine(keyvaluepair.Value.ToString());
                //    count++;
                //}    
                jishu++;
            }

wp.Stop();
            Console.WriteLine("***************************************************************************");
            Console.WriteLine("\n程序用时:  " + wp.Elapsed);
            Console.WriteLine("***************************************************************************");
            Console.Read();
        }

#region 随机生成一段六位字符数字串
        /// <summary>
        /// 随机生成一段六位字符数字串
        /// </summary>
        /// <param name="list1">参数List</param>
        /// <returns>返回List</returns>
        public static List<int> randList(List<int> list1)
        {
            do
            {
                Random a = new Random();
                int result = a.Next(1, 7);
                if (!list1.Contains(result))
                {
                    list1.Add(result);
                }
            } while (list1.Count < 6);
            return list1;
        }
        #endregion

#region 打印输出参考数组(二维)
        /// <summary>
        /// 打印输出参考数组
        /// </summary>
        /// <param name="array">数组参数</param>
        public static void PrintArray(int[,] array)
        {
            Console.WriteLine("参照数组为:");
            for (int i = 0; i < 6; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    int p = array[i, j];
                    Console.Write(p + "  ");
                }
                Console.WriteLine("");
            }
        }
        #endregion

#region 打印输出HashTable
        /// <summary>
        /// 打印输出HashTable
        /// </summary>
        /// <param name="ht">参数HashTable</param>
        public static void PrintHashTable(Hashtable ht)
        {
            Console.WriteLine("对应的HashTable为:");
            foreach (DictionaryEntry de in ht) //fileht为一个Hashtable实例
            {
                Console.Write(de.Key + "   ");//de.Key对应于keyvalue键值对key
                Console.WriteLine(de.Value);//de.Key对应于keyvalue键值对value
            }
        }
        #endregion

#region 打印输出Dic<int,int>
        public static void PrintDic(Dictionary<int, int> dic)
        {
            Console.WriteLine("输出的dic: ");
            foreach (KeyValuePair<int, int> kv in dic)
            {
                int p = (int)kv.Key;
                int q = (int)kv.Value;
                Console.WriteLine(p + "  " + q);
            }
        } 
        #endregion

#region 求出二十个个体中,变异度最小的那个个体,返回dic<string,int>
        public static Dictionary<string, int> DicMin(Dictionary<string, int> olddic)
        {
            int min = 0;
            string s = "";
            Dictionary<string, int> dicMin = new Dictionary<string, int>();
            List<int> listInt = new List<int>();
            List<string> listStr = new List<string>();
            foreach (KeyValuePair<string, int> kv in olddic)
            {
                string key = (string)kv.Key;
                int value = (int)kv.Value;
                listInt.Add(value);
                listStr.Add(key);
            }
            min = listInt.Min();
            foreach (KeyValuePair<string, int> kv in olddic)
            {
                string key = (string)kv.Key;
                int value = (int)kv.Value;
                if (value == min)
                {
                    s = key;
                }
            }
            dicMin.Add(s, min);
            return dicMin;
        } 
        #endregion

#region 将dic<string,int>转化成概率dic<string,double>
        /// <summary>
        /// 将dic<string,int>转化成概率dic<string,double>
        /// </summary>
        /// <param name="olddic">原来的个体和对应的值的dic</param>
        /// <param name="min">变异度的最小值</param>
        /// <returns></returns>
        public static Dictionary<string, double> dicStrDoubleP(Dictionary<string, int> olddic,int min)
        {
            Dictionary<string, double> newdic = new Dictionary<string, double>();
            Dictionary<string, int> dic = new Dictionary<string, int>();
            List<int> listInt = new List<int>();//存数变异度的差值
            List<string> listStr = new List<string>();
            int sub = 0;
            foreach (KeyValuePair<string, int> kv in olddic)
            {
                string key = (string)kv.Key;
                int value = (int)kv.Value;
                sub=value - min + 1;
                listInt.Add(sub);
                dic.Add(key, sub);
            }
            foreach (KeyValuePair<string,int> kc in dic)
            {
                string key = (string)kc.Key;
                int value = (int)kc.Value;
                double v = (double)value;
                int sum=listInt.Sum();
                double p = Math.Round((v / sum),4);
                newdic.Add(key, p);
            }
            return newdic;
        } 
        #endregion

#region 随机生成19个4位小数
        public static List<double> randDouble()
        {
            List<double> randomlist = new List<double>();
            double x = 0;
            Random r = new Random();
            for (int i = 0; i < 19; i++)
            {
                x = Math.Round((double)r.NextDouble(), 4);
                randomlist.Add(x);
            }
            return randomlist;
        } 
        #endregion

#region 将概率变异率转化成对应的表dic<string,double>
        public static Dictionary<string, double> dicTable(Dictionary<string, double> dicP)
        {
            Dictionary<string, double> dictable = new Dictionary<string, double>();
            List<double> listD = new List<double>();
            List<string> listS = new List<string>();
            foreach (KeyValuePair<string, double> kv in dicP)
            {
                string key = (string)kv.Key;
                double value = (double)kv.Value;
                listD.Add(value);
                listS.Add(key);
            }
            for (int i = 0; i < 20; i++)
            {
                double p = 0;
                for (int j = 0; j <= i; j++)
                {
                    p =p+ listD[j];
                }
                
                dictable.Add(listS[i],p);
            }
            return dictable;
        } 
        #endregion

#region 将一个字符串逆串操作
        public static string changeover(string s, int i, int j)
        {
            string str = "";
            string ss = "";
            StringBuilder SB = new StringBuilder();
            int count = 0;
            if (i <= j)
            {
                count = j - i;
                str = s.Substring(i, count);
                for (int k = str.Length - 1; k >= 0; k--)
                {
                    SB.Append(str[k]);
                }
                ss = s.Substring(0, i) + SB + s.Substring(j);
            }
            else
            {
                count = i - j;
                str = s.Substring(j, count);
                for (int k = str.Length - 1; k >= 0; k--)
                {
                    SB.Append(str[k]);
                }
                ss = s.Substring(0, j) + SB + s.Substring(i);
            }
            return ss;
        } 
        #endregion

#region list<string>是否发生基因突变
        public static List<string> bianyi(List<string> list)
        {
            List<string> listBianYi = new List<string>();
            Random r = new Random();

string str = "";
            int e = 0;
            foreach (string s in list)
            {
                e = r.Next(0, 3);                //三分之一的可能性变异
                if (e == 0)
                {
                    int j = r.Next(0, 2);     //选择左边变异还是右边变异
                    if (j == 0)     //左边变异
                    {
                        int ll = r.Next(0, 6);
                        int rr = r.Next(0, 6);
                        str = changeover(s, ll, rr);
                        listBianYi.Add(str);
                    }
                    else          //右边变异
                    {
                        int ll = r.Next(6, 12);
                        int rr = r.Next(6, 12);
                        str = changeover(s, ll, rr);
                        listBianYi.Add(str);
                    }
                }

else                //三分之二的可能性不变异
                {
                    listBianYi.Add(s);
                }
            }
            return listBianYi;
        } 
        #endregion

}
}

源码:http://download.csdn.net/detail/s10141303/6028561

本文转自蓬莱仙羽51CTO博客,原文链接:http://blog.51cto.com/dingxiaowei/1366633,如需转载请自行联系原作者

C# GEP基因化编程相关推荐

  1. GEP基因表达式编程

    GEP基因表达式编程 基因表达式编程GEP(Gene Expression Programming)其实是遗传算法的一种改进,如果对遗传算法有了解的话,对于GEP的理解也就自然而然了. 遗传算法的染色 ...

  2. 基因表达式编程gep_基因表达式编程GEP— 前言

    第一次接触GEP(Gene Expression Programming,基因表达式编程)算法是五年前公司做过的一个供热优化控制项目,一接触就被它简洁精妙的设计思想所吸引.GEP由传统遗传算法进化而来 ...

  3. 基因表达式编程(GEP)自学 第【3】天 Python 实现

    基本基因表达式算法 1. 个体种群[★★★] 1.1. 初始种群的产生 2. 适应度函数与选择[★★★★] 2.1. 适应度函数和选择环境 2.2. 选择 3. 有修饰的复制[★★★★★] 3.1. ...

  4. linux无锁化编程--__sync_fetch_and_add系列原子操作函数

    linux支持的哪些操作是具有原子特性的?知道这些东西是理解和设计无锁化编程算法的基础. 下面的东西整理自网络.先感谢大家的分享! __sync_fetch_and_add系列的命令,发现这个系列命令 ...

  5. java组件化的优势_组件化编程开发如何判断组件的优劣性

    随着互联网的不断发展,越来越多的程序员都在学习不同的编程开发方式,而组件化编程开发就是其中的一个常用开发方法.今天我们就一起来了解一下,组件化开发中关于组件的优劣性应该如何判断. 认识组件 随着近些年 ...

  6. Stanford UFLDL教程 矢量化编程

    矢量化编程 当使用学习算法时,一段更快的代码通常意味着项目进展更快.例如,如果你的学习算法需要花费20分钟运行完成,这意味着你每个小时能"尝试"3个新主意.但是假如你的程序需要20 ...

  7. c++以代理的方式来实现接口化编程

    假如你项目代码本身已经实现了很多的实体类,但并未采用接口,可以考虑以这种方式来实现接口化编程 struct ITest {virtual void Test()=0; };class CTest { ...

  8. matlab 矢量化编程(二)—— 使用 meshgrid

    matlab 矩阵矢量化编程 使用 meshgrid 使用 meshgrid 避免二重循环. patchSize = 17;pixel_weights = zeros(patchSize); mid ...

  9. leo-editor 关于 flutter 企业级路由 fluro 官方例子文学化编程分析

    fluro 是 flutter 企业级路由插件,在学习官方例子时有一些难度. fluro官方例子 下面是官方例子运行图 下面使用 leo-editor 对此例子进行文学化编程分析,按照从顶至底的顺序, ...

最新文章

  1. 二叉树中和为某一值的路径
  2. linux7 yum安装rabbitmq,CentOS7linux下yum安装RabbitMQ以及使用顶
  3. const 和指针赋值
  4. node.js 获取异步方法里面数据 的方式
  5. 破五唯后,高校从“唯论文”变成了“唯纵向”?​
  6. html+input+hidden,input type=hidden
  7. matplotlib柱状图上方显示数据_使用 matplotlib 的两种姿势
  8. 查看JVM运行时参数
  9. android 微信支付:统一下单接口获取
  10. ffmpeg 录屏推流_在 Linux 使用 ffmpeg 推流
  11. 计算机显卡型号中数字含义详解,显卡型号中字母和数字所代表的含义
  12. matlab非线性误差的计算(附代码)
  13. 小林相册批量下载器--相册图片万能批量下载器
  14. P2P网络与BitTorrent技术简介
  15. 开源WordPress博客主题二次元风-LoliMeow主题
  16. 微信小程序怎么样与mysql一起开发_莲米粒是一个基于PHP+MySQL+微信小程序技术栈...
  17. 对抗机器学习——FGSM经典论文 EXPLAINING AND HARNESSING ADVERSARIAL EXAMPLES
  18. 深度学习笔记(三)—— 反向传播[Back Propagation] 计算图[Computational Graph]
  19. 简便的电脑通过kindle 3g上网
  20. 商务风团队建设与入职培训PPT模板

热门文章

  1. java接口是干啥_浅谈Java接口
  2. 知识付费系统其真正有价值的是什么?多年经验总结送给你!
  3. 支付中心“收银台“设计方案
  4. Interlaken协议介绍
  5. 科普:什么是暴力破解
  6. 分奇偶页后Word导出PDF目录页后多了空白页
  7. 采用SMO优化算法训练SVM(实战篇)
  8. Two Dimensional Convex Hull
  9. Linux上批量清空日志文件(非删除)
  10. Qml控件:ComboBox