码迷,mamicode.com
首页 >  
搜索关键字:graph cut    ( 8632个结果
python—networkx:根据图的权重画图
#coding:utf-8#!/usr/bin/env python """ An example using Graph as a weighted network. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)""" try: import matplotlib.pyplot as plt except: raise...
分类:编程语言   时间:2015-08-14 19:17:49    阅读次数:772
POJ2125 Destroying The Graph 最小点权覆盖
题目链接: poj2125 题意: 给出一张N个顶点M条边的有向图。 对于每个顶点x,有两种操作: 1,删除所有进入x的边,花费为a; 2.删除所有从x出去的边,花费为b. 问把图中所有边删除所需要的最小花费.并输出对应的操作。 解题思路: 由题目条件(删除入边,删除出边)首先想到应该是拆点. 这样题目的问题转化为最小点权覆盖问题....
分类:其他好文   时间:2015-08-14 19:17:38    阅读次数:190
git设置log的别名 for hist
hist -- alias for 'log --color --graph --date=short --pretty=format:'%Cred%h%Creset -%C(yellow)%d%C reset %s %Cgreen(%cr) %C(bold blue)%Creset' --ab.....
分类:其他好文   时间:2015-08-14 19:00:49    阅读次数:117
python—networkx:画随机几何图,找出中心节点并按路径长度染色
随机生成一个集合图,自带路径属性,图大小为1*1,找出距离中心[0.5, 0.5]最近的节点,并按照路径染色。 NetworkX Examples » Drawing » Random Geometric Graph #coding:utf-8import networkx as nx import matplotlib.pyplot as plt G=n...
分类:编程语言   时间:2015-08-14 17:05:12    阅读次数:552
Linux根据不同系统版本进行操作
#!/bin/bash version=`lsb_release -a|cut -n 4p|sed -d ":" -f2` if test $version=‘6.4‘ then { ????echo ‘6.4‘ ????。。。 } else { ????echo ‘其他版本‘ ????。。。 } fi...
分类:系统相关   时间:2015-08-14 08:53:05    阅读次数:129
Clone Graph
问题描述Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled ...
分类:其他好文   时间:2015-08-13 20:05:27    阅读次数:101
POJ 3017 Cut the Sequence
POJ 3017 Cut the Sequence /** POJ 3017 Cut the Sequence http://poj.org/problem?id=3017 解题思路:单调队列 解题分析: dp[i]=dp[j]+max(j+1,i) //限制条件sum(j+1,i)<m 这样所有的最优决策都在区间为(j+1,i)的单调队列中 dp[i]=min(dp[q[i-1]]+a[q[i...
分类:其他好文   时间:2015-08-13 14:32:37    阅读次数:150
ZOJ-2753
Min Cut (Destroy Trade Net)Time Limit:15 Seconds Memory Limit:32768 KBGiven an undirected graph, in which two vertexes can be connected by multiple ed...
分类:其他好文   时间:2015-08-13 00:58:05    阅读次数:124
poj 1679 The Unique MST【次小生成树】
The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:24034Accepted:8535DescriptionGiven a connected undirected graph, tell if its minim...
分类:其他好文   时间:2015-08-12 21:12:38    阅读次数:236
POJ_2942_Knights of the Round Table(点的双连通分量+二分图判定)
Knights of the Round Table Time Limit: 7000MS   Memory Limit: 65536K Total Submissions: 10908   Accepted: 3585 Description Being a knight is a very attractive career: searc...
分类:其他好文   时间:2015-08-12 01:27:55    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!