Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Graph.prototype.asDirected = function() {
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":27,"./Graph":28}],44:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":28,"./Graph":29}],45:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":27,"./Graph":28}],44:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":28,"./Graph":29}],45:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":32,"./Graph":33}],49:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
Graph.prototype.asDirected = function() {
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":28,"./Graph":29}],45:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
Graph.prototype.asDirected = function() {
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":32,"./Graph":33}],49:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
Graph.prototype.asDirected = function() {
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":32,"./Graph":33}],49:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":32,"./Graph":33}],49:[function(require,module,exports){
// Returns an array of all values for properties of **o**.
Graph.prototype.asDirected = function() {
var g = new Digraph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(null, u, v, value);
g.addEdge(null, v, u, value);
});
return g;
};
/**
* Returns a new undirected graph using the nodes and edges from this graph.
* The new graph will have the same nodes, but the edges will be made
* undirected. Edge ids are preserved in this transformation.
*/
Digraph.prototype.toGraph =
Digraph.prototype.asUndirected = function() {
var g = new Graph();
this.eachNode(function(u, value) { g.addNode(u, value); });
this.eachEdge(function(e, u, v, value) {
g.addEdge(e, u, v, value);
});
return g;
};
},{"./Digraph":29,"./Graph":30}],46:[function(require,module,exports){
// Returns an array of all values for properties of **o**.