You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
478 B
JavaScript

(function (exports) {
'use strict';
/**
* Graph edge.
*
* @constructor
* @public
* @param {Vertex} e Vertex which this edge connects.
* @param {Vertex} v Vertex which this edge connects.
* @param {Number} distance Weight of the edge.
* @module data-structures/edge
*/
exports.Edge = function (e, v, distance) {
this.from = e;
this.to = v;
this.distance = distance;
};
})(typeof window === 'undefined' ? module.exports : window);