The parameter v1 is of type VertexId and represents the first vertex in the edge.
The parameter v2 is a VertexId, which represents the identifier of the second vertex in a
graph.
Optional weight: numberThe weight parameter is an optional number that represents the weight of the edge
between two vertices.
Protected _hashPrivate _verticesProtected _weightProtected _setStarting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.
Generated using TypeDoc
The constructor function initializes an instance of a class with two vertex IDs and an optional weight.