Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort Class Reference

Collaboration diagram for com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ComponentInfoTopologicalSort (int capacity) throws IllegalArgumentException
 ComponentInfoTopologicalSort (HandleDataStore dataStore)
void insert (ComponentInfoVertex element)
ComponentInfoVertex extract ()
ComponentInfoVertex peek ()
int size ()
void clear ()

Static Public Member Functions

List sort (HandleDataStore handleDataStore)

Protected Member Functions

final int parent (int k)
final int left (int k)
final int right (int k)
void downheap (ComponentInfoVertex element, int k)
ComponentInfoVertex heapExtract ()

Protected Attributes

ComponentInfoVertex[] nodes
int count = 0
IntHashMap handleToHashIndexMap
HandleDataStore handleDataStore

Private Member Functions

HashSet generateImmortalChainMap (HandleDataStore dataStore)
void markImmortalChain (HashSet immortalChainMap, HandleDataStore dataStore, int marker)

Detailed Description

An implementation of topological sort operating on ComponentInfo handle data store.


Constructor & Destructor Documentation

com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::ComponentInfoTopologicalSort int  capacity  )  throws IllegalArgumentException [inline]
 

Create a Heap with the given initial capacity and comparator.

Parameters:
capacity initial heap capacity.
cmp comparator used to compare objects, if null natural ordering is used
Exceptions:
IllegalArgumentException if capacity less than zero

com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::ComponentInfoTopologicalSort HandleDataStore  dataStore  )  [inline]
 

Constructor.

Parameters:
dataStore ComponentInfo handle data store instance to sort.


Member Function Documentation

void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::clear  )  [inline]
 

Remove all elements.

void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::downheap ComponentInfoVertex  element,
int  k
[inline, protected]
 

Parameters:
element 
k 

ComponentInfoVertex com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::extract  )  [inline]
 

Return and remove least element, or null if empty.

Returns:
least element (min).

HashSet com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::generateImmortalChainMap HandleDataStore  dataStore  )  [inline, private]
 

Generate immortal chain.

Parameters:
dataStore ComponentInfo handle data store instance to sort.
Returns:
set of components (immportal or components which clients are immortal components).

ComponentInfoVertex com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::heapExtract  )  [inline, protected]
 

Return and remove least element, or null if empty.

Returns:
least element (min).

void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::insert ComponentInfoVertex  element  )  [inline]
 

Insert an element, resize if necessary.

Parameters:
element object to be insterted.

final int com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::left int  k  )  [inline, protected]
 

Return left child node.

Parameters:
k index of a parent node.

void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::markImmortalChain HashSet  immortalChainMap,
HandleDataStore  dataStore,
int  marker
[inline, private]
 

DSF algrithm to generate immortal chain.

Parameters:
immortalChainMap set of components (immportal or components which clients are immortal components).
dataStore ComponentInfo handle data store instance to sort.
marker handle of the object which identifies member of immortal chain.

final int com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::parent int  k  )  [inline, protected]
 

Return parent node of the child.

Parameters:
k index of a child node.

ComponentInfoVertex com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::peek  )  [inline]
 

Return least element without removing it, or null if empty

Returns:
least element (min).

final int com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::right int  k  )  [inline, protected]
 

Return right child node.

Parameters:
k index of a parent node.

int com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::size  )  [inline]
 

Return number of elements.

Returns:
number of elements

List com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::sort HandleDataStore  handleDataStore  )  [inline, static]
 

Topological sort on ComponentInfo handle data store.

Parameters:
handleDataStore ComponentInfo handle data store
Returns:
topologically sorted list.


Member Data Documentation

int com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::count = 0 [protected]
 

Number of used slots.

HandleDataStore com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::handleDataStore [protected]
 

Handle data store.

IntHashMap com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::handleToHashIndexMap [protected]
 

Handle to hash index lookups.

ComponentInfoVertex [] com::cosylab::acs::maci::manager::ComponentInfoTopologicalSort::nodes [protected]
 

The tree nodes, packed into an array.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:11:19 2009 for ACS Java API by doxygen 1.3.8