Boost logo

Boost Users :

From: David Ohlemacher (ohlemacher_at_[hidden])
Date: 2003-10-16 14:54:14


Here is the missing code for the second problem:

 graph_traits < Graph >::edge_iterator ei, ei_end;
  for (tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
  {
    std::cout
        << actor_name[source(*ei, g)] << " was in \""
        << connecting_movie[*ei] << "\" with "
        << actor_name[target(*ei, g)] << std::endl;
  }

David Ohlemacher wrote:

> Problem with the Kevin Bacon example:
>
> char_delimiters_separator < char >sep(false, "", ";");
>
> should be
>
> char_delimiters_separator < char >sep(false, "", "|");
>
> At least this is true with the dat file I have.
>
> My output was:
> William Shatner|Loaded Weapon 1 (1993)|Denise Richards has a Bacon
> number of 0
> has a Bacon number of 1
> Denise Richards|Wild Things (1998)|Kevin Bacon has a Bacon number of 2
> Patrick Stewart|Prince of Egypt, The (1998)|Steve Martin has a Bacon
> number of 2
> Steve Martin|Novocaine (2000)|Kevin Bacon has a Bacon number of 2
> ...
>
> It is now:
> William Shatner has a Bacon number of 2
> Denise Richards has a Bacon number of 1
> Kevin Bacon has a Bacon number of 0
> Patrick Stewart has a Bacon number of 2
> Steve Martin has a Bacon number of 1
> ...
>
> Another problem, it still does not produce the output described in the
> docs such as:
>
> William Shatner was in Loaded Weapon 1 (1993) with Denise Richards
> Denise Richards was in Wild Things (1998) with Kevin Bacon
> Patrick Stewart was in Prince of Egypt, The (1998) with Steve Martin
> ...
>
>
> Thanks,
> -d
>
> Thomas F. O'Connell wrote:
>
>> This is a minor point but one worth correcting for the sake of
>> correctness and ease of following the examples.
>>
>> In the boost-1.30.2 distribution, the file
>>
>> libs/graph/example/kevin-bacon.cpp
>>
>> makes a reference to a "./kevin-bacon.dat" file, but the file in both
>> the distribution and the documentation is actually kevin_bacon.dat.
>>
>> The only difference being '_' vs. '-'.
>>
>> This is easily fixed by an end-user, but it would be nice to have the
>> examples work out of the box.
>>
>> -tfo
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>>
>>
>

-- 
David Ohlemacher
BBN Technologies
127 John Clarke Rd.
Middletown, RI 02878
Phone: (401)848-3542, Fax:(401)849-8611
ohlemacher at bbn dot com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net