[12893] | 1 | <?xml version="1.0"?>
|
---|
| 2 | <doc>
|
---|
| 3 | <assembly>
|
---|
| 4 | <name>SimSharp-3.0.7</name>
|
---|
| 5 | </assembly>
|
---|
| 6 | <members>
|
---|
| 7 | <member name="T:SimSharp.EventQueue">
|
---|
| 8 | <summary>
|
---|
| 9 | An implementation of a min-Priority Queue using a heap. Has O(1) .Contains()!
|
---|
| 10 | See https://bitbucket.org/BlueRaja/high-speed-priority-queue-for-c/wiki/Getting%20Started for more information
|
---|
| 11 | </summary>
|
---|
| 12 | <remarks>
|
---|
| 13 | There are modifications so that the type is not generic anymore and can only hold values of type EventQueueNode
|
---|
| 14 | </remarks>
|
---|
| 15 | </member>
|
---|
| 16 | <member name="M:SimSharp.EventQueue.#ctor(System.Int32)">
|
---|
| 17 | <summary>
|
---|
| 18 | Instantiate a new Priority Queue
|
---|
| 19 | </summary>
|
---|
| 20 | <param name="maxNodes">EventQueueNodehe max nodes ever allowed to be enqueued (going over this will cause an exception)</param>
|
---|
| 21 | </member>
|
---|
| 22 | <member name="M:SimSharp.EventQueue.Clear">
|
---|
| 23 | <summary>
|
---|
| 24 | Removes every node from the queue. O(n) (So, don't do this often!)
|
---|
| 25 | </summary>
|
---|
| 26 | </member>
|
---|
| 27 | <member name="M:SimSharp.EventQueue.Contains(SimSharp.EventQueueNode)">
|
---|
| 28 | <summary>
|
---|
| 29 | Returns (in O(1)!) whether the given node is in the queue. O(1)
|
---|
| 30 | </summary>
|
---|
| 31 | </member>
|
---|
| 32 | <member name="M:SimSharp.EventQueue.Enqueue(System.DateTime,SimSharp.Event)">
|
---|
| 33 | <summary>
|
---|
| 34 | Enqueue a node - .Priority must be set beforehand! O(log n)
|
---|
| 35 | </summary>
|
---|
| 36 | </member>
|
---|
| 37 | <member name="M:SimSharp.EventQueue.HasHigherPriority(SimSharp.EventQueueNode,SimSharp.EventQueueNode)">
|
---|
| 38 | <summary>
|
---|
| 39 | Returns true if 'higher' has higher priority than 'lower', false otherwise.
|
---|
| 40 | Note that calling HasHigherPriority(node, node) (ie. both arguments the same node) will return false
|
---|
| 41 | </summary>
|
---|
| 42 | </member>
|
---|
| 43 | <member name="M:SimSharp.EventQueue.Dequeue">
|
---|
| 44 | <summary>
|
---|
| 45 | Removes the head of the queue (node with highest priority; ties are broken by order of insertion), and returns it. O(log n)
|
---|
| 46 | </summary>
|
---|
| 47 | </member>
|
---|
| 48 | <member name="M:SimSharp.EventQueue.UpdatePriority(SimSharp.EventQueueNode,System.DateTime)">
|
---|
| 49 | <summary>
|
---|
| 50 | This method must be called on a node every time its priority changes while it is in the queue.
|
---|
| 51 | <b>Forgetting to call this method will result in a corrupted queue!</b>
|
---|
| 52 | O(log n)
|
---|
| 53 | </summary>
|
---|
| 54 | </member>
|
---|
| 55 | <member name="M:SimSharp.EventQueue.Remove(SimSharp.EventQueueNode)">
|
---|
| 56 | <summary>
|
---|
| 57 | Removes a node from the queue. Note that the node does not need to be the head of the queue. O(log n)
|
---|
| 58 | </summary>
|
---|
| 59 | </member>
|
---|
| 60 | <member name="M:SimSharp.EventQueue.IsValidQueue">
|
---|
| 61 | <summary>
|
---|
| 62 | <b>Should not be called in production code.</b>
|
---|
| 63 | Checks to make sure the queue is still in a valid state. Used for testing/debugging the queue.
|
---|
| 64 | </summary>
|
---|
| 65 | </member>
|
---|
| 66 | <member name="P:SimSharp.EventQueue.Count">
|
---|
| 67 | <summary>
|
---|
| 68 | Returns the number of nodes in the queue. O(1)
|
---|
| 69 | </summary>
|
---|
| 70 | </member>
|
---|
| 71 | <member name="P:SimSharp.EventQueue.MaxSize">
|
---|
| 72 | <summary>
|
---|
| 73 | Returns the maximum number of items that can be enqueued at once in this queue. Once you hit this number (ie. once Count == MaxSize),
|
---|
| 74 | attempting to enqueue another item will throw an exception. O(1)
|
---|
| 75 | </summary>
|
---|
| 76 | </member>
|
---|
| 77 | <member name="P:SimSharp.EventQueue.First">
|
---|
| 78 | <summary>
|
---|
| 79 | Returns the head of the queue, without removing it (use Dequeue() for that). O(1)
|
---|
| 80 | </summary>
|
---|
| 81 | </member>
|
---|
| 82 | <member name="P:SimSharp.EventQueueNode.Priority">
|
---|
| 83 | <summary>
|
---|
| 84 | The Priority to insert this node at. Must be set BEFORE adding a node to the queue
|
---|
| 85 | </summary>
|
---|
| 86 | </member>
|
---|
| 87 | <member name="P:SimSharp.EventQueueNode.InsertionIndex">
|
---|
| 88 | <summary>
|
---|
| 89 | <b>Used by the priority queue - do not edit this value.</b>
|
---|
| 90 | Represents the order the node was inserted in
|
---|
| 91 | </summary>
|
---|
| 92 | </member>
|
---|
| 93 | <member name="P:SimSharp.EventQueueNode.QueueIndex">
|
---|
| 94 | <summary>
|
---|
| 95 | <b>Used by the priority queue - do not edit this value.</b>
|
---|
| 96 | Represents the current position in the queue
|
---|
| 97 | </summary>
|
---|
| 98 | </member>
|
---|
| 99 | <member name="T:SimSharp.Condition">
|
---|
| 100 | <summary>
|
---|
| 101 | Conditions are events that execute when any or all of its sub-events are executed.
|
---|
| 102 | </summary>
|
---|
| 103 | </member>
|
---|
| 104 | <member name="T:SimSharp.Event">
|
---|
| 105 | <summary>
|
---|
| 106 | The base class for all events in SimSharp.
|
---|
| 107 | An event can be in one of three states at any time:
|
---|
| 108 | - Alive: The event object exists, but is neither scheduled to
|
---|
| 109 | be executed, nor is it already executed.
|
---|
| 110 | - Triggered: The event has been put in the event queue and is
|
---|
| 111 | going to be executed.
|
---|
| 112 | - Processed: The event has been executed.
|
---|
| 113 |
|
---|
| 114 | Usually, the event is alive until its Trigger, Succeed, or Fail
|
---|
| 115 | method have been called. Then it becomes triggered. When the
|
---|
| 116 | Environment progresses to the event and executes its callbacks
|
---|
| 117 | the event becomes processed.
|
---|
| 118 | </summary>
|
---|
| 119 | </member>
|
---|
| 120 | <member name="M:SimSharp.Event.Trigger(SimSharp.Event)">
|
---|
| 121 | <summary>
|
---|
| 122 | This method schedules the event right now. It takes the IsOk state
|
---|
| 123 | and uses the <see cref="P:SimSharp.Event.Value"/> of the given <paramref name="@event"/>.
|
---|
| 124 | Thus if the given event fails, this event will also be triggered as
|
---|
| 125 | failing.
|
---|
| 126 | </summary>
|
---|
| 127 | <exception cref="T:System.InvalidOperationException">
|
---|
| 128 | Thrown when the event has already been triggered.
|
---|
| 129 | </exception>
|
---|
| 130 | <remarks>
|
---|
| 131 | The signature of this method allows it to be used as a callback.
|
---|
| 132 | </remarks>
|
---|
| 133 | <param name="event">The event that triggers this event.</param>
|
---|
| 134 | </member>
|
---|
| 135 | <member name="M:SimSharp.Event.Succeed(System.Object)">
|
---|
| 136 | <summary>
|
---|
| 137 | This method schedules the event right now. It sets IsOk state to true
|
---|
| 138 | and optionally uses also the value. If urgent is given, the event may
|
---|
| 139 | be scheduled as urgent. Urgent events are placed in a separate event
|
---|
| 140 | queue. The callbacks of urgent events are executed before normal events.
|
---|
| 141 | </summary>
|
---|
| 142 | <exception cref="T:System.InvalidOperationException">
|
---|
| 143 | Thrown when the event has already been triggered.
|
---|
| 144 | </exception>
|
---|
| 145 | <param name="value">The value that the event should use.</param>
|
---|
| 146 | <param name="urgent">Whether the event should be scheduled urgently.
|
---|
| 147 | This is ususally not required and should be reserved for very special
|
---|
| 148 | cases.</param>
|
---|
| 149 | </member>
|
---|
| 150 | <member name="M:SimSharp.Event.Fail(System.Object)">
|
---|
| 151 | <summary>
|
---|
| 152 | This method schedules the event right now. It sets IsOk state to false
|
---|
| 153 | and optionally uses also the value. If urgent is given, the event may
|
---|
| 154 | be scheduled as urgent. Urgent events are placed in a separate event
|
---|
| 155 | queue. The callbacks of urgent events are executed before normal events.
|
---|
| 156 | </summary>
|
---|
| 157 | <exception cref="T:System.InvalidOperationException">
|
---|
| 158 | Thrown when the event has already been triggered.
|
---|
| 159 | </exception>
|
---|
| 160 | <param name="value">The value that the event should use.</param>
|
---|
| 161 | <param name="urgent">Whether the event should be scheduled urgently.
|
---|
| 162 | This is ususally not required and should be reserved for very special
|
---|
| 163 | cases.</param>
|
---|
| 164 | </member>
|
---|
| 165 | <member name="M:SimSharp.Event.AddCallback(System.Action{SimSharp.Event})">
|
---|
| 166 | <summary>
|
---|
| 167 | This method adds a callback to the list of callbacks. Callbacks will be
|
---|
| 168 | executed in the order they have been added.
|
---|
| 169 | </summary>
|
---|
| 170 | <param name="callback">The callback to execute when the event is being
|
---|
| 171 | processed.</param>
|
---|
| 172 | </member>
|
---|
| 173 | <member name="M:SimSharp.Event.AddCallbacks(System.Collections.Generic.IEnumerable{System.Action{SimSharp.Event}})">
|
---|
| 174 | <summary>
|
---|
| 175 | This method adds a range of callbacks to the list of callbacks. Callbacks
|
---|
| 176 | will be executed in the order they have been added.
|
---|
| 177 | </summary>
|
---|
| 178 | <param name="callbacks">The callbacks to execute when the event is being
|
---|
| 179 | processed.</param>
|
---|
| 180 | </member>
|
---|
| 181 | <member name="M:SimSharp.Event.RemoveCallback(System.Action{SimSharp.Event})">
|
---|
| 182 | <summary>
|
---|
| 183 | This method removes a callback to the list of callbacks.
|
---|
| 184 | </summary>
|
---|
| 185 | <remarks>
|
---|
| 186 | It is not checked if the callback has actually been added before and
|
---|
| 187 | no exception will be thrown if it had not been present.
|
---|
| 188 | </remarks>
|
---|
| 189 | <param name="callback">The callback to remove.</param>
|
---|
| 190 | </member>
|
---|
| 191 | <member name="M:SimSharp.Event.Process">
|
---|
| 192 | <summary>
|
---|
| 193 | This method processes the event, that is, it calls all the callbacks.
|
---|
| 194 | When it finishes it will be marked IsProcessed and cannot be processed
|
---|
| 195 | again.
|
---|
| 196 | </summary>
|
---|
| 197 | <exception cref="T:System.InvalidOperationException">When the event has already
|
---|
| 198 | been processed.</exception>
|
---|
| 199 | </member>
|
---|
| 200 | <member name="P:SimSharp.Event.Value">
|
---|
| 201 | <summary>
|
---|
| 202 | The value property can be used to return arbitrary data from a
|
---|
| 203 | process or an event. It also represents the interrupt cause to
|
---|
| 204 | a process.
|
---|
| 205 | </summary>
|
---|
| 206 | </member>
|
---|
| 207 | <member name="P:SimSharp.Event.IsOk">
|
---|
| 208 | <summary>
|
---|
| 209 | The IsOk flag indicates if the event succeeded or failed. An event
|
---|
| 210 | that failed indicates to a waiting process that the action could
|
---|
| 211 | not be performed and that the faulting situation must be handled.
|
---|
| 212 | Typically, interrupting a process sets the IsOk flag to false.
|
---|
| 213 | </summary>
|
---|
| 214 | </member>
|
---|
| 215 | <member name="P:SimSharp.Event.IsAlive">
|
---|
| 216 | <summary>
|
---|
| 217 | An event is alive when it is not triggered and not processed. That
|
---|
| 218 | is, when it exists in memory without being scheduled. Typically,
|
---|
| 219 | a Process is alive until its last event has been processed and the
|
---|
| 220 | process event itself is to be processed.
|
---|
| 221 | </summary>
|
---|
| 222 | </member>
|
---|
| 223 | <member name="P:SimSharp.Event.IsProcessed">
|
---|
| 224 | <summary>
|
---|
| 225 | An event becomes processed when its callbacks have been executed.
|
---|
| 226 | Events may only be processed once and an exception will be thrown
|
---|
| 227 | if they are to be processed multiple times.
|
---|
| 228 | </summary>
|
---|
| 229 | </member>
|
---|
| 230 | <member name="P:SimSharp.Event.IsTriggered">
|
---|
| 231 | <summary>
|
---|
| 232 | An event becomes triggered when it is placed into the event queue.
|
---|
| 233 | That is, when its callbacks are going to be executed.
|
---|
| 234 | An even that is triggered may later not be failed or retriggered.
|
---|
| 235 | </summary>
|
---|
| 236 | </member>
|
---|
| 237 | <member name="T:SimSharp.Environment">
|
---|
| 238 | <summary>
|
---|
| 239 | Environments hold the event queues, schedule and process events.
|
---|
| 240 | </summary>
|
---|
| 241 | </member>
|
---|
| 242 | <member name="M:SimSharp.Environment.RandExponential(System.Double)">
|
---|
| 243 | <summary>
|
---|
| 244 | Returns a number that is exponentially distributed given a certain mean.
|
---|
| 245 | </summary>
|
---|
| 246 | <remarks>
|
---|
| 247 | Unlike in other APIs here the mean should be given and not the lambda parameter.
|
---|
| 248 | </remarks>
|
---|
| 249 | <param name="mean">The mean(!) of the distribution is 1 / lambda.</param>
|
---|
| 250 | <returns>A number that is exponentially distributed</returns>
|
---|
| 251 | </member>
|
---|
| 252 | <member name="M:SimSharp.Environment.RandExponential(System.TimeSpan)">
|
---|
| 253 | <summary>
|
---|
| 254 | Returns a timespan that is exponentially distributed given a certain mean.
|
---|
| 255 | </summary>
|
---|
| 256 | <remarks>
|
---|
| 257 | Unlike in other APIs here the mean should be given and not the lambda parameter.
|
---|
| 258 | </remarks>
|
---|
| 259 | <param name="mean">The mean(!) of the distribution is 1 / lambda.</param>
|
---|
| 260 | <returns>A number that is exponentially distributed</returns>
|
---|
| 261 | </member>
|
---|
| 262 | <member name="P:SimSharp.Environment.DefaultTimeStepSeconds">
|
---|
| 263 | <summary>
|
---|
| 264 | Describes the number of seconds that a logical step of 1 in the *D-API takes.
|
---|
| 265 | </summary>
|
---|
| 266 | </member>
|
---|
| 267 | <member name="P:SimSharp.Environment.NowD">
|
---|
| 268 | <summary>
|
---|
| 269 | Calculates the logical date of the simulation by the amount of default steps
|
---|
| 270 | that have passed.
|
---|
| 271 | </summary>
|
---|
| 272 | </member>
|
---|
| 273 | <member name="P:SimSharp.Environment.Now">
|
---|
| 274 | <summary>
|
---|
| 275 | The current simulation time as a calendar date.
|
---|
| 276 | </summary>
|
---|
| 277 | </member>
|
---|
| 278 | <member name="P:SimSharp.Environment.StartDate">
|
---|
| 279 | <summary>
|
---|
| 280 | The calendar date when the simulation started. This defaults to 1970-1-1 if
|
---|
| 281 | no other date has been specified in the overloaded constructor.
|
---|
| 282 | </summary>
|
---|
| 283 | </member>
|
---|
| 284 | <member name="P:SimSharp.Environment.Random">
|
---|
| 285 | <summary>
|
---|
| 286 | The random number generator that is to be used in all events in
|
---|
| 287 | order to produce reproducible results.
|
---|
| 288 | </summary>
|
---|
| 289 | </member>
|
---|
| 290 | <member name="T:SimSharp.Process">
|
---|
| 291 | <summary>
|
---|
| 292 | A Process handles the iteration of events. Processes may define steps that
|
---|
| 293 | a certain entity in the simulation has to perform. Each time the process
|
---|
| 294 | should wait it yields an event and will be resumed when that event is processed.
|
---|
| 295 | </summary>
|
---|
| 296 | <remarks>
|
---|
| 297 | Since an iterator method does not have access to its process, the method can
|
---|
| 298 | retrieve the associated Process through the ActiveProcess property of the
|
---|
| 299 | environment. Each Process sets and resets that property during Resume.
|
---|
| 300 | </remarks>
|
---|
| 301 | </member>
|
---|
| 302 | <member name="M:SimSharp.Process.Interrupt(System.Object)">
|
---|
| 303 | <summary>
|
---|
| 304 | This interrupts a process and causes the IsOk flag to be set to false.
|
---|
| 305 | If a process is interrupted the iterator method needs to call HandleFault()
|
---|
| 306 | before continuing to yield further events.
|
---|
| 307 | </summary>
|
---|
| 308 | <exception cref="T:System.InvalidOperationException">This is thrown in three conditions:
|
---|
| 309 | - If the process has already been triggered.
|
---|
| 310 | - If the process attempts to interrupt itself.
|
---|
| 311 | - If the process continues to yield events despite being faulted.</exception>
|
---|
| 312 | <param name="cause">The cause of the interrupt.</param>
|
---|
| 313 | </member>
|
---|
| 314 | <member name="M:SimSharp.Process.HandleFault">
|
---|
| 315 | <summary>
|
---|
| 316 | This method must be called to reset the IsOk flag of the process back to true.
|
---|
| 317 | The IsOk flag may be set to false if the process waited on an event that failed.
|
---|
| 318 | </summary>
|
---|
| 319 | <remarks>
|
---|
| 320 | In SimPy a faulting process would throw an exception which is then catched and
|
---|
| 321 | chained. In SimSharp catching exceptions from a yield is not possible as a yield
|
---|
| 322 | return statement may not throw an exception.
|
---|
| 323 | If a processes faulted the Value property may indicate a cause for the fault.
|
---|
| 324 | </remarks>
|
---|
| 325 | <returns>True if a faulting situation needs to be handled, false if the process
|
---|
| 326 | is okay and the last yielded event succeeded.</returns>
|
---|
| 327 | </member>
|
---|
| 328 | <member name="P:SimSharp.Process.Target">
|
---|
| 329 | <summary>
|
---|
| 330 | Target is the event that is expected to be executed next in the process.
|
---|
| 331 | </summary>
|
---|
| 332 | </member>
|
---|
| 333 | <member name="T:SimSharp.Timeout">
|
---|
| 334 | <summary>
|
---|
| 335 | Timeouts are simple events that are executed after a certain timespan has passed.
|
---|
| 336 | </summary>
|
---|
| 337 | </member>
|
---|
| 338 | <member name="M:SimSharp.Timeout.#ctor(SimSharp.Environment,System.TimeSpan,System.Object,System.Boolean)">
|
---|
| 339 | <summary>
|
---|
| 340 | A timeout is an event that is executed after a certain timespan has passed.
|
---|
| 341 | </summary>
|
---|
| 342 | <remarks>
|
---|
| 343 | Timeout events are scheduled when they are created. They are always triggered
|
---|
| 344 | when they are created.
|
---|
| 345 | </remarks>
|
---|
| 346 | <param name="environment">The environment in which it is scheduled.</param>
|
---|
| 347 | <param name="delay">The timespan for the timeout.</param>
|
---|
| 348 | <param name="value">The value of the timeout.</param>
|
---|
| 349 | <param name="isOk">Whether the timeout should succeed or fail.</param>
|
---|
| 350 | </member>
|
---|
| 351 | <member name="T:SimSharp.StopSimulationException">
|
---|
| 352 | <summary>
|
---|
| 353 | An exception that is thrown to stop the simulation.
|
---|
| 354 | </summary>
|
---|
| 355 | </member>
|
---|
| 356 | <member name="T:SimSharp.FastRandom">
|
---|
| 357 | <summary>
|
---|
| 358 | A fast random number generator for .NET
|
---|
| 359 | Colin Green, January 2005
|
---|
| 360 |
|
---|
| 361 | Key points:
|
---|
| 362 | 1) Based on a simple and fast xor-shift pseudo random number generator (RNG) specified in:
|
---|
| 363 | Marsaglia, George. (2003). Xorshift RNGs.
|
---|
| 364 | http://www.jstatsoft.org/v08/i14/paper
|
---|
| 365 |
|
---|
| 366 | This particular implementation of xorshift has a period of 2^128-1. See the above paper to see
|
---|
| 367 | how this can be easily extened if you need a longer period. At the time of writing I could find no
|
---|
| 368 | information on the period of System.Random for comparison.
|
---|
| 369 |
|
---|
| 370 | 2) Faster than System.Random. Up to 8x faster, depending on which methods are called.
|
---|
| 371 |
|
---|
| 372 | 3) Direct replacement for System.Random. This class implements all of the methods that System.Random
|
---|
| 373 | does plus some additional methods. The like named methods are functionally equivalent.
|
---|
| 374 |
|
---|
| 375 | 4) Allows fast re-initialisation with a seed, unlike System.Random which accepts a seed at construction
|
---|
| 376 | time which then executes a relatively expensive initialisation routine. This provides a vast speed improvement
|
---|
| 377 | if you need to reset the pseudo-random number sequence many times, e.g. if you want to re-generate the same
|
---|
| 378 | sequence of random numbers many times. An alternative might be to cache random numbers in an array, but that
|
---|
| 379 | approach is limited by memory capacity and the fact that you may also want a large number of different sequences
|
---|
| 380 | cached. Each sequence can be represented by a single seed value (int) when using FastRandom.
|
---|
| 381 |
|
---|
| 382 | Notes.
|
---|
| 383 | A further performance improvement can be obtained by declaring local variables as static, thus avoiding
|
---|
| 384 | re-allocation of variables on each call. However care should be taken if multiple instances of
|
---|
| 385 | FastRandom are in use or if being used in a multi-threaded environment.
|
---|
| 386 |
|
---|
| 387 |
|
---|
| 388 | Colin Green, September 4th 2005
|
---|
| 389 | - Added NextBytesUnsafe() - commented out by default.
|
---|
| 390 | - Fixed bug in Reinitialise() - y,z and w variables were not being reset.
|
---|
| 391 |
|
---|
| 392 | Colin Green, December 2008.
|
---|
| 393 | - Fix to Next() - Was previously able to return int.MaxValue, contrary to the method's contract and comments.
|
---|
| 394 | - Modified NextBool() to use _bitMask instead of a count of remaining bits. Also reset the bit buffer in Reinitialise().
|
---|
| 395 |
|
---|
| 396 | Colin Green, 2011-08-31
|
---|
| 397 | - Added NextByte() method.
|
---|
| 398 | - Added new statically declared seedRng FastRandom to allow easy creation of multiple FastRandoms with different seeds
|
---|
| 399 | within a single clock tick.
|
---|
| 400 |
|
---|
| 401 | Colin Green, 2011-10-04
|
---|
| 402 | - Seeds are now hashed. Without this the first random sample for nearby seeds (1,2,3, etc.) are very similar
|
---|
| 403 | (have a similar bit pattern). Thanks to Francois Guibert for identifying this problem.
|
---|
| 404 |
|
---|
| 405 | </summary>
|
---|
| 406 | </member>
|
---|
| 407 | <member name="F:SimSharp.FastRandom.__seedRng">
|
---|
| 408 | <summary>
|
---|
| 409 | A static RNG that is used to generate seed values when constructing new instances of FastRandom.
|
---|
| 410 | This overcomes the problem whereby multiple FastRandom instances are instantiated within the same
|
---|
| 411 | tick count and thus obtain the same seed, that approach can result in extreme biases occuring
|
---|
| 412 | in some cases depending on how the RNG is used.
|
---|
| 413 | </summary>
|
---|
| 414 | </member>
|
---|
| 415 | <member name="M:SimSharp.FastRandom.#ctor">
|
---|
| 416 | <summary>
|
---|
| 417 | Initialises a new instance using a seed generated from the class's static seed RNG.
|
---|
| 418 | </summary>
|
---|
| 419 | </member>
|
---|
| 420 | <member name="M:SimSharp.FastRandom.#ctor(System.Int32)">
|
---|
| 421 | <summary>
|
---|
| 422 | Initialises a new instance using an int value as seed.
|
---|
| 423 | This constructor signature is provided to maintain compatibility with
|
---|
| 424 | System.Random
|
---|
| 425 | </summary>
|
---|
| 426 | </member>
|
---|
| 427 | <member name="M:SimSharp.FastRandom.Reinitialise(System.Int32)">
|
---|
| 428 | <summary>
|
---|
| 429 | Reinitialises using an int value as a seed.
|
---|
| 430 | </summary>
|
---|
| 431 | </member>
|
---|
| 432 | <member name="M:SimSharp.FastRandom.Next">
|
---|
| 433 | <summary>
|
---|
| 434 | Generates a random int over the range 0 to int.MaxValue-1.
|
---|
| 435 | MaxValue is not generated in order to remain functionally equivalent to System.Random.Next().
|
---|
| 436 | This does slightly eat into some of the performance gain over System.Random, but not much.
|
---|
| 437 | For better performance see:
|
---|
| 438 |
|
---|
| 439 | Call NextInt() for an int over the range 0 to int.MaxValue.
|
---|
| 440 |
|
---|
| 441 | Call NextUInt() and cast the result to an int to generate an int over the full Int32 value range
|
---|
| 442 | including negative values.
|
---|
| 443 | </summary>
|
---|
| 444 | </member>
|
---|
| 445 | <member name="M:SimSharp.FastRandom.Next(System.Int32)">
|
---|
| 446 | <summary>
|
---|
| 447 | Generates a random int over the range 0 to upperBound-1, and not including upperBound.
|
---|
| 448 | </summary>
|
---|
| 449 | </member>
|
---|
| 450 | <member name="M:SimSharp.FastRandom.Next(System.Int32,System.Int32)">
|
---|
| 451 | <summary>
|
---|
| 452 | Generates a random int over the range lowerBound to upperBound-1, and not including upperBound.
|
---|
| 453 | upperBound must be >= lowerBound. lowerBound may be negative.
|
---|
| 454 | </summary>
|
---|
| 455 | </member>
|
---|
| 456 | <member name="M:SimSharp.FastRandom.NextDouble">
|
---|
| 457 | <summary>
|
---|
| 458 | Generates a random double. Values returned are over the range [0, 1). That is, inclusive of 0.0 and exclusive of 1.0.
|
---|
| 459 | </summary>
|
---|
| 460 | </member>
|
---|
| 461 | <member name="M:SimSharp.FastRandom.NextBytes(System.Byte[])">
|
---|
| 462 | <summary>
|
---|
| 463 | Fills the provided byte array with random bytes.
|
---|
| 464 | This method is functionally equivalent to System.Random.NextBytes().
|
---|
| 465 | </summary>
|
---|
| 466 | </member>
|
---|
| 467 | <member name="M:SimSharp.FastRandom.NextUInt">
|
---|
| 468 | <summary>
|
---|
| 469 | Generates a uint. Values returned are over the full range of a uint,
|
---|
| 470 | uint.MinValue to uint.MaxValue, inclusive.
|
---|
| 471 |
|
---|
| 472 | This is the fastest method for generating a single random number because the underlying
|
---|
| 473 | random number generator algorithm generates 32 random bits that can be cast directly to
|
---|
| 474 | a uint.
|
---|
| 475 | </summary>
|
---|
| 476 | </member>
|
---|
| 477 | <member name="M:SimSharp.FastRandom.NextInt">
|
---|
| 478 | <summary>
|
---|
| 479 | Generates a random int over the range 0 to int.MaxValue, inclusive.
|
---|
| 480 | This method differs from Next() only in that the range is 0 to int.MaxValue
|
---|
| 481 | and not 0 to int.MaxValue-1.
|
---|
| 482 |
|
---|
| 483 | The slight difference in range means this method is slightly faster than Next()
|
---|
| 484 | but is not functionally equivalent to System.Random.Next().
|
---|
| 485 | </summary>
|
---|
| 486 | </member>
|
---|
| 487 | <member name="M:SimSharp.FastRandom.NextDoubleNonZero">
|
---|
| 488 | <summary>
|
---|
| 489 | Generates a random double. Values returned are over the range (0, 1). That is, exclusive of both 0.0 and 1.0.
|
---|
| 490 | </summary>
|
---|
| 491 | </member>
|
---|
| 492 | <member name="M:SimSharp.FastRandom.NextBool">
|
---|
| 493 | <summary>
|
---|
| 494 | Generates a single random bit.
|
---|
| 495 | This method's performance is improved by generating 32 bits in one operation and storing them
|
---|
| 496 | ready for future calls.
|
---|
| 497 | </summary>
|
---|
| 498 | </member>
|
---|
| 499 | <member name="M:SimSharp.FastRandom.NextByte">
|
---|
| 500 | <summary>
|
---|
| 501 | Generates a signle random byte with range [0,255].
|
---|
| 502 | This method's performance is improved by generating 4 bytes in one operation and storing them
|
---|
| 503 | ready for future calls.
|
---|
| 504 | </summary>
|
---|
| 505 | </member>
|
---|
| 506 | </members>
|
---|
| 507 | </doc>
|
---|