package io.wdd.func.xray.beans.node;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * class to store edges of the weighted graph
 */
@Data
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
@ApiModel("网络模型中的有向权重边")
public class Edge {

    ProxyNode source, destination;

    @ApiModelProperty("权重值, 值的范围在0-100,数字越小表示阻力越小")
    int weight;

    public Edge(ProxyNode source, ProxyNode destination, int weight) {
        this.source = source;
        this.destination = destination;
        this.weight = weight;
    }

}
