Changes in lemon/random.h [23:0ba375bf5dae:62:4790635473ef] in lemon-1.0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/random.h
r23 r62 3 3 * This file is a part of LEMON, a generic C++ optimization library 4 4 * 5 * Copyright (C) 2003-200 75 * Copyright (C) 2003-2008 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 255 255 --curr; 256 256 } 257 curr[0] = (((curr[0] & hiMask) | (curr[length - 1] & loMask)) >> 1) ^257 state[0] = (((state[0] & hiMask) | (curr[length - 1] & loMask)) >> 1) ^ 258 258 curr[length - shift] ^ mask[curr[length - 1] & 1ul]; 259 259 … … 511 511 ///\endcode 512 512 /// 513 /// The lemonprovides a global instance of the random number513 /// LEMON provides a global instance of the random number 514 514 /// generator which name is \ref lemon::rnd "rnd". Usually it is a 515 515 /// good programming convenience to use this global generator to get … … 527 527 public: 528 528 529 /// \brief Constructor529 /// \brief Default constructor 530 530 /// 531 531 /// Constructor with constant seeding. 532 532 Random() { core.initState(); } 533 533 534 /// \brief Constructor 534 /// \brief Constructor with seed 535 535 /// 536 536 /// Constructor with seed. The current number type will be converted … … 541 541 } 542 542 543 /// \brief Constructor 543 /// \brief Constructor with array seeding 544 544 /// 545 545 /// Constructor with array seeding. The given range should contain … … 578 578 /// 579 579 /// It returns a random real number from the range [0, 1). The 580 /// default Number type is double.580 /// default Number type is \c double. 581 581 template <typename Number> 582 582 Number real() { … … 654 654 /// 655 655 /// It returns a random non-negative integer uniformly from the 656 /// whole range of the current \c Number type. 657 /// type of this function is unsigned int.656 /// whole range of the current \c Number type. The default result 657 /// type of this function is <tt>unsigned int</tt>. 658 658 template <typename Number> 659 659 Number uinteger() { … … 669 669 /// It returns a random integer uniformly from the whole range of 670 670 /// the current \c Number type. The default result type of this 671 /// function is int.671 /// function is \c int. 672 672 template <typename Number> 673 673 Number integer() { … … 690 690 } 691 691 692 ///\name Non uniform distributions692 ///\name Non-uniform distributions 693 693 /// 694 694
Note: See TracChangeset
for help on using the changeset viewer.