当前位置: 首页 > news >正文

做推广哪些网站好外贸平台app

做推广哪些网站好,外贸平台app,如何让网站自适应,乡镇政府网站建设1 泛洪填充算法(Flood Fill Algorithm) 泛洪填充算法(Flood Fill Algorithm) ,又称洪水填充算法,是在很多图形绘制软件中常用的填充算法,最熟悉不过就是 windows 自带画图软件的油漆桶功能。 2 源程序 using System; using System.Collecti…

1 泛洪填充算法(Flood Fill Algorithm)

泛洪填充算法(Flood Fill Algorithm) ,又称洪水填充算法,是在很多图形绘制软件中常用的填充算法,最熟悉不过就是 windows 自带画图软件的油漆桶功能。

2 源程序

using System;
using System.Collections;
using System.Collections.Generic;

namespace Legalsoft.Truffer.Algorithm
{
    /// <summary>
    /// 洪水填充算法
    /// </summary>
    public static partial class Algorithm_Gallery
    {
        private static void Fill_4Directions(int[,] screen, int x, int y, int prevC, int newC)
        {
            int M = screen.GetLength(0);
            int N = screen.GetLength(1);

            if (x < 0 || x >= M || y < 0 || y >= N)
            {
                return;
            }
            if (screen[x, y] != prevC)
            {
                return;
            }
            screen[x, y] = newC;
            Fill_4Directions(screen, x + 1, y, prevC, newC);
            Fill_4Directions(screen, x - 1, y, prevC, newC);
            Fill_4Directions(screen, x, y + 1, prevC, newC);
            Fill_4Directions(screen, x, y - 1, prevC, newC);
        }

        public static void Flood_Fill(int[,] screen, int x, int y, int newC)
        {
            int prevC = screen[x, y];
            if (prevC == newC)
            {
                return;
            }
            Fill_4Directions(screen, x, y, prevC, newC);
        }
    }
}

3 代码格式

using System;
using System.Collections;
using System.Collections.Generic;namespace Legalsoft.Truffer.Algorithm
{/// <summary>/// 洪水填充算法/// </summary>public static partial class Algorithm_Gallery{private static void Fill_4Directions(int[,] screen, int x, int y, int prevC, int newC){int M = screen.GetLength(0);int N = screen.GetLength(1);if (x < 0 || x >= M || y < 0 || y >= N){return;}if (screen[x, y] != prevC){return;}screen[x, y] = newC;Fill_4Directions(screen, x + 1, y, prevC, newC);Fill_4Directions(screen, x - 1, y, prevC, newC);Fill_4Directions(screen, x, y + 1, prevC, newC);Fill_4Directions(screen, x, y - 1, prevC, newC);}public static void Flood_Fill(int[,] screen, int x, int y, int newC){int prevC = screen[x, y];if (prevC == newC){return;}Fill_4Directions(screen, x, y, prevC, newC);}}
}

http://www.ho-use.cn/article/3385.html

相关文章:

  • 公司怎么做网页网站百度怎么发广告
  • java成熟长春网络优化最好的公司
  • 百度关键词怎么做排名郑州seo技术博客
  • 怎么看网站创建者是谁百度官方推广
  • 建设工程公司账务处理seo赚钱
  • 用数据库做网站百度推广一个点击多少钱
  • 网站飘窗怎么做各类资源关键词
  • 汇款账号 网站建设南昌seo服务
  • 淘宝联盟怎么样做网站小学生抄写新闻20字
  • 网站建设的前后台代码友链外链app
  • 公安局 网站备案查询系统怎么创建网站的快捷方式
  • 深圳景观设计公司排名旺道seo
  • win8导航网站模板福州百度代理
  • 余姚网站制作长沙网站建站模板
  • 手机做网站需要多少天网络营销网站建设案例
  • 如何做网站的伪静态页面私人浏览器
  • 国外做游戏的视频网站有哪些自己在家做电商
  • 最便宜的外贸网站建设小程序开发平台官网
  • 网站建设需求确认表新东方烹饪学校学费价目表
  • 烟台中企动力提供网站建设武汉seo系统
  • 北京 广告 手机网站宁波网站推广哪家公司好
  • 三级网站做爰百度排名点击
  • 新零售平台公司有哪些优化设计四年级上册语文答案
  • 中小学网站建设有什么好处代写文案平台
  • 做个兼职网站设计如何做好线上营销
  • 做视频链接的网站关注公众号一单一结兼职
  • 镇江网站设计制作谷歌商店下载
  • 网站建设推广语言广告信息发布平台
  • 网站建设的公司哪家好网站推广计划方法
  • 建设银行网站个人中心购买友情链接网站