Class S3Graph
Object
UIObject
Widget
Panel
SimplePanel
FocusPanel
AbstractGraph<double[]>
S3Graph
- All Implemented Interfaces:
DoubleClickHandler, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasClickHandlers, HasContextMenuHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, MouseDownHandler, MouseMoveHandler, MouseOutHandler, MouseUpHandler, MouseWheelHandler, TouchEndHandler, TouchMoveHandler, TouchStartHandler, HasAttachHandlers, EventHandler, HasHandlers, EventListener, AcceptsOneWidget, Focusable, HasFocus, HasOneWidget, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IsWidget, RequiresResize, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents, SourcesMouseWheelEvents, Iterable<Widget>, AbstractGraph.HasTrajectory, AbstractGraph.Shifter, AbstractGraph.Shifting, AbstractGraph.Zoomer, AbstractGraph.Zooming, ContextMenu.Listener, ContextMenu.Provider, Tooltip.Provider
public class S3Graph
extends AbstractGraph<double[]>
implements AbstractGraph.Zooming, AbstractGraph.Shifting, AbstractGraph.HasTrajectory, DoubleClickHandler
Graph for the simplex \(S_3\). The graph is used to visualize the evolution
of three traits by projecting them onto the corners of the simplex. The view
renders parametric trajectories stored in a
RingBuffer, exposes zoom
and shift interactions, supports swapping trait assignments via a context
menu, and allows exporting to PNG/SVG or CSV.
Responsibilities
- Render a simplex (equilateral-triangle style) frame, subdivided levels,
tick marks and colored corner labels according to a given
S3Map. - Store and draw a time-ordered trajectory of composition vectors in a ring buffer; the buffer entries include time as the first element (internal format: [time, comp0, comp1, comp2, ...]).
- Efficiently sample and append incoming data using a pixel-distance based threshold to avoid storing nearly identical consecutive points.
- Draw start/end markers and arbitrary custom markers; export the stored trajectory in a human-readable CSV-like format.
- Provide user interaction support: double-click and single-touch to set an initial composition, context menus to clear history, swap corner ordering, or remap corners to traits, tooltip support, zooming and shifting behavior provided by the hosting view.
Important behavior notes
- A
S3Mapmust be supplied (viasetMap(S3Map)) to convert between data vectors and simplex/cartesian coordinates. The map also supplies the corner names and color ordering used for labels and export. - Incoming data points are added through
addData(time, data, force). The data array passed to this method is expected to be the composition vector (without time) and will be prepended with the providedtimebefore storing. Iftimeis NaN special handling is applied (replace or append depending on the last stored time). - When a new sample has the same time (within numerical tolerance) as the last stored sample the last sample is replaced and the initial-state (start point) tracking is updated accordingly.
- Buffer sampling threshold is computed in screen pixels (see
calcBounds(int,int)); points closer than the threshold (squared) are not stored unlessforceis true. - Coordinate conversions for mouse/touch interactions map screen
coordinates to scaled simplex coordinates in [0,1] (see
scaledX(double)/scaledY(double)). A hit testinside(double,double)ensures interactions occur only when the pointer is inside the simplex triangle.
Rendering details
- Painting occurs in
paint(boolean)and delegates topaintS3(boolean)which sets up scaling, translation and zooming transforms before drawing. - Trajectory drawing uses the configured stroke styles and optionally draws start (green) and end (red) markers; custom markers may be filled or stroked depending on their metadata.
- The simplex frame supports showing subdivision levels, tick marks and
corner labels. The triangle aspect ratio is constrained so the simplex
appears equilateral (see
SQRT_2).
Context menu and UI interactions
- Right-click (context menu) entries include: Clear history, Swap order of traits along the closest edge, and a submenu to set which trait is assigned to the closest corner when the module exposes more than three traits.
- Double-click and touch events call the host view's
setInitialStatewith the composition corresponding to the clicked location. - Tooltips are provided through an optional
TooltipProvider(the S3Map is set as the tooltip provider bysetMap(S3Map)when available).
Public API highlights
- Constructor:
S3Graph(S3, Module, int)— create widget bound to the provided view and module and associated with a role index. setMap(S3Map)andgetMap()— configure the conversion and label/color semantics for the simplex corners.addData(double, double[], boolean)— append or replace entries in the internal trajectory buffer (time is stored as first element).reset()— reset state and buffers;export(MyContext2d)— render into a provided canvas context (used for exporting images or printing).exportTrajectory(StringBuilder)— append a text representation of the stored trajectory (time and the three corner values in the current map ordering).
Notes and assumptions
- The class assumes three displayed components for the simplex layout,
but uses the provided
S3Map.getOrder()andS3Map.getNames()to support modules with more than three underlying traits (allowing the user to choose which traits are shown at the corners). - The widget depends on host-provided styling flags (contained in
style) to decide which visual elements to draw (ticks, labels, levels, frame, marker sizes, colors, etc.). - All coordinates conversion and painting apply scaling/zoom transforms;
callers should trigger
paint(boolean)when view parameters or data change.
- Author:
- Christoph Hauert
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractGraph
AbstractGraph.HasLogScaleY, AbstractGraph.HasTrajectory, AbstractGraph.MyContext2d, AbstractGraph.Shifter, AbstractGraph.Shifting, AbstractGraph.ZoomCommand, AbstractGraph.Zoomer, AbstractGraph.ZoomingNested classes/interfaces inherited from class UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface HasWidgets
HasWidgets.ForIsWidget -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleThreshold for storing new data point in buffer.private ContextMenuItemThe context menu item to clear the canvas.(package private) Point2DThe lower left corner of the simplex.(package private) Point2DThe lower right corner of the simplex.(package private) Point2DThe upper corner of the simplex.(package private) double[]The starting point of the most recent trajectory.(package private) S3MapThe map for converting data to simplex coordinates (cartesian).private static final doubleThe minimum distance between two subsequent points in pixels.(package private) Path2DThe path that outlines the simplex.(package private) intThe identifier of the role of the data.private ContextMenuThe context menu to select the trait in the closest corner.(package private) static final doubleConstant for \(\sqrt{2}\).private static final StringThe prefix of the swap order menu item.private static final StringThe arrow symbol used in the swap order menu item.private static final StringThe label of the swap order menu item.private ContextMenuItemThe context menu item to swap the order of the traits along the closest edge.Fields inherited from class AbstractGraph
bounds, buffer, canvas, colors, contextMenu, CSS_CURSOR_MOVE_VIEW, CURSOR_GRAB_NODE_CLASS, CURSOR_MOVE_NODE_CLASS, CURSOR_ZOOM_IN_CLASS, CURSOR_ZOOM_OUT_CLASS, DEFAULT_BUFFER_SIZE, doubleClickHandler, element, g, hasMessage, hasZoom, leftMouseButton, logger, logYMenu, markerColors, markers, MIN_BUFFER_SIZE, MIN_MSEC_BETWEEN_UPDATES, module, mouseDownHandler, mouseMoveHandler, mouseOutHandler, mouseUpHandler, mouseWheelHandler, mouseX, mouseY, PIHALF, pinchDist, pinchX, pinchY, scale, shifter, style, tooltip, tooltipProvider, touchEndHandler, touchEndTime, touchMoveHandler, touchStartHandler, updatetime, view, viewCorner, wrapper, zoomer, zoomFactor, zoomInertiaTimer, zoomInMenu, zoomOutMenu, zoomResetMenuFields inherited from class UIObject
DEBUG_ID_PREFIXFields inherited from interface AbstractGraph.Zooming
ZOOM_INCR, ZOOM_MAX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Perform necessary preparations to show the graph in the GUI.private voidaddClearMenu(ContextMenu menu) Helper method to process the clear context menu.voidaddData(double t, double[] data, boolean force) Add data to the graph.private voidaddSetTraitMenu(ContextMenu menu, int x, int y) Helper method to process the select traits submenu.private voidaddSwapOrderMenu(ContextMenu menu, int x, int y) Helper method to process the swap order submenu logic of the context menu.voidcalcBounds(int width, int height) Calculate bounds of drawing area.protected intclosestCorner(double x, double y) Find the corner closest to the point(x, y).protected intclosestEdge(double x, double y) Find the edge closest to the point(x, y).private doubledistSq(double[] vec, double[] buf) Helper method to calculate the distance squared between two vectors.private voiddrawCornerLabels(double width, double height) Draw the corner labels of the simplex in their respective colours.private voiddrawCustomMarkers(double w, double h) Draw any additional markers stored inmarkers.voiddrawFrame(int sLevels) Draws the frame of the simplex.private voidDraw the outline of the simplex.private voiddrawS3Levels(int levels, double width, double height) Draw the subdivision levels of the simplex.private voiddrawS3Ticks(int levels, double width, double height) Draw the ticks along the boundaries of the simplex.private voiddrawStartEndMarkers(double w, double h) Draw start and end markers for the trajectory.private voiddrawTrajectory(double w, double h) Draw the trajectory stored in the buffer.voidExport the graphical contextctx.voidexportTrajectory(StringBuilder export) Export the trajectory of the graph toexport.getMap()Get the map for converting data to simplex coordinates.getTooltipAt(int x, int y) Get the tooltip information for the location with coordinates(x, y).private voidhandleEmptyBuffer(double t, double[] data) Handle the case that the buffer is empty.private voidhandleNaNTime(double[] data, double lastt) Handle the case that the timetisNaN.protected booleaninside(double sx, double sy) Check if point (in scaled user coordinates) lies inside of simplex.voidonDoubleClick(DoubleClickEvent event) protected voidonLoad()voidonTouchStart(TouchStartEvent event) booleanpaint(boolean force) Draw the graph.private voidpaintS3(boolean withMarkers) Paint the trajectory in the simplex.voidpopulateContextMenuAt(ContextMenu menu, int x, int y) Populate context menumenuin listening widget at (relative) position(x,y).private voidprocessInitXY(int x, int y) Helper method to convert screen coordinates into an initial configuration and set the controller's initial state.voidreset()Reset the graph.(package private) doublescaledX(double x) Convert thex-component of the screen coordinates(x, y)into scaled (Cartesian) coordinates in[0, 1].(package private) doublescaledY(double y) Convert they-component of the screen coordinates(x, y)into scaled (Cartesian) coordinates in[0, 1].voidSet the map for converting data to simplex coordinates.private voidswapOrder(int[] order, int i, int j) Helper method to swap two entries in the order array.Methods inherited from class AbstractGraph
addContextMenuHandler, autoscale, calcBounds, clearCanvas, clearGraph, clearHistory, clearMessage, contains, convertToScaledCoordinates, convertToScaledCoordinates, deactivate, displayMessage, doUpdate, drawFrame, drawFrame, fill, fillCircle, fillCircle, fillCircle, fillRect, fillTextVertical, getBuffer, getModule, getStyle, hasHistory, hasMessage, init, onMouseDown, onMouseMove, onMouseOut, onMouseUp, onMouseWheel, onResize, onTouchEnd, onTouchMove, onUnload, paint, parse, prependTime2Data, resetTransforms, setBufferCapacity, setColors, setFont, setLogY, setMarkers, setMarkers, setStrokeStyleAt, setTooltipProvider, shift, stroke, strokeCircle, strokeCircle, strokeCircle, strokeLine, strokeLine, strokeRect, zoom, zoom, zoom, zoomMethods inherited from class FocusPanel
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getTabIndex, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus, setTabIndexMethods inherited from class SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidgetMethods inherited from class Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeMethods inherited from class Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods inherited from class UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AbstractGraph.Shifter
shiftMethods inherited from interface AbstractGraph.Zoomer
zoomMethods inherited from interface AbstractGraph.Zooming
zoom, zoomMethods inherited from interface ContextMenu.Listener
getAbsoluteLeft, getAbsoluteTopMethods inherited from interface HasHandlers
fireEventMethods inherited from interface HasTouchCancelHandlers
addTouchCancelHandlerMethods inherited from interface HasTouchEndHandlers
addTouchEndHandlerMethods inherited from interface HasTouchMoveHandlers
addTouchMoveHandlerMethods inherited from interface HasTouchStartHandlers
addTouchStartHandlerMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface MouseDownHandler
onMouseDownMethods inherited from interface MouseMoveHandler
onMouseMoveMethods inherited from interface MouseOutHandler
onMouseOutMethods inherited from interface MouseUpHandler
onMouseUpMethods inherited from interface MouseWheelHandler
onMouseWheelMethods inherited from interface TouchEndHandler
onTouchEndMethods inherited from interface TouchMoveHandler
onTouchMove
-
Field Details
-
init
double[] initThe starting point of the most recent trajectory. -
e0
Point2D e0The lower left corner of the simplex. -
e1
Point2D e1The lower right corner of the simplex. -
e2
Point2D e2The upper corner of the simplex. -
outline
Path2D outlineThe path that outlines the simplex. -
map
S3Map mapThe map for converting data to simplex coordinates (cartesian). -
role
int roleThe identifier of the role of the data. -
SQRT_2
static final double SQRT_2Constant for \(\sqrt{2}\). Aspect ratio of equilateral triangle.- See Also:
-
bufferThreshold
private double bufferThresholdThreshold for storing new data point in buffer. Roughly corresponds to the squared distance between two points that are at least a pixel apart. -
MIN_PIXELS
private static final double MIN_PIXELSThe minimum distance between two subsequent points in pixels.- See Also:
-
swapOrderMenu
The context menu item to swap the order of the traits along the closest edge. -
clearMenu
The context menu item to clear the canvas. -
setTraitMenu
The context menu to select the trait in the closest corner. -
SWAP_MENU_LABEL
-
SWAP_MENU
-
SWAP_MENU_ARROW
The arrow symbol used in the swap order menu item.- See Also:
-
-
Constructor Details
-
S3Graph
-
-
Method Details
-
onLoad
protected void onLoad()- Overrides:
onLoadin classAbstractGraph<double[]>
-
activate
public void activate()Description copied from class:AbstractGraphPerform necessary preparations to show the graph in the GUI. Attaches mouse and touch handlers for graphs that implementAbstractGraph.ZoomingorAbstractGraph.Shiftinginterfaces.- Overrides:
activatein classAbstractGraph<double[]>- See Also:
-
setMap
Set the map for converting data to simplex coordinates.- Parameters:
map- the conversion map
-
getMap
Get the map for converting data to simplex coordinates.- Returns:
- the conversion map
-
reset
public void reset()Description copied from class:AbstractGraphReset the graph. Clear canvas and messages.- Overrides:
resetin classAbstractGraph<double[]>
-
addData
public void addData(double t, double[] data, boolean force) Add data to the graph. The timetis prepended to the data as the first element.- Parameters:
t- the time of the datadata- the data to addforce-trueto force adding the data- Implementation Notes:
- The data array is cloned and the time prepended before adding it to the buffer.
- In order to conserve memory the data is added only if the
distance between
the new data point and the last point in the buffer is larger
than threshold
bufferThreshold, unlessforce == true.
-
handleEmptyBuffer
private void handleEmptyBuffer(double t, double[] data) Handle the case that the buffer is empty. Add data to the buffer and set the initial state.- Parameters:
t- the time at which the data is recordeddata- the data to add
-
handleNaNTime
private void handleNaNTime(double[] data, double lastt) Handle the case that the timetisNaN. If the last time in the buffer is alsoNaNthe last data point is replaced by the new data, otherwise the new data is appended to the buffer. The initial state is updated accordingly.- Parameters:
data- the data to addlastt- the time of the last data point in the buffer
-
distSq
private double distSq(double[] vec, double[] buf) Helper method to calculate the distance squared between two vectors.- Parameters:
vec- the first vectorbuf- the second vector- Returns:
- the squared distance
-
paint
public boolean paint(boolean force) Description copied from class:AbstractGraphDraw the graph. For re-drawing the graph, setforcetotrue.- Overrides:
paintin classAbstractGraph<double[]>- Parameters:
force-trueto force re-drawing of graph- Returns:
trueif painting skipped
-
paintS3
private void paintS3(boolean withMarkers) Paint the trajectory in the simplex. IfwithMarkersistruethe start and end points of the trajectory are marked with green and red circles, respectively.- Parameters:
withMarkers-trueto mark start and end points
-
drawTrajectory
private void drawTrajectory(double w, double h) Draw the trajectory stored in the buffer.- Parameters:
w- graph widthh- graph height
-
drawStartEndMarkers
private void drawStartEndMarkers(double w, double h) Draw start and end markers for the trajectory.- Parameters:
w- graph widthh- graph height
-
drawCustomMarkers
private void drawCustomMarkers(double w, double h) Draw any additional markers stored inmarkers.- Parameters:
w- graph widthh- graph height
-
export
Description copied from class:AbstractGraphExport the graphical contextctx.- Specified by:
exportin classAbstractGraph<double[]>- Parameters:
ctx- the graphical context to export
-
calcBounds
public void calcBounds(int width, int height) Description copied from class:AbstractGraphCalculate bounds of drawing area.- Overrides:
calcBoundsin classAbstractGraph<double[]>- Parameters:
width- the width of the drawing areaheight- the height of the drawing area
-
drawFrame
public void drawFrame(int sLevels) Draws the frame of the simplex. The corners are marked by the trait names in their respective colours. For visual guidance each side is subdivided intosLevelssublevels.- Parameters:
sLevels- the number of sublevels for the frame
-
drawOutline
private void drawOutline()Draw the outline of the simplex. -
drawS3Levels
private void drawS3Levels(int levels, double width, double height) Draw the subdivision levels of the simplex.- Parameters:
levels- the number of sublevelswidth- the width of the simplexheight- the height of the simplex
-
drawS3Ticks
private void drawS3Ticks(int levels, double width, double height) Draw the ticks along the boundaries of the simplex.- Parameters:
levels- the number of sublevelswidth- the width of the simplexheight- the height of the simplex
-
drawCornerLabels
private void drawCornerLabels(double width, double height) Draw the corner labels of the simplex in their respective colours.- Parameters:
width- the width of the simplexheight- the height of the simplex
-
onDoubleClick
- Specified by:
onDoubleClickin interfaceDoubleClickHandler
-
onTouchStart
Description copied from class:AbstractGraphThe graph reacts to different kinds of touches: short touches or taps (
<250msec) and long touches (>250msec). Long touches trigger different actions depending on the number of fingers:- Single finger
- Initiate shifting the view
- Two fingers
- Initiate pinching zoom.
- Specified by:
onTouchStartin interfaceTouchStartHandler- Overrides:
onTouchStartin classAbstractGraph<double[]>- See Also:
-
scaledX
double scaledX(double x) Convert thex-component of the screen coordinates(x, y)into scaled (Cartesian) coordinates in[0, 1].- Parameters:
x- thex-coordinate on screen- Returns:
- the scaled coordinate
-
scaledY
double scaledY(double y) Convert they-component of the screen coordinates(x, y)into scaled (Cartesian) coordinates in[0, 1].- Parameters:
y- they-coordinate on screen- Returns:
- the scaled coordinate
-
processInitXY
private void processInitXY(int x, int y) Helper method to convert screen coordinates into an initial configuration and set the controller's initial state.- Parameters:
x- thex-coordinate on screeny- they-coordinate on screen
-
getTooltipAt
Description copied from interface:Tooltip.ProviderGet the tooltip information for the location with coordinates(x, y). The returned string may include HTML elements for formatting.- Specified by:
getTooltipAtin interfaceTooltip.Provider- Parameters:
x- thex-coordinate for the tooltipy- they-coordinate for the tooltip- Returns:
- the (formatted) string with the tooltip info
-
inside
protected boolean inside(double sx, double sy) Check if point (in scaled user coordinates) lies inside of simplex.- Parameters:
sx-x-coordinate of pointsy-y-coordinate of point- Returns:
trueif inside
-
populateContextMenuAt
Description copied from class:AbstractGraphPopulate context menumenuin listening widget at (relative) position(x,y).Adds buffer size menu and queries the view to add further functionality.
- Specified by:
populateContextMenuAtin interfaceContextMenu.Provider- Overrides:
populateContextMenuAtin classAbstractGraph<double[]>- Parameters:
menu- context menu entries are added herex- horizontal coordinate (relative to listening widget)y- horizontal coordinate (relative to listening widget)- See Also:
-
addClearMenu
Helper method to process the clear context menu.- Parameters:
menu- the context menu to populate
-
addSwapOrderMenu
Helper method to process the swap order submenu logic of the context menu.- Parameters:
menu- the context menu to populatex- thex-coordinate of the mouse pointery- they-coordinate of the mouse pointer
-
swapOrder
private void swapOrder(int[] order, int i, int j) Helper method to swap two entries in the order array.- Parameters:
order- the order arrayi- the index of the first entryj- the index of the second entry
-
addSetTraitMenu
Helper method to process the select traits submenu. For modules with more than three traits, a submenu is created to allow the user to select the trait for each corner.- Parameters:
menu- the context menu to populatex- thex-coordinate of the mouse pointery- they-coordinate of the mouse pointer
-
closestCorner
protected int closestCorner(double x, double y) Find the corner closest to the point(x, y).- Parameters:
x- thex-coordinate of the pointy- they-coordinate of the point- Returns:
- the index of the closest corner
-
closestEdge
protected int closestEdge(double x, double y) Find the edge closest to the point(x, y).- Parameters:
x- thex-coordinate of the pointy- they-coordinate of the point- Returns:
- the index of the closest edge
-
exportTrajectory
Description copied from interface:AbstractGraph.HasTrajectoryExport the trajectory of the graph toexport.- Specified by:
exportTrajectoryin interfaceAbstractGraph.HasTrajectory- Parameters:
export- the string builder to export the trajectory
-