Comments (6)
get two iterators and cycle from one to the other to find an edge with index i
Please clarify
convert it to g1's local edge descriptor
One reason why I want to replace BGL.
So are you saying that the edge between two vertices in a subgraph is not the same edge as between those two vertices in the full graph?
from graph.
get two iterators and cycle from one to the other to find an edge with index i
typename subgraph_t::edge_iterator e1_i, e1_i_end;
typename subgraph_t::edge_descriptor ed1;
for(tie(e1_i, e1_i_end) = edges(g1); e1_i != e1_i_end; ++e1_i)
{
if(get(boost::edge_index, g1, /* index */ 1) {
ed1 = *e1_i;
}
}
Try this if you get a segmentation fault:
template<typename subgraph_t>
void global_local_convertion_test(subgraph_t &g)
{
subgraph_t &r_g = g.root();
typename subgraph_t::edge_iterator er_i, er_i_end;
for(tie(er_i, er_i_end) = edges(r_g); er_i != er_i_end; ++er_i)
{
if(get(boost::edge_index, r_g, *er_i) == 1)
{
g[g.global_to_local(*er_i)];
}
}
typename subgraph_t::const_children_iterator gi, gi_end;
boost::tie(gi, gi_end) = g.children();
for(; gi != gi_end; ++gi)
{
global_local_convertion_test(*gi);
}
}
from graph.
So are you saying that the edge between two vertices in a subgraph is not the same edge as between those two vertices in the full graph?
I tried to say the edge between two vertices in a subgraph is not the same edge as the edge between the same two vertices full graph after I convert it from global to local
from graph.
That global to local might be to have alternate sets of edges in subgraphs. I'll check it out.
Please provide the output from valgrind running your test case in a gist.
from graph.
edge_descriptor global_to_local(edge_descriptor e_global) const
{ return is_root() ? e_global : (*m_local_edge.find(get(get(edge_index, root().m_graph), e_global))).second; }
It looks like subgraphs can have alternate sets of edges. I disagree with this design choice and it is opaque, but it is already set.
That moves focus to whether a subgraph's included edges at creation should be left as default, copied from the next level up, or it is obviously incorrect. I'll hit this later. I've been up since 3AM local time, past 4:30 now and I'm dead tired.
from graph.
There you go the log:
https://gist.github.com/kenkangxgwe/af4ccb3cec3ae446dc5d69df2184caba
BTW, it seems that we are in the same Time Zone. Good night, bro.
from graph.
Related Issues (20)
- Strange errors deep in Boost.core libraries on old Xcode (7-10) platforms HOT 7
- Documentation for what event tags are available? HOT 1
- Can a graph's `traversal_category` tag inherit from more than one of the defined tags? HOT 2
- maximum_weighted_matching in bipartite graph HOT 6
- Can't remove edge after copying a graph
- The 3-parameter overload of `boykov_kolmogorov_max_flow` does not compile HOT 1
- providing an initial mapping to mcgregor_common_subgraph? HOT 1
- maybe-uninitialized warning in detail/adj_list_edge_iterator.hpp HOT 1
- Interface question HOT 8
- Improve dijkstra heap performance test HOT 3
- get invalid pointer or invalid free() error when copying adjacency_matrix to a vector HOT 2
- Documentation gathering? HOT 1
- provide checked form of vertex/edge property access method
- Adjacency Matrix: doc error for undirected graphs HOT 4
- Graphml: unnecessary dependency on graphviz (and thus Boost.Regex) HOT 5
- Redundant search for representative in disjoint sets
- Semantic problem in articulation_points HOT 1
- unable to compile lengauer_tarjan_dominator_tree with compressed_sparse_row_graph/bidirectionalS HOT 6
- boost/progress.hpp is deprecated
- Maximum Adjacency Search: should unit tests be relaxed to allow multiple correct orderings in the result?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graph.