Function Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 add, Complex
 addAdjacence, HT
 addAdjacency, Node
 addNode, HT
 adjacentTo, Node
 arcThroughTwoPoints, HyperLine
C
 calculateChildrenPositions, HT
 calculatePositions, HT
 Canvas, Canvas
 capturePosition, Mouse
 clear, Canvas
 Complex, Complex
 conjugate, Complex
 correctAngle, HyperLine
D
 drawMainCircle, Canvas
G
 getContext, Canvas
 getNodeInfoById, HT
 getPosition
 getSize, Canvas
H
 hasNode, HT
 HT, HT
 HyperLine, HyperLine
I
 initialize, HT
L
 loadTree, HT
 loadTreeByArray, HT
 loadTreeByJSON, HT
M
 makeLabelsForCenteredNode, HT
 moebiusTransformation
N
 Node, Node
 norm
P
 printEdges, HT
 printInfoAsRootOn, Node
 printInfoOn, Node
 printNodesAt, HT
 printNodesRelativeAt, HT
 printOn
 prod, Complex
S
 scale, Complex
 sense, HyperLine
 setDivProperties, Node
 setFlag, HT
 setPosition, Canvas
 squaredNorm, Complex
T
 toString, Complex
 translate, HT
 translateTo, HT
 translateToCenter, Canvas
add: function(pos)
Returns the result of adding two complex numbers.
addAdjacence: function (id1,
id2)
Connects nodes specified by id1 and id2.
addAdjacency: function(id)
Connects the node to the specified by id.
addNode: function(id,
info)
Adds a node.
adjacentTo: function(id)
Indicates if the node is adjacent to the node indicated by the specified id
arcThroughTwoPoints: function()
For private use only.
calculateChildrenPositions: function(queue)
Intended for private use: calculates positions for children and grandchildren of root node.
calculatePositions: function(id)
Intended for private use: calculates node positions on canvas by performing a BFS-like algorithm
var Canvas= function (canvasId,
fillStyle,
strokeStyle)
Canvas initializer.
capturePosition: function(e)
Captures mouse position.
clear: function ()
Clears the canvas object.
var Complex= function()
Complex constructor.
conjugate: function()
Returns the conjugate por this complex.
correctAngle: function(relTo,
dot,
angle)
For private use only: corrects angle value based on quadrant.
drawMainCircle: function ()
Draws the boundary circle for the Hyperbolic Tree.
getContext: function ()
Canvas context handler.
getNodeInfoById: function(ide)
Returns a node info property.
getPosition: function()
Canvas absolute position to the HTML document.
getPosition: function (canvas)
Returns mouse position relative to canvas.
getSize: function ()
An object that contains the canvas width and height.
hasNode: function(id)
Returns a Boolean instance indicating if node belongs to graph or not.
var HT= function(config,
canvas)
Creates a new HT instance.
var HyperLine= function(p1,
p2)
HyperLine constructor.
initialize: function ()
Loads parameters and places the HT.
loadTree: function ()
Loads an HT with the depth, children and prob parameters stored in the Config object.
loadTreeByArray: function ()
Loads an HT with the loadTreeArray parameter stored in the Config object.
loadTreeByJSON: function (json_array)
makeLabelsForCenteredNode: function ()
Creates and displays labels for the centered node and its adjacent nodes.
moebiusTransformation: function(theta,
c)
Calculates a moebius transformation for this point / complex.
moebiusTransformation: function(theta,
c)
Calculates a moebius transformation for the hyperbolic tree.
function Node (id,
info)
Node constructor.
norm: function ()
Calculates the complex norm.
norm: function ()
Calculates node’s distance to origin.
printEdges: function()
Prints graph / tree edges
printInfoAsRootOn: function (id,
canvas)
Creates a label containing the root node information.
printInfoOn: function (id,
canvas)
Creates a label containing the node information.
printNodesAt: function(at)
Used for drawing the HT on a frame
printNodesRelativeAt: function(at)
Prints the HT nodes after being translated to a relative position.
printOn: function(canvas)
Prints the HT on canvas
printOn: function(canvas)
Draws the HyperLine on canvas.
printOn: function(canvas)
Plots the node on canvas.
prod: function(pos)
Returns the result of multiplying two complex numbers.
scale: function(factor)
Returns the result of scaling a Complex instance.
sense: function(angleBegin,
angleEnd)
For private use only: sets angle direction to clockwise (true) or counterclockwise (false).
setDivProperties: function(cssClass,
canvas,
key)
Intended for private use: sets some label properties, such as positioning and className.
setFlag: function (val)
For private use: sets a flag.
setPosition: function()
Calculates canvas absolute position on HTML document.
squaredNorm: function ()
Calculates the complex squared norm.
toString: function ()
Returns a string that shows the Complex properties.
translate: function (Mouse)
Translates the HT to the mouse position.
translateTo: function(complexTo,
millisec)
Tranlates the HT to a given position
translateToCenter: function()
Translates canvas coordinates system to the center of the canvas object.