Retrieve the embedded coordinate given a node ID.
Retrieve the embedded coordinate given a node ID.
Embedded coordinate
Dimension of the system
Dimension of the system
Query the embedded distance given two node IDs.
Query the embedded distance given two node IDs.
ID of the source node
ID of the destination node
Estimated distance between source and destination
Java API for embed.
Java API for embed.
If you would like to use random selection of primary landmarks, set "primaries" to null.
All work done will be forwarded to the Scala version of embed. This method simply converts data structures to the Scala equivalent before passing it along.
A set of landmark IDs
Contains IDs of primary landmarks to embed - pass null for default
Embeds a set of distances into the coordinate system.
Embeds a set of distances into the coordinate system.
Embeds a set of distances into the coordinate system - all work is forwarded to embedLandmarks and embedNonLandmark.
DistanceStore implementation containing distance values to embed
A set of landmark IDs
Optional parameter denoting primary landmarks to embed first
Java API for embedLandmarks.
Java API for embedLandmarks.
If you would like to use random selection of primary landmarks, set "primaries" to null.
All work done will be forwarded to the Scala version of embedLandmarks. This method simply converts data structures to the Scala equivalent before passing it along.
A set of landmark IDs
Contains IDs of primary landmarks to embed - pass null for default
DistanceStore implementation containing distance values to embed
Embed the landmarks into the coordinate system.
Embed the landmarks into the coordinate system.
Embed both primary and non-primary landmarks into the coordinate system. This function should only be called once per instantiation, enforced by the LANDMARKS_EMBEDDED flag.
Primary landmarks by default are chosen randomly. The number of such primary landmarks is set by default at 16. This value can be overridden in application.conf via gcs.embed.primary-landmarks.
If the primaries parameter is passed in, it will override the configuration files.
A set of landmark IDs
Optional parameter denoting primary landmarks to embed first
DistanceStore implementation containing distance values to embed
Embeds non-landmark into the coordinate system.
Embeds non-landmark into the coordinate system.
Embeds a non-landmark into the coordinate system by randomly selecting X amount of "neighbor" landmarks to align against. By default X is set to 16. This can be overridden via config with gcs.embed.neighbors.
ID of the node to embed
DistanceStore implementation containing distance values to embed
coordinates of the embedded non-landmark
Measure how much an embeding of landmarks deviates from optimum
Measure how much an embeding of landmarks deviates from optimum
(|estimated - groundtruth| / groundtruth)^2 is the function used for the difference between one node and landmark
The ids of landmarks to embed
An ObjectiveFunction to be used with an optimizer
Loads a set of coordinates from a given file.
Loads a set of coordinates from a given file.
File should be formatted such that each row represents the embedding of a single node. The format for each row should look like (using the Array[Double] view):
[L/N if (non-)landmark] [Node ID] [Coordinate 1] ... [Coordinate N]
Path of the file containing the formatted coordinates.
Measure how much distances from a node to landmarks deviate
Measure how much distances from a node to landmarks deviate
(|estimated - groundtruth| / groundtruth)^2 is the function used for the difference between one node and landmark
The distances between a node and a landmark
The actual coordinates of the landmarks
An ObjectiveFunction to be used with an optimizer
Optimize a set of landmarks against each other
Optimize a set of landmarks against each other
The ids of landmarks to embed
The distance store
The dimension of the space we are working in
A sequence of points where the distances between any two points is as close as possible to the desired distance
Optimize a node against a set of landmarks
Optimize a node against a set of landmarks
A sequence of pairs of ids and points
The dimension of the space we are working in
A point who's distance to each point is as close as possible to the distance associated with the point
Query the embedded distance given two node IDs.
Query the embedded distance given two node IDs.
ID of the source node
ID of the destination node
Estimated distance between source and destination
Require an implicit sand.gcs.coordinate.DistanceComputable of the type parameter in scope.
Require an implicit sand.gcs.coordinate.DistanceComputable of the type parameter in scope.
This essentially puts a context bound on CoordType, allowing for a Typeclass Pattern on a trait. We keep this a trait instead of an abstract class to use the Cake Pattern as well.
Typeclass implementation of sand.gcs.coordinate.DistanceComputable
Saves the sand landmark and node embeddings of the coordinate system.
Saves the sand landmark and node embeddings of the coordinate system.
File saved will be formatted as (using the Array[Double] view):
[L/N if (non-)landmark] [Node ID] [Coordinate 1] ... [Coordinate N]
Path of the file to save the coordinates into.
Implementation of the Rigel GCS (Hyperbolic Space).
Implementation of the Rigel graph coordinate system which embeds distances in an n-dimensional Hyperbolic space, using the Nelder-Mead method of optimizing the alignment of nodes.