rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Graph Layout Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvQuickSort Class Reference

A generic quick sort algorithm. More...

#include <ilviews/layout/util/quicksort.h>

Inherited by IlvIncidentLinksSorter.

List of all members.

Public Member Functions

 IlvQuickSort (IlInt size=0)
void sort (IlInt=-1)

Protected Member Functions

virtual IlBoolean compare (IlUInt loc1, IlUInt loc2)=0
virtual void swap (IlUInt, IlUInt)=0

Detailed Description

A generic quick sort algorithm.

Library: ilvlayout


Constructor & Destructor Documentation

IlvQuickSort::IlvQuickSort ( IlInt  size = 0  ) 

Creates a new instance of the quicksort.

Parameters:
size The number of elements to be sorted.

Member Function Documentation

virtual IlBoolean IlvQuickSort::compare ( IlUInt  loc1,
IlUInt  loc2 
) [protected, pure virtual]

Compares two elements. For ascendant sort, must return IlTrue if element(loc1) <= element(loc2), IlFalse otherwise. For descendent sort, must return IlTrue if element(loc1) >= element(loc2), IlFalse otherwise.

void IlvQuickSort::sort ( IlInt  = -1  ) 

Performs the quicksort.

virtual void IlvQuickSort::swap ( IlUInt  ,
IlUInt   
) [protected, pure virtual]

Swaps two elements.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.