using System; using System.Collections.Generic; using Graph; using Interfaces; namespace TSP { using INode = INode; using IVertex = IVertex, double>; using Road = Edge; using Vertex = Vertex, double>; public partial class City : Vertex, IVertex, IComparable { public new double Key { get => this[Parent].Weight; set => Key = value; } public Coordinate Location { get; set; } public City() { } public City(int id) => Id = id; public City(int id, List edges) : this(id) => Edges = edges; public City(IVertex city) : this(city.Id, city.Edges) => Parent = city.Parent; public City(IVertex city, Coordinate location) : this(city) => Location = location; public City(City city) : this(city, city.Location) { } } }