码迷,mamicode.com
首页 >  
搜索关键字:graph    ( 3642个结果
图的深度优先搜索 递归和非递归实现 c++版本
本文参考了李春葆版本的数据结构上机指导,但是原版是c代码, 本文用了c++实现,并且修复了深度优先搜索非递归的一个bug。 graph.cpp文件: #include"graph.h" #include #include int visited[MAXV]; MGraph::MGraph(int A[100][10],int nn,int ee) { e=ee; n=nn;...
分类:编程语言   时间:2014-06-22 19:37:23    阅读次数:655
Geeks - Check whether a given graph is Bipartite or not 二分图检查
检查一个图是否是二分图的算法 使用的是宽度搜索: 1 初始化一个颜色记录数组 2 利用queue宽度遍历图 3 从任意源点出发,染色0, 或1 4 遍历这点的邻接点,如果没有染色就染色与这个源点相反的颜色,如果已经染色并且和源点的值相反,那么就是合法点,如果是相同的颜色,那么就不能是二分图   参考:http://www.geeksforgeeks.org/bipartite-gra...
分类:其他好文   时间:2014-06-22 18:35:43    阅读次数:223
UVA Oil Deposits
题目如下: Oil Deposits  The GeoSurvComp geologic survey company is responsible for detectingunderground oil deposits. GeoSurvComp works with one large rectangularregion of land a...
分类:其他好文   时间:2014-06-22 14:36:31    阅读次数:232
基于Hama平台的并行Finding a Maximal Independent Set 算法的设计与实现
本文目的:讲解并行Finding a Maximal Independent Set(寻找最大独立集问题)算法,以及在Hama平台上如何实现该算法。该算法可方便移植到所有的Pregel-Like系统中,如Giraph、GPS (Graph Processing System)。 前言:关于Maximal Independent Set(MIS)的基础知识参考我的博客《找最大独立集问题-Finding a Maximal Independent Set》。 1. 本算法参考 Luby's classic pa...
分类:其他好文   时间:2014-06-22 14:26:16    阅读次数:265
Jsp+servlet 验证码案例
昨晚在csdn看到一位前辈写一个ajax+servlet+jsp验证,顿时心血来潮,在前辈的代码下我做出了如下简单好用的小  验证码生成器Demo,供大家做个参考。 1:添加VeriyCodeUtils类生成验证码图像 package com.servlet; import java.awt.Color; import java.awt.Font; import java.awt.Graph...
分类:Web程序   时间:2014-06-22 08:22:22    阅读次数:258
hdu4034 Graph(floyd)
题目: 给出一个图的最短路,求原图最少几条边GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1695Accepted Submission...
分类:其他好文   时间:2014-06-18 22:37:10    阅读次数:243
ffmpeg avfilter_graph_parse_ptr 返回 -2
sprintf(vFilter->szOverLay,"movie=%s[wm];[in][wm]overlay=%d:%d[out]",szOverlay,x,y);当szOverlay = “d:\\xxx\xxx.png”; 时返回-2,貌似ffmpeg处理不了路径中的冒号。。。用当前路径下的...
分类:其他好文   时间:2014-06-18 19:04:31    阅读次数:1066
{"ret":100029,"msg":"client request's api name is not existed"}
AFNetworking对Path的定义问题: 如果把这一串:https://graph.qq.com/user/get_user_init 定义成baseURL 那么后面加的任何Path,都会在Path前面加上一个/ 这个跟NSURL有关系,AF的baseURL是用NSURL实现的,NSURL会把你给的字符串拆分成scheme,host,path,query这些东西 然后AF再处...
分类:Windows程序   时间:2014-06-10 08:12:29    阅读次数:678
GPS-Graph Processing System Graph Coloring算法分析 (三)
Graph coloring is the problem of assigning a color to each vertex of an undirected graph such that no two adjacent vertices have the same color. We implement the greedy algorithm from Scalable parallel graph coloring algorithms. The algorithm iteratively f...
分类:其他好文   时间:2014-06-10 07:10:19    阅读次数:260
pgm15
这部分我们讨论结构学习,也就是 graph 的边我们并不清楚。很自然我们可以用 fully observed 数据来做,但是也可能碰到有 missing data 的情况。一般来说前者是比较常见的。就方法而言,我们有 constraint-based structure learning 与 sco...
分类:其他好文   时间:2014-06-08 22:57:33    阅读次数:233
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!