⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maxflow.h

📁 这是一个用于立体匹配的程序。 可以用来进行立体匹配!
💻 H
字号:
#ifndef __MAXFLOW_H__
#define __MAXFLOW_H__


typedef long flowtype;

struct Edge
{
	long		from;
	long		to;
	long		cap;
};

#define BLOCK_SIZE 512

struct EdgeList
{
	struct Edge edge[BLOCK_SIZE];
	struct EdgeList *next;
	int    num;
};

struct Graph
{
	long		node_min, node_max;
	long		m;
	long		source;
	long		sink;
	struct EdgeList	*first;
	struct EdgeList *current;
};

struct Graph * init_graph(long source, long sink);
void add_edge(struct Graph *graph, long from, long to, long cap);
flowtype maxflow(struct Graph *graph, int *cut);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -