The Dendrogrammer Code Documentation

dendrogrammer  Dendrogrammer version 1.0.3

The Dendrogrammer > dendrogrammer > GroupList

Class GroupList

The group list contains a list of the groups formed from drawing a similarity threshold on the dendrogram. The list is an array of Groups. The GroupList methods are for interrogating, traversing, adding to and removing from the list.

Constructor

GroupList ( thresholdIn )
Parameters:
thresholdIn <number> the mergeHt set to define the groups

Methods

addToEnd

void addToEnd ( groupIn )
Adds a group to the list
Parameters:
groupIn <Group object> the group to be added
Returns: void

getCurrent

Group object getCurrent ( )
Returns the currently pointed to group in the list

Returns: Group object

getFirst

Group object getFirst ( )
Returns the first group in the list

If the list is not empty set pointer to first item and return the first item
else null
Returns: Group object

getLast

Group object getLast ( )
Returns the last group in the list

if the list is not empty set pointer to last item and return the last item
else null
Returns: Group object

getNext

Group object getNext ( )
Returns the next group in the list

If pointer is less then the list length-1 then increments pointer and returns the item else returns null
Returns: Group object

getSize

number getSize ( )
Returns the length of the list
Returns: number

isEmpty

boolean isEmpty ( )
Returns true if ther are no items in the list
Returns: boolean

removeFromEnd

Group object removeFromEnd ( )
Removes a group from the list
Returns: Group object
the popped group

reset

boolean reset ( )
Resets the group list to be empty and undraws the bands
Returns: boolean
but value not used.

resetButLeaveCanvasAlone

boolean resetButLeaveCanvasAlone ( )
Resets the group list to be empty but leaves the canvas alone. Used if no bands have been drawn
Returns: boolean
but value not used.


The Dendrogrammer © 2011 D.Robb (See Readme for MIT licence). These pages were created with YUIDoc Copyright © 2011 Yahoo! Inc. All rights reserved.