Global

Methods

addNode()

Adds a node and generates random points around it. Creates an event listener for the plot area. If event is left-click, add node. If event is "escape", cancel.
Source:

addSampleSensors()

Add additional sensors to data.
Source:

changeColorScale(selected)

Change the edge or face color scale
Parameters:
Name Type Description
selected string Which color scale to use.
Source:

changeComplex()

Toggle between Vietoris-Rips and Čech complexes.
Source:

changeDataRadius(val)

Change the radius of uncertainty and update display. Also update coverage circles and update display.
Parameters:
Name Type Description
val number The new radius of uncertainty.
Source:

changeNumberSampleSensors()

Allow user to change the number of sensors.
Source:

clearScreen()

Clear canvas and reset all variables to their default values.
Source:

constructCech()

Construct the Čech complex. For each face determined from the Vietoris-Rips complex, test whether all three points have a common intersection. Computes a probability for each face.
Source:

constructEdges() → {Object}

Compute probability of edge (lines) for all n choose 2 permutations of locations.
Source:
Returns:
Type
Object

constructRips()

Compute Vietoris-Rips complex. Determine 2-faces (triangles) from location data. Computes a probability for each face. A face exists for each n choose 3 permutation of points for which each point is pairwise connected by an edge.
Source:

createFaceLengend()

Create face legend based on selected color scale.
Source:

createRandomPoints(d) → {Array}

Create random points for each data location. Points are uniform random within the radius of uncertainty from anchor.
Parameters:
Name Type Description
d Object An object with the fields x and y containing the anchor location.
Source:
Returns:
An array of objects with the fields x and y containing the location of each random point.
Type
Array

dataLoader(file)

Load formatted JSON data from local file system
Parameters:
Name Type Description
file string The path to the local file
Source:

dragEnd()

Called after a point is dragged. Updates locations and recomputes simplicial complex.
Source:

dragNode()

Drag a node location. Individual points, if displayed, will move along with anchor.
Source:

hideToolTip()

Hides object probability.
Source:

highlightEdge()

Highlight edge and it's corresponding points.
Source:

highlightFace()

Highlight face along with it's corresponding edges and points.
Source:

highlightPoint()

Highlights a data point on mouseover or when corresponding edge or face is highlighted.
Source:

importData()

Import anchor locations from a CSV file.

Files must contain, at a minimum, a column labeled "xf" and a column labeled "yf" with scalar values corresponding to the anchor coordinates.
Source:

loadData()

Allow user to select file from local system and load data.
Source:

nodeSelector()

Delete selected nodes, recompute simplicial complexes and re-render or, if escape pressed, unselect points.
Source:

perturbData()

Calls the createRandomPoints function on each anchor location in locationData.
Source:

randomData()

Generate uniform random anchor locations.
Source:

renderAllEdges()

Render individual edges. These are the actual data points for each location that meet the coverage criteria (i.e. have overlapping coverage circles).
Source:

renderComplex(edges, faces)

Renders the probabilistic simplicial complexes generated by constructCech() or constructRips
Parameters:
Name Type Description
edges array An object array containing the edges, must contain the following fields: Pt1, Pt2, Pedge
faces array An object array containing the faces, must contain the following fields: Pt1, Pt2, Pt3, Pface
Source:

renderEdges()

Renders edges for selected simplicial complex. Colors bundled edges based on probability.
Source:

renderFaces()

Renders faces for selected simplicial complex. Colors faces based on probability.
Source:

renderGrid()

Render gridlines for every tick mark on axes.
Source:

renderPoints()

Render all anchor points, individual points, coverage circles and radius of uncertainty.
Source:

renderView()

Render data. Checks the interface for which layers are to be displayed and calls the appropriate rendering functions.
Source:

resetCheckboxes()

Resets display checkboxes to their default values.
Source:

resetEdge()

Reset edge to default color based on selected color scale.
Source:

resetFace()

Reset face to default color based on selected color scale.
Source:

resetPoint()

Resets data point to default color as defined by current color scale.
Source:

saveData()

Save data to a JSON file.
Source:

selectNode()

Select and highlight a node for possible deletion.
Source:

setMax()

Allows user to manually set maximum coverage radius.
Source:

show(state, type)

Toggle display
Parameters:
Name Type Description
state Boolean Show if true, hide if false.
type String Which type of object to display: circle, line, or polygon
Source:

showCoverage(d)

Display or hide coverage circles.
Parameters:
Name Type Description
d Boolean Show if true, hide if false.
Source:

showToolTip(type, data)

Displays probability of selected edge or face
Parameters:
Name Type Description
type string Must be 'Edge' or 'Face'
data number The probability of the object.
Source:

sqEuclidDist(pt1, pt2) → {number}

Calculate squared euclidean distance between 2 data points.
Parameters:
Name Type Description
pt1 Array 2-element array with coordinates of first data point.
pt2 Array 2-element array with coordinates of second data point.
Source:
Returns:
Type
number

updateComplex(newValue)

Called whenever the data are changed. Updates the coverage radius and recomputes simplicial complexes.
Parameters:
Name Type Description
newValue number The new coverage radius.
Source:

updateNode(coords)

Update node location after drag and drop. Update anchor location and individual points.
Parameters:
Name Type Description
coords array 2-element array with new node coordinates.
Source:

updateScales(xMin, xMax, yMin, yMax)

Update the display limits.
Parameters:
Name Type Description
xMin number The minimum x-value to display.
xMax number The maximum x-value to display.
yMin number The minimum y-value to display.
yMax number The maximum y-value to display.
Source:

zoomed()

Change scales and zoom plot area.
Source: