src/main/java/com/mxgraph/analysis/mxFibonacciHeap.java
public static mxFibonacciHeap union(mxFibonacciHeap h1, mxFibonacciHeap h2)
	{
		mxFibonacciHeap h = new mxFibonacciHeap();

		if ((h1 != null) && (h2 != null))
		{
			h.min = h1.min;

			if (h.min != null)
			{
				if (h2.min != null)
				{
					h.min.right.left = h2.min.left;
					h2.min.left.right = h.min.right;
					h.min.right = h2.min;
					h2.min.left = h.min;

					if (h2.min.key < h1.min.key)
					{
						h.min = h2.min;
					}
				}
			}
			else
			{
				h.min = h2.min;
			}

			h.size = h1.size + h2.size;
		}

		return h;
	}
/**
	 * Joins two Fibonacci heaps into a new one. No heap consolidation is
	 * performed at this time. The two root lists are simply joined together.
	 * 
	 * <p>
	 * Running time: O(1) actual
	 * </p>
	 * 
	 * @param h1 The first heap.
	 * @param h2 The second heap.
	 * @return Returns a new heap containing h1 and h2.
	 */
Joins two Fibonacci heaps into a new one. No heap consolidation is
performed at this time. The two root lists are simply joined together.



@param h1 The first heap.
@param h2 The second heap.
@return Returns a new heap containing h1 and h2.
Joins two Fibonacci heaps into a new one . No heap consolidation is performed at this time . The two root lists are simply joined together . @param h1 The first heap . @param h2 The second heap . @return Returns a new heap containing h1 and h2 .
public static mxFibonacciHeap union(mxFibonacciHeap h1, mxFibonacciHeap h2)
	{
		mxFibonacciHeap h = new mxFibonacciHeap();
		if ((h1 != null) && (h2 != null))
		{
			h.min = h1.min;
			if (h.min != null)
			{
				if (h2.min != null)
				{
					h.min.right.left = h2.min.left;
					h2.min.left.right = h.min.right;
					h.min.right = h2.min;
					h2.min.left = h.min;
					if (h2.min.key < h1.min.key)
					{
						h.min = h2.min;
					}
				}
			}
			else
			{
				h.min = h2.min;
			}
			h.size = h1.size + h2.size;
		}
		return h;
	}
public static mxFibonacciHeap union ( mxFibonacciHeap h1 , mxFibonacciHeap h2 ) { mxFibonacciHeap h = new mxFibonacciHeap ( ) ; if ( ( h1 != null ) && ( h2 != null ) ) { h . min = h1 . min ; if ( h . min != null ) { if ( h2 . min != null ) { h . min . right . left = h2 . min . left ; h2 . min . left . right = h . min . right ; h . min . right = h2 . min ; h2 . min . left = h . min ; if ( h2 . min . key < h1 . min . key ) { h . min = h2 . min ; } } } else { h . min = h2 . min ; } h . size = h1 . size + h2 . size ; } return h ; }
Joins two Fibonacci heaps into a new one.
Joins two Fibonacci heaps into a new one .