using System; using System.Collections.Generic; #pragma warning disable IDE0130 namespace CaeMesh { [Serializable] public class GmshEdge : IComparable { public int Id; public int[] VertexIds; public HashSet SurfaceIds; public double Length; // 构造函数 public GmshEdge(int id, int[] vertexIds, int surfaceId, double length) { Id = id; VertexIds = vertexIds; SurfaceIds = new HashSet { surfaceId }; Length = length; } // public int CompareTo(GmshEdge other) { if (Id < other.Id) return 1; else if (Id > other.Id) return -1; else return 0; } } }