当前位置: 首页>>代码示例>>C++>>正文


C++ Graph::EdgeStart方法代码示例

本文整理汇总了C++中Graph::EdgeStart方法的典型用法代码示例。如果您正苦于以下问题:C++ Graph::EdgeStart方法的具体用法?C++ Graph::EdgeStart怎么用?C++ Graph::EdgeStart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Graph的用法示例。


在下文中一共展示了Graph::EdgeStart方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

vector<VertexId> get_list_of_vertices_in_path(Graph &g, vector<EdgeId> path){
	vector<VertexId> list;
	if(path.size() == 0)
		return list;

	for(size_t i = 0; i < path.size(); i++)
		list.push_back(g.EdgeStart(path[i]));

	list.push_back(g.EdgeEnd(path[path.size() - 1]));

	return list;
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:12,代码来源:path_routines.hpp

示例2: MergeSequences

Sequence MergeSequences(const Graph& g,
		const vector<typename Graph::EdgeId>& continuous_path) {
	vector < Sequence > path_sequences;
	path_sequences.push_back(g.EdgeNucls(continuous_path[0]));
	for (size_t i = 1; i < continuous_path.size(); ++i) {
		VERIFY(
				g.EdgeEnd(continuous_path[i - 1])
						== g.EdgeStart(continuous_path[i]));
		path_sequences.push_back(g.EdgeNucls(continuous_path[i]));
	}
	return MergeOverlappingSequences(path_sequences, g.k());
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:12,代码来源:utils.hpp

示例3: PathAdjacentRelatedEdges

bool PathAdjacentRelatedEdges(Graph &g, vector<EdgeId> path, bool check_start = false,
		bool check_end = false){
	for(auto e = path.begin(); e != path.end() - 1; e++)
		if(VertexAdjacentRelatedEdges(g, g.EdgeEnd(*e)))
			return true;
	if(path.size() != 0)
		if(check_start)
			if(VertexAdjacentRelatedEdges(g, g.EdgeStart(path[0])))
				return true;
		if(check_end)
			if(VertexAdjacentRelatedEdges(g, g.EdgeEnd(path[path.size() - 1])))
				return true;
	return false;
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:14,代码来源:path_routines.hpp

示例4: PathContainsLoop

bool PathContainsLoop(Graph &g, vector<EdgeId> p){
	if(p.size() == 0)
		return false;

	set<VertexId> pathv;
	pathv.insert(g.EdgeStart(p[0]));

	for(auto e = p.begin(); e != p.end(); e++){
		VertexId end = g.EdgeEnd(*e);
		if(pathv.find(end) == pathv.end())
			pathv.insert(end);
		else
			return true;
	}

	return false;
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:17,代码来源:path_routines.hpp

示例5: VisualizeNontrivialComponentAutoInc

void VisualizeNontrivialComponentAutoInc(
        const Graph& g, const set<typename Graph::EdgeId>& edges,
        const string& folder, const GraphLabeler<Graph>& labeler,
        shared_ptr<visualization::GraphColorer<Graph>> colorer) {
    static size_t cnt = 0;

    auto edge_colorer = make_shared<visualization::CompositeEdgeColorer<Graph>>("black");
    edge_colorer->AddColorer(colorer);
    edge_colorer->AddColorer(make_shared<visualization::SetColorer<Graph>>(g, edges, "green"));
//    shared_ptr<visualization::GraphColorer<Graph>>
    auto resulting_colorer = make_shared<visualization::CompositeGraphColorer<Graph>>(colorer, edge_colorer);
    if (edges.size() > 1) {
        set<typename Graph::VertexId> vertices;
        for (auto e : edges) {
            vertices.insert(g.EdgeStart(e));
            vertices.insert(g.EdgeEnd(e));
        }

        visualization::WriteComponent(
                ComponentCloser<Graph>(g, 0).CloseComponent(GraphComponent<Graph>(g, vertices.begin(), vertices.end())),
                folder + ToString(cnt++) + ".dot", colorer, labeler);
    }
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:23,代码来源:relative_coverage_remover.hpp

示例6: Component

 Component(const Graph& g, EdgeId e) : g_(g), cumm_length_(0), contains_deadends_(false) {
     edges_.insert(e);
     cumm_length_ += g_.length(e);
     border_.insert(g.EdgeStart(e));
     border_.insert(g.EdgeEnd(e));
 }
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:6,代码来源:relative_coverage_remover.hpp

示例7: AreEdgesConnected

bool AreEdgesConnected(Graph &g, EdgeId e1, EdgeId e2){
	return g.EdgeEnd(e1) == g.EdgeStart(e2);
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:3,代码来源:path_routines.hpp

示例8: IsEdgeLoop

bool IsEdgeLoop(Graph &g, EdgeId edge){
	return g.EdgeStart(edge) == g.EdgeEnd(edge);
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:3,代码来源:path_routines.hpp

示例9: IsEdgeRelated

bool IsEdgeRelated(Graph &g, EdgeId edge){
	return g.RelatedVertices(g.EdgeStart(edge), g.EdgeEnd(edge));
}
开发者ID:fw1121,项目名称:Pandoras-Toolbox-for-Bioinformatics,代码行数:3,代码来源:path_routines.hpp


注:本文中的Graph::EdgeStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。