import { Edge } from "./Edge.js";

/**
 * @template T
 */
export class WeightedEdge extends Edge {
    /**
     *
     * @type {number}
     */
    weight = 0;

    /**
     *
     * @param {WeightedEdge} e
     * @returns {number}
     */
    static extractWeight(e) {
        return e.weight;
    }

    /**
     *
     * @param {WeightedEdge} e
     * @returns {number}
     */
    static extractNegativeWeight(e) {
        return -e.weight;
    }
}
