// import {Assert} from './../../utils/assert'
import { String } from 'typescript-string-operations';
//  an edge connecting two VisibilityVertices
export class VisibilityEdge {
    constructor(source, target, weight = 1) {
        this.LengthMultiplier = 1;
        /*Assert.assert(source.point != target.point, 'Self-edges are not allowed')*/
        this.Source = source;
        this.Target = target;
        this.Weight = weight;
    }
    //  edge source point
    get SourcePoint() {
        return this.Source.point;
    }
    //  edge target point
    get TargetPoint() {
        return this.Target.point;
    }
    get Length() {
        return this.SourcePoint.sub(this.TargetPoint).length * this.LengthMultiplier;
    }
    toString() {
        return String.Format('{0}->{1} ({2})', this.Source, this.Target, this.Weight);
    }
    ReversedClone() {
        return new VisibilityEdge(this.Target, this.Source);
    }
    Clone() {
        return new VisibilityEdge(this.Source, this.Target);
    }
}
VisibilityEdge.DefaultWeight = 1;
//# sourceMappingURL=VisibilityEdge.js.map