Data dictionary for Prototype 01

clusterArray

An array, an array of objects to store the cluster data. Each object has the following properties:
  1. (implicit is row number: the array index less 1)
  2. itemA first leaf or cluster in the cluster
  3. itemB second leaf or cluster in the cluster
  4. mergeH (short for mergeHieght)
  5. redrawn - boolean, true if was redrawn, else false
e.g from our data table The first cluster goes in clusterArray[0]so clusterArray[0].itemA = 1; clusterArray[0].itemB = 6;clusterArray[0].mergeH = 0; clusterArray[0].redrawn = 0;

clusterArrayPtr

Indicates the current row of the clusterArray being processed //set the array pointer to -1 to indicate empty dendrogram

lastDataRow

Indicates the size of the data set for loop control, e.g.
lastDataRow=5

iterationCount

To watch for infinite looping in the drawing iterations

backtrackCount

To watch for drawing backtracking

largestHt

largest mergeH used to decide the size of the canvas, e.g.
largestHt=0;

noOfLeafs

Used to help dimension the canvas and graph, e.g.
noOfLeafs=lastDataRow+1;

leafSpace

Used to help dimension the canvas and graph, e.g.
leafSpace=15

startingSlot

Sets the slot to place the first leaf
startingSlot=noOfLeafs/2 rounded down to nearest whole number

minLeafSlot

Sets the smallest allowed leaf slot
minLeafSlot=1

maxLeafSlot

Sets the largest allowed leaf slot
maxLeafSlot=noOfLeafs+1;

leftMostNodeY

tracks top and bottom of dendrogram along with rightMostNodeY
leftMostNodeY=startingSlot

rightMostNodeY

tracks top and bottom of dendrogram along with leftMostNodeY
rightMostNodeY=startingSlot

standardLeafRadius

Sets the standard Leaf Radius for a leaf node circle
standardLeafRadius= 4

htScaleFactor

No of pixels per mergeHt unit. Used to help dimension the canvas and graph, e.g.
htScaleFactor=100

margin

Gap between graph and edge of canvas. Used to help dimension the canvas and graph, e.g.
margin=50

canvasX

Width of the canvas e.g.
canvasX=(largestHt*htScaleFactor)+(margin*2);

canvasY

Ht of the canvas e.g.
canvasY=((noOfLeafs)*leafSpace)+(margin*2);

paper

To declare and draw the canvas e.g.
var paper = new Raphael(document.getElementById('canvas_container'), canvasX, canvasY);

origin

Used in drawing the graph e.g.
origin=makePt(margin,margin);// gives us origin.x and origin.y

xAxis

the xAxis of the graph e.g.
var xAxis=drawXAxis(paper, origin, canvasX-margin-margin, htScaleFactor/2 );

yAxis

the yAxis of the graph e.g.
var yAxis= paper.path("M "+origin.x+" "+origin.y+"l 0 "+(canvasY-margin-margin));

xAxisLabelMax

label for xAxis of the graph e.g.
var xAxisLabelMax = paper.text((largestHt*htScaleFactor+margin), margin-10, 'Max ht = '+largestHt);

originLabel

label for origin of the graph e.g.
var originLabel = paper.text((margin), margin-10, '0');

yAxixLabel

label for yAxis of the graph e.g.
var yAxixLabel= paper.text(15, Math.round(canvasY/2), 'Leafs');

deArray

dendrogramElementArray or deArray for short. There are 3 types of element: Each deArray object has the following properties:

deArrayPointer

a pointer to the most recent successfully drawn element e.g.
deArrayPointer=-1;//-1 indicates empty dendrogram