Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/19 13:45:11 (5 years ago)
Author:
abeham
Message:

#2975: Updated Sim# to 3.1.1

Location:
trunk/HeuristicLab.ExtLibs/HeuristicLab.SimSharp/3.1.1
Files:
1 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.ExtLibs/HeuristicLab.SimSharp/3.1.1/SimSharp-3.1.1/Collections/EventQueue.cs

    r15972 r16779  
    66  /// <summary>
    77  /// An implementation of a min-Priority Queue using a heap.  Has O(1) .Contains()!
    8   /// See https://bitbucket.org/BlueRaja/high-speed-priority-queue-for-c/wiki/Getting%20Started for more information
     8  /// See https://github.com/BlueRaja/High-Speed-Priority-Queue-for-C-Sharp/wiki/Getting-Started for more information
    99  /// </summary>
    1010  /// <remarks>
     
    4848    /// Removes every node from the queue.  O(n) (So, don't do this often!)
    4949    /// </summary>
    50 #if AGGRESSIVE_INLINING
    51         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    52 #endif
     50    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    5351    public void Clear() {
    5452      Array.Clear(_nodes, 1, _numNodes);
     
    5957    /// Returns (in O(1)!) whether the given node is in the queue.  O(1)
    6058    /// </summary>
    61 #if AGGRESSIVE_INLINING
    62         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    63 #endif
     59    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    6460    public bool Contains(EventQueueNode node) {
    6561      return (_nodes[node.QueueIndex] == node);
     
    6965    /// Enqueue a node - .Priority must be set beforehand!  O(log n)
    7066    /// </summary>
    71 #if AGGRESSIVE_INLINING
    72         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    73 #endif
     67    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    7468    public EventQueueNode Enqueue(DateTime primaryPriority, Event @event, int secondaryPriority = 0) {
    7569      var node = new EventQueueNode {
     
    8478      return node;
    8579    }
    86 
    87 #if AGGRESSIVE_INLINING
    88         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    89 #endif
     80   
     81    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    9082    private void Swap(EventQueueNode node1, EventQueueNode node2) {
    9183      //Swap the nodes
     
    115107    }
    116108
    117 #if AGGRESSIVE_INLINING
    118         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    119 #endif
     109
     110    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    120111    private void CascadeDown(EventQueueNode node) {
    121112      //aka Heapify-down
     
    170161    /// Note that calling HasHigherPriority(node, node) (ie. both arguments the same node) will return false
    171162    /// </summary>
    172 #if AGGRESSIVE_INLINING
    173         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    174 #endif
     163
     164    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    175165    private bool HasHigherPriority(EventQueueNode higher, EventQueueNode lower) {
    176166      return (higher.PrimaryPriority < lower.PrimaryPriority ||
     
    204194    /// O(log n)
    205195    /// </summary>
    206 #if AGGRESSIVE_INLINING
    207         [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    208 #endif
     196
     197    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    209198    public void UpdatePriority(EventQueueNode node, DateTime primaryPriority, int secondaryPriority) {
    210199      node.PrimaryPriority = primaryPriority;
Note: See TracChangeset for help on using the changeset viewer.