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
 adjacencies, Node
 adjacentTo, Node
 angle span, Node
 angleRate, Config
 animationTime, Config
 arcThroughTwoPoints, HyperLine
C
 calculateChildrenPositions, HT
 calculatePositions, HT
 canvas
 Canvas
 capturePosition, Mouse
 children, Config
 clear, Canvas
 Complex
 Config
 conjugate, Complex
 correctAngle, HyperLine
D
 depth, Config
 drawMainCircle
 drawn, Node
F
 Functions
G
 getContext, Canvas
 getNodeInfoById, HT
 getPosition
 getSize, Canvas
H
 hasNode, HT
 ht
 HT
 Hyperbolic Tree
 HyperLine
I
 id, Node
 info, Node
 initialize, HT
 initLength
L
 labelContainer, Config
 loadTree, HT
 loadTreeArray, Config
 loadTreeByArray, HT
 loadTreeByJSON, HT
M
 makeLabelsForCenteredNode, HT
 moebiusTransformation
 Mouse
N
 Node
 norm
O
 Objects
P
 pos, Node
 printEdges, HT
 printInfoAsRootOn, Node
 printInfoOn, Node
 printNodesAt, HT
 printNodesRelativeAt, HT
 printOn
 prob, Config
 prod, Complex
 Properties
S
 scale, Complex
 sense, HyperLine
 setDivProperties, Node
 setFlag, HT
 setPosition, Canvas
 showEdges, Config
 showLabels, Config
 showNodes, Config
 squaredNorm, Complex
T
 timeSlot, Config
 toString, Complex
 translate, HT
 translateTo, HT
 translateToCenter, Canvas
V
 Variables
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.
node adjacencies
adjacentTo: function(id)
Indicates if the node is adjacent to the node indicated by the specified id
allowed angle span for adjacencies placement
angle span rate
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
Use this object to store a new Canvas instance.
A multi-purpose Canvas object decorator.
var Canvas= function (canvasId,
fillStyle,
strokeStyle)
Canvas initializer.
capturePosition: function(e)
Captures mouse position.
for non-JSON generated trees: number of children
clear: function ()
Clears the canvas object.
A multi-purpose Complex Class with common methods.
var Complex= function()
Complex constructor.
Hyperbolic Tree configuration object.
conjugate: function()
Returns the conjugate por this complex.
correctAngle: function(relTo,
dot,
angle)
For private use only: corrects angle value based on quadrant.
for non-JSON generated trees: tree depth
drawMainCircle: function ()
Draws the boundary circle for the Hyperbolic Tree.
show/hide main circle
Node flag
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
Use this object to store a new HT instance.
Hyperbolic Tree (HT) class.
var HT= function(config,
canvas)
Creates a new HT instance.
Sets of classes and objects to plot and calculate a hyperbolic tree.
The HyperLine class allows you to draw “lines” on the Poincare’s disk model for Hyperbolic Geometry.
var HyperLine= function(p1,
p2)
HyperLine constructor.
additional node information
initialize: function ()
Loads parameters and places the HT.
initial edge length
node distance to center
id for label container
loadTree: function ()
Loads an HT with the depth, children and prob parameters stored in the Config object.
for non-JSON generated trees: customizeable array of nodes per depth level
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.
A multi-purpose Mouse class.
Behaviour of the hyperbolic tree node.
function Node (id,
info)
Node constructor.
norm: function ()
Calculates the complex norm.
norm: function ()
Calculates node’s distance to origin.
In this section you’ll find the objects that you must use in order to make a Canvas or HyperbolicTree instance.
node position
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.
for non-JSON generated trees: probability of edge creation
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.
show/hide edges
show/hide labels, must be set to false if the nodes have no additional info.
show/hide nodes
squaredNorm: function ()
Calculates the complex squared norm.
time slot for animation frame
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.