Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
seed
- Page 1
Re: Trying to animate sprite using DirectX9
Programming
Software Development
3 Weeks Ago
by Pavel_11
Hello, it is unneccessarily to use right movex or leftmovex , because it is to much variables. You should to use one variable movex to make it with minus or plus sign in your update function; by pressing left or right keys; because the one thing which is changable is a picture; I mean in global sense; variables like leftx, right x should be one…
Re: Change-a-Letter-or-Two-Game
Community Center
Geeks' Lounge
16 Years Ago
by christina>you
seed
Re: Shuffling a 2d array. Perhaps just a simple syntax error?
Programming
Software Development
15 Years Ago
by Lerner
seed
the generator just once at the start of the program, not every time you call random. Since the time it takes the computer to do the separate function calls is so short there isn't enough time to make a difference in the seeding so it's seeding with the same number every time.
Re: Random Bill Function
Programming
Software Development
13 Years Ago
by L7Sqr
Seed
your random number generator (srand - or one of it's …; std::endl; return 0; }[/code] [edit] You'll want to
seed
drand48 with srand48.
Re: Coin flipping program, so close to finishing
Programming
Software Development
18 Years Ago
by Dave Sinkula
Seed
the random number generator only once in your program. Move your srand call to main, before your for loops.
Re: Time To Wake everyone up - Words Within Words
Community Center
Geeks' Lounge
16 Years Ago
by crippendale
seed
, scad, deed alternatively
Re: Time To Wake everyone up - Words Within Words
Community Center
Geeks' Lounge
16 Years Ago
by Jishnu
seed
, bless, led however
Re: Mastermind program
Programming
Software Development
14 Years Ago
by Hiroshe
Seed
the prng with the time. See the example on the end of [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/rand/"]this[/URL] page. I wonder why the example has a combination of puts() and printf(). :P
Re: Random Bill Function
Programming
Software Development
13 Years Ago
by L7Sqr
Seed
your random number generator (srand - or one of it's …
Re: seed and random number generator
Programming
Software Development
14 Years Ago
by VernonDozier
… I had edited the last post. You have to actually
SEED
it too. Forgot that before. See red line. [code…] cout<<"Enter a
seed
value : "; int
seed
= 0; cin >>
seed
; while(
seed
< 0) { cout<&…non negative number : "; cin >>
seed
; } [COLOR="Red"] srand (
seed
);[/COLOR] for(int i = 0 ; i <…
Re: seed and random number generator
Programming
Software Development
14 Years Ago
by VernonDozier
… how about if you are only to enter a
seed
number one time to initialize the integer generator rand()?[/…] cout<<"Enter a
seed
value : "; int
seed
= 0; cin >>
seed
; while(
seed
< 0) { cout<<…;"\nEnter non negative number : "; cin >>
seed
; } for(int i = 0 ; i < 100; i++) { cout…
Re: seed and random number generator
Programming
Software Development
14 Years Ago
by mrnutty
…++) { cout<<"Enter a
seed
value : "; int
seed
= 0; cin >>
seed
; while(
seed
< 0) { cout<<"…;\nEnter non negative number : "; cin >>
seed
; } cout<<"\nYour random number is : "<…
seed and random number generator
Programming
Software Development
14 Years Ago
by skiing
I have a question we are suppose to input a
seed
value for a randon number generator, but I am having issues with using the srand(
seed
), but the problem is I am getting the same output every time for the random numbers how can I do it with the user entering a
seed
not srand(time(null)) and get differn't random numbers.
Re: seed and random number generator
Programming
Software Development
14 Years Ago
by mrnutty
Oh silly rabbit, I forgot to
seed
the
seed
also.
Re: seed and random number generator
Programming
Software Development
14 Years Ago
by skiing
I know that but how about if you are only to enter a
seed
number one time to initialize the integer generator rand()?
Re: Random number generator with seed
Programming
Software Development
11 Years Ago
by bguild
… no reason to worry about that. Just pretend that the
seed
is a totally meaningless number and it doesn't matter… what
seed
you choose. If you want to test your application with… satisfied your application always works. Or you could choose the
seed
by rolling some real dice. If `Random` is doing its…
Re: Random number generator with seed
Programming
Software Development
11 Years Ago
by mvmalderen
… generating numbers from? *The class uses a 48-bit
seed
, which is modified using a **linear congruential formula**.* (Source… the no argument constructor of Random. It will
seed
the random number generator automagically to a value that…a new random number generator. **This constructor sets the
seed
of the random number generator to a value very …
Re: Is there a Poisson RNG that is seed-less?
Programming
Computer Science
15 Years Ago
by Narue
…for parallel-programming >and I need it to be
seed
-less to ensure concurrent execution. No, you just need the… all threads share the same resources (which includes the global
seed
if you're using something like C++'s rand). The… opinion is to write a good generator that has the
seed
passed in as part of the interface: [code=cplusplus] #…
Random Function with Time seed
Programming
Software Development
15 Years Ago
by slimjimmer
… random numbers so I decided to use time as a
seed
. However I can't seem to get this to work…;time.h> int main() { int random,
seed
, time;
seed
= (int) time(NULL); random = rand(
seed
); printf("random number = %d\n"…
Random number generator with seed
Programming
Software Development
11 Years Ago
by Violet_82
… having `Random randomNumbers = new Random();` we should provide a
seed
argument like this `Random randomNumbers = new Random(seedValue);` So… now is this: which number should I use as
seed
? I mean can I use any number, say 1… `Random randomNumbers = new Random(25);` I mean the
seed
is where the random generator is supposed to start generating…
Is there a Poisson RNG that is seed-less?
Programming
Computer Science
15 Years Ago
by hpr
Hi guys, I've been going around the web (whatever that means) in search of a
seed
-less poisson RNG. It's because I'm going to generate poisson random deviates for parallel-programming and I need it to be
seed
-less to ensure concurrent execution. Cheers
Re: Random number generator with seed
Programming
Software Development
11 Years Ago
by Violet_82
thanks for the replies guys. When I asked the question, I suspected I didn't really need to worry about the number that goes as
seed
, it was just something I was curious to know. After having read your answers and duly checked the links provided, I came to realize that sometimes ignorance is bliss : - )! thanks
Re: Is there a Poisson RNG that is seed-less?
Programming
Computer Science
15 Years Ago
by gusano79
… same seeded PRNG in each parallel process, but generate the
seed
globally so each process will generate the same numbers. [*]If…
largest value in a seed random number generator
Programming
Software Development
14 Years Ago
by melissa.johns
…" numbers, I set up the program to get the
seed
from the cpu time. Then, to get the number between…
bool argument problem for random seed.
Programming
Software Development
13 Years Ago
by burcin erek
…[]); // making zero int sayisec(bool sayi[]); // choosing number from random
seed
int xx[11]; // random numbers will be assigned to xx…
Game of Crap
Programming
Software Development
14 Years Ago
by freakgamerz
…for random
seed
: "; cin>>
seed
; if (
seed
== 0) { srand(
seed
); } while (
seed
<0 ||
seed
>… 50) { cout<<"Invalid
seed
…endl; cout<<"Enter
seed
: "; cin>>
seed
; } srand(
seed
); } //Name:getPrintDetails //Purpose: //…
C++ Poker Game: Determining Full House
Programming
Software Development
14 Years Ago
by redwolf99
…DrawCard(Card); DisplayCard(Card); SortCard(Card);
seed
= determineReward(Card,
seed
, bet); playGame(Card,
seed
); return 0; } else { cout…initial balance was: $" <<
seed
<< endl;
seed
=
seed
- bet; cout << "…inintial balance was: $" <<
seed
<< endl;
seed
=
seed
+ bet; cout << "…
Can you help me in correcting the errors in my this program? Thank you.
Programming
Software Development
14 Years Ago
by Ieako
…y[station]=(minimal(
seed
)%passengerlimit[station])+1;
seed
=minimal(
seed
);/*?*/ } else { y[station]=(minimal(
seed
)%(passengerlimit[station]+…info[station][ctr3]=(minimal(
seed
)%(16-station))+station+1;
seed
=minimal(
seed
); out[info[station][ctr3…
Iterative method - Jacobi - problem with code
Programming
Software Development
12 Years Ago
by XodoX
… of entries in the vector. // // Input/output, int *
SEED
, a
seed
for the random number generator. // // Output, double R[N…; i++ ) { k = *
seed
/ 127773; *
seed
= 16807 * ( *
seed
- k * 127773 ) - k * 2836; if ( *
seed
< 0 ) { *
seed
= *
seed
+ i4_huge; } r[i] = ( double ) ( *
seed
) * 4.656612875E-10; } …
Hash tables, how do they work?
Programming
Software Development
8 Years Ago
by Sarkurd
…; val, const Types&... args) { hash_combine(
seed
,val); hash_val(
seed
,args...); } // auxiliary generic function to create a…hash_val (const Types&... args) { std::size_t
seed
= 0; hash_val (
seed
, args...); return
seed
; } `main.cpp` #include <unordered_set>…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC