Conversation started Apr 4, 2015 at 23:11.
Apr 4, 2015 23:11
@LightningRacisinObrit OK...
@Agostino what is the question
Unless they have amnesia
@MichaelSimbirsky I added a bounty. You may have a go at it. — Agostino 41 mins ago
I guess.
you would be very welcome to add some working code and turn your answer into a tutorial
because Boost::Graph would benefit for something like this, IMHO
haha. a 50 point bounty.
Apr 4, 2015 23:14
@sehe well, yes, I can see why you are laughing
No thanks. I have shown this so many times over. Why don't you go over my boost graph answers and lift an example from there? You're free to upvote on if you feel compelled
@sehe pity, I upvoted answers here and there. Now I'm trying to stitch together a working solution.
No luck up to now
adding vertices - ok
adding vertices with properties - ok(ish)
Well. The exact "worry" that you have is answered at least 4 times explicitly in my answers over the last ~2 months. Do you want me to find one?
I'm a little worried that I could incur in problems using listS when calculating connected components, as described here. I would really appreciate a code example showing it work with listS, connected components, and a vertex_index_t map. That's pretty much what I need. — Agostino Mar 17 at 22:52
Does Android even have C++14 support yet?
^ assuming that's the "worry". Simbirsky linked a direct solution (adding vertex_index maps)
If you want more consolation, it seems you're just looking for someone to write the code for you. In that case, 50 imaginary reputation points is underpayment
@Cinch Android is an OS
Apr 4, 2015 23:17
@sehe OK, thanks for the attitude
@sehe It is also a platform
@Agostino Hrmm. I'm not sure whether you are upset. The goal is to help. See this excellent conversation that happened yesterday, which exemplifies this same idea:
@sehe Ok, using firebug I see what you mean, the cookies are included in the request headers. As for libcurl, I was thinking curl, the executable itself, and I wasn't aware of libcurl, the library it uses, as being available. Thanks for the help and patience @sehe! You should compile these comments as an answer so I may mark it for you. Including the RFC, how cookies are part of the headers, and libcurl. — Francisco Aguilera 23 hours ago
@Cinch whatever that means
@sehe no, really, I just spent hours on what you may think is a nice documentation
guess I have to spend days on it? Not really worth it.
So, you really are looking for free code. (Slightly prodding you now :))
Free decent documentation
I wouldn't even know who to pay, even if I wanted
Apr 4, 2015 23:22
Ok. Here's the low-down: use and pass a vertex_index as per the documentation.
is it the same as vertex_index_t?
Related. vertex_index_t is the property tag used to characterize an interior property as the vertex_index property.
Interior properties are a bit old fashioned. But the nice thing is that algorithms can pick up the property maps by their "builtin" tag (vertex_index_t) so you don't have to pass it in on calling certain algorithms
More than half the questions are "old fashioned". Googling is of little help in this scenario.
I'm not sure what you're trying to say. I'm just mentioning a fact. The pros and cons of interior propreties if you will.
Does this vertex_index survive the deletion of previous nodes if mapped to a vertex_index_t?
Apr 4, 2015 23:27
Depends on how you set it up. With listS and an external (as opposed to bundled or interior) property, yes you can make this work.
Let me find my most recent example though...
3
A: Boost Undirected Graph Merging Vertices

seheI don't know what you're actually trying to achieve with the algorithm shown in the OP. Here's, however, one that simplifies the code considerably, so that at least it works safely: uses Vertex bundled property type for vertex (id, name) uses ranged for loops where possible (see mir, shorthand...

Hm...
@Agostino This one I refactored to use bundled properties. The OP had the vertex_index_t tagged interior property and I rewrote using a bundled vertex property type (that contains both the id and name for a vertex)
Using the Bundled properties you get the convenience that the graph does manage the lifetime of properties with the graph element they correspond too.
@sehe I'm looking at it.
man, Boost::Graph is teaching me I've yet to know how terrible C++ can be
every time I look at a new piece of its "example" code
So... LLVM
@Agostino Yeah. I don't disagree. But then again, remind yourself why you're using c++? And why are you using boost graph? Precisely...
Apr 4, 2015 23:37
@sehe C++ because I have to, in the environment I'm using (network simulation)
Boost because I'm a masochist, apparently
@Agostino That doesn't follow.
@Agostino Me too :)
You're using C++ because you want absolute control and maximum performance/flexibility in design. You use Boost Graph because you don't want to implement graph theory and algorithms in all their gory detail and account for testing all that.
@sehe it does follow, if the netork simulator you are using forces you on C++
I'm actually more knowledgeable about the gory details of the algorithms than I am on the seemingly undebuggable mess of templates
@Agostino Ah. Say that then :)
@Agostino It seems to me you have an escape route then
@sehe the point is, if I write some code, other people should be able to understand it
with this library, I need to be explained first
That can always be achieved. Just design well and write cleanly
@Agostino Well. You have had to be explained C++ first too. And the network simulator toolkit thingies. Not surprising
Apr 4, 2015 23:40
@sehe I built 2 simulators by myself before using this one
threaded and distributed
learned C++03
See. My point exactly.
use templates
I know about iterators, reverse iterators
learned about auto
Don't discredit BGL because it's something you have to learn first. Hell yes. You have learned all the other things too, with significant effort
@sehe that's the point, if I had time to learn it, I would suggest it to my colleagues
at this point, I cannot understand without spending days on it
@Agostino for the record, you're naming quite superficial topics here. I'm willing to guess that you're more expert in the networking domain than c++, right
Apr 4, 2015 23:43
@LightningRacisinObrit I don't have another computer I can test this on. Also, if I were to give you all information I would be giving you a bunch of totally useless info. I just think if you really knew what you were talking about you'd be more specific and less rude. — Christopher Thomas 15 mins ago
lol
@sehe yes, I guess
@Agostino Okay. Seems like a clearcut deal then (a) talk this over with the coworkers (b) agree to write your own graph algorithms
@sehe in case you want to add some more details to the answer you linked
this line could benefit from some
std::cout << graph[self].name << (boost::empty(mir(out_edges(self, graph)))? " has no children " : " is the parent of ");
how many statements can you cram into a line of code?
@Agostino okay. :) that's pretty dense indeed. It's equivalent to:
auto out_edges = boost::out_edges(self, graph);
auto range = boost::make_iterator_range(out_edges);
if (boost::empty(range))
    std::cout << graph[self].name << " has no children ";
else
    std::cout << graph[self].name << " is the parent of ";
@Agostino as many as needed to maintain the highlevel expressiveness... I agree this line was pushing things a little
Apr 4, 2015 23:48
@sehe some security environments force 1 per line :D
I bet they do
And it would be a tad arbitrary, but I guess it's worth the trade-off
I bet you would never write std::cout << "hello world" << std::endl; either :S
@sehe sometimes it is, at least the code is boringly readable
you would break it over multiple lines with a StringBuilder in Java
I think it's a false sense of security. All the "familiarity" just induces sleep and causes people to not see the issues (remember heartbleed?)
@sehe oh, that's just the start
@Agostino haha. That's funny. Because "hello" + " " + "world" literally uses a stringbuilder under the hood in Java
@Agostino Precisely.
2 mins ago, by sehe
And it would be a tad arbitrary, but I guess it's worth the trade-off
Apr 4, 2015 23:51
@sehe that's the reason to break it
@sehe if you want boring, coverage for "test every line"
that's one of the reasons for forcing 1 statement per line
anyway, that's another thing
I'm not sure that's necessarily boring. If I were writing code to the mars rover I'd be in favour. Or manned ISS missions. Or medical equipment that applies radiation doses to live patients
@sehe it's a boring necessity :D
And the fact that it's a necessity (if it really is) makes it not-boring
It becomes a challenge. (Get readable code, satisfy testing needs, still have expressive code)
@sehe if you get a kick out of it, suit yourself
Nope :)
Apr 4, 2015 23:54
thought so :D
I don't have the project that requires it.
@sehe me neither, for the moment
any up to date introduction tutorial to Boos::Graph?
My snakey
p. cool
thank you
it's not the most enjoyable game ever but I'm glad I managed to do something
Apr 4, 2015 23:58
@Agostino It's the BGL book for me. I know it's bad. It took me a year of actively trying to answer every question to get anywhere near confident. So, there's an approach you might use o.O
@AndyProwl ... that's minecraft :P
@sehe I'm tempted to pay someone to write a decent one
seriously, I would offer them more than a good beer
@Agostino You are the third person inside ~5 days to offer money for a book about boost libraries
(last one I promise)
@pbible Mmm. I'll do the Boost Spirit book first :) (It doesn't help I don't really grok graph theory. I do grok c++ a bit though) — sehe yesterday
Apr 5, 2015 00:01
@sehe that should tell me something about these libraries
It still upsets me that I wasn't able to draw a normal head
@Borgleader lol, yeah I guess it looks a bit like it
@Agostino I don't know. It could tell a lot about the average user of those libraries. It could tell a bit about me. It could tell something about the documentation. ... I can go on
Camera manipulation is horrible though
@AndyProwl Oh wait, you just made this?
@sehe Yeah, it's for the Pawnguy jam
Apr 5, 2015 00:02
Cool
Thank you
@Agostino Just found this page: theboostcpplibraries.com/boost.graph
@sehe thanks
That is, I searched for Schäling because he writes /very good/ stuff about the boost libraries (e.g. highscore.de)
@sehe I don't speak German, sorry
Apr 5, 2015 00:06
I know right. I was just referring there in case you want to bookmark/scout around that name. I think there are considerable books in English. (Lemme look for the PDF I bought once)
@Agostino Yup the book is in English: i.imgur.com/XaRUuVt.png (it's also online though, AFAIK)
@sehe OK, I'm looking at the presentation
if I get to understand it, nice
Cheers
my main concern is still mapping vertices, though.
Next Tuesday, a small construction team is going to come in & seal the roof and put on gutter & fascia
@sehe Goodbye
 
Conversation ended Apr 5, 2015 at 0:14.