Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 58252 Details for
Bug 91766
Ebuilds for RoboCup 2D Soccer Simulation.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
new-boost-random.patch
new-boost-random.patch (text/plain), 6.18 KB, created by
Takenori KUBO
on 2005-05-06 23:18:10 UTC
(
hide
)
Description:
new-boost-random.patch
Filename:
MIME Type:
Creator:
Takenori KUBO
Created:
2005-05-06 23:18:10 UTC
Size:
6.18 KB
patch
obsolete
>Only in rcssserver-9.4.5.orig: rcssserver-9.4.5.spec >diff -rc rcssserver-9.4.5.orig/src/audio.cc rcssserver-9.4.5/src/audio.cc >*** rcssserver-9.4.5.orig/src/audio.cc Tue Apr 29 11:23:02 2003 >--- rcssserver-9.4.5/src/audio.cc Sat May 7 00:26:19 2005 >*************** >*** 516,524 **** > } > else > { >! boost::uniform_smallint< rcss::random::DefaultRNG > rand_int( rcss::random::DefaultRNG::instance(), >! 0, msgs.size () - 1 ); >! int idx = rand_int(); > msg_cont_t::iterator iter = msgs.begin(); > for( int i = 0; i < idx; ++i ) > ++iter; >--- 516,523 ---- > } > else > { >! boost::uniform_smallint< int > rand_int( 0, msgs.size () - 1 ); >! int idx = rand_int(rcss::random::DefaultRNG::instance()); > msg_cont_t::iterator iter = msgs.begin(); > for( int i = 0; i < idx; ++i ) > ++iter; >*************** >*** 567,576 **** > return rval; > } > // otherwise return one of those messages at random >! boost::uniform_smallint< rcss::random::DefaultRNG > rand_int( rcss::random::DefaultRNG::instance(), >! 0, count - 1 ); > >! int idx = rand_int(); > msg_cont_t::iterator iter = iters.first; > for( int i = 0; i < idx; i++ ) > iter++; >--- 566,574 ---- > return rval; > } > // otherwise return one of those messages at random >! boost::uniform_smallint< int > rand_int( 0, count - 1 ); > >! int idx = rand_int(rcss::random::DefaultRNG::instance()); > msg_cont_t::iterator iter = iters.first; > for( int i = 0; i < idx; i++ ) > iter++; >diff -rc rcssserver-9.4.5.orig/src/object.C rcssserver-9.4.5/src/object.C >*** rcssserver-9.4.5.orig/src/object.C Tue May 13 15:54:50 2003 >--- rcssserver-9.4.5/src/object.C Sat May 7 00:14:29 2005 >*************** >*** 602,610 **** > PVector diff = pos - post.center; > if( diff == PVector() ) > { >! boost::uniform_real< rcss::random::DefaultRNG > dir( rcss::random::DefaultRNG::instance(), >! -M_PI, +M_PI ); >! diff = Polar2PVector( post.r, dir() ); > } > else > { >--- 602,609 ---- > PVector diff = pos - post.center; > if( diff == PVector() ) > { >! boost::uniform_real< double > dir( -M_PI, +M_PI ); >! diff = Polar2PVector( post.r, dir( rcss::random::DefaultRNG::instance()) ); > } > else > { >diff -rc rcssserver-9.4.5.orig/src/player.cc rcssserver-9.4.5/src/player.cc >*** rcssserver-9.4.5.orig/src/player.cc Tue Jul 1 22:30:09 2003 >--- rcssserver-9.4.5/src/player.cc Sat May 7 00:19:10 2005 >*************** >*** 659,667 **** > > if ( prob < 1.0 ) > { >! boost::bernoulli_distribution< rcss::random::DefaultRNG > >! rng( rcss::random::DefaultRNG::instance(), 1 - prob ); >! if ( rng() ) > { > alive |= TACKLE ; > >--- 659,666 ---- > > if ( prob < 1.0 ) > { >! boost::bernoulli_distribution< double > rng( 1 - prob ); >! if ( rng( rcss::random::DefaultRNG::instance() ) ) > { > alive |= TACKLE ; > >diff -rc rcssserver-9.4.5.orig/src/visual.cc rcssserver-9.4.5/src/visual.cc >*** rcssserver-9.4.5.orig/src/visual.cc Mon Jun 2 19:29:44 2003 >--- rcssserver-9.4.5/src/visual.cc Sat May 7 00:32:11 2005 >*************** >*** 686,694 **** > return false; > else > { >! boost::bernoulli_distribution< random::DefaultRNG > >! decider( random::DefaultRNG::instance(), prob ); >! return decider(); > } > } > >--- 686,693 ---- > return false; > else > { >! boost::bernoulli_distribution< bool > decider( prob ); >! return decider(random::DefaultRNG::instance()); > } > } > >*************** >*** 1009,1018 **** > //sigma is now in a range of 2.5 to 180 degrees, dependant on > //the distance of the player. 95% of the returned random values > //will be within +- 2*sigma of dir >! boost::normal_distribution< rcss::random::DefaultRNG > rng( rcss::random::DefaultRNG::instance(), >! dir, sigma); > >! return rad2Deg( normalize_angle( rng() ) ); > } > else > return 0; >--- 1008,1016 ---- > //sigma is now in a range of 2.5 to 180 degrees, dependant on > //the distance of the player. 95% of the returned random values > //will be within +- 2*sigma of dir >! boost::normal_distribution< double > rng( dir, sigma ); > >! return rad2Deg( normalize_angle( rng( rcss::random::DefaultRNG::instance() ) ) ); > } > else > return 0; >diff -rc rcssserver-9.4.5.orig/src/visualsensor.cc rcssserver-9.4.5/src/visualsensor.cc >*** rcssserver-9.4.5.orig/src/visualsensor.cc Tue Nov 19 23:54:41 2002 >--- rcssserver-9.4.5/src/visualsensor.cc Sat May 7 00:22:16 2005 >*************** >*** 4387,4396 **** > //sigma is now in a range of 2.5 to 180 degrees, dependant on > //the distance of the player. 95% of the returned random values > //will be within +- 2*sigma of dir >! boost::normal_distribution< rcss::random::DefaultRNG > rng( rcss::random::DefaultRNG::instance(), >! dir, sigma ); > >! return Rad2IDegRound( normalize_angle( rng() ) ); > } > else > return 0; >--- 4387,4395 ---- > //sigma is now in a range of 2.5 to 180 degrees, dependant on > //the distance of the player. 95% of the returned random values > //will be within +- 2*sigma of dir >! boost::normal_distribution< double > rng( dir, sigma ); > >! return Rad2IDegRound( normalize_angle( rng( rcss::random::DefaultRNG::instance() ) ) ); > } > else > return 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 91766
:
58248
|
58249
|
58250
|
58251
| 58252