new AbstractEdge<T>(weight?, val?): AbstractEdge<T>
The above function is a protected constructor that initializes the weight, value, and hash code properties of an
object.
Type Parameters
T = any
Parameters
Optionalweight: number
The weight parameter is an optional number that represents the weight of the object. If
a value is provided, it will be assigned to the _weight property. If no value is provided, the default value of 1
will be assigned.
Optionalval: T
The val parameter is of type T, which means it can be any type. It is an optional parameter,
meaning it can be omitted when creating an instance of the class.
The above function is a protected constructor that initializes the weight, value, and hash code properties of an object.