Header menu logo F# Header menu logo Averest

ParallelMerging Module

This module implements a teaching tool for parallel merge sort

Functions and values

Function or value Description

ParallelMergeSort x

Full Usage: ParallelMergeSort x

Parameters:
    x : int[]

Returns: int array

Parallel merge sort is simply based on a recursive application of a parallel merging algorithm: We spit the given list into two halves, sort them recursively, and merge the obtained sorted lists with the parallel merging algorithm.

x : int[]
Returns: int array

ParallelMerging a b

Full Usage: ParallelMerging a b

Parameters:
    a : int[]
    b : int[]

Returns: int[]

Parallel merging of two sorted lists is done by partitioning these lists into pairs of B blocks (a[i(k)..i(k+1)-1],b[j(k)..j(k+1)-1]) so that the concatenation of these merged blocks results in the sorted sequence. Clearly, the merging of the pairs (a[i(k)..i(k+1)-1],b[j(k)..j(k+1)-1]) can be done in parallel.

a : int[]
b : int[]
Returns: int[]

ParallelMergingTool qscoll

Full Usage: ParallelMergingTool qscoll

Parameters:

This function is to be called by a teaching tool's html page. It will parse a general simplex problem, will solve it and print the results to the html page.

qscoll : NameValueCollection

Ranking a b

Full Usage: Ranking a b

Parameters:
    a : int[][]
    b : int[][]

Returns: bool[][] * int[] * int[] * bool[][] * int[] * (int[] * int array)[]

Ranking determines the ranks of a in b, i.e., we partition array a into blocks a[i*N..(i+1)*N-1] with N:=sqrt(a.Length) and then determine a partition of array b such that the pairs of block (a[i],b[i]) can be used for parallel merging, i.e., once these blocks were merged into a sorted sequence, their concatenation yields the sorted list of the given array a and b.

a : int[][]
b : int[][]
Returns: bool[][] * int[] * int[] * bool[][] * int[] * (int[] * int array)[]

SequentialMerging a b

Full Usage: SequentialMerging a b

Parameters:
    a : int[]
    b : int[]

Returns: int[]
a : int[]
b : int[]
Returns: int[]

outStr

Full Usage: outStr

Returns: TextWriter option
Returns: TextWriter option

Type something to start searching.