public static dynamic GetTSObject(LoadLine dynObject) { if (dynObject is null) { return(null); } return(dynObject.teklaObject); }
public static bool Clust() { BoundingBox Bound; List <Facility> Facility; // read data Vertex[] Points = LoadLine.Load(Setup.InputPath, out Bound); // setup dimension of points Setup.Dim = Points[0].Dimension; FacilityLocation fac = new FacilityLocation(); // setup clustering properties Vertex.CoordWeights = Setup.ValueDim; Vertex.CoordBorder = Setup.Border; Vertex.BorderMin = Setup.BorderMin; Vertex.BorderPercent = Setup.BorderPercent; // setup metric VertexExtension.SetLineMetric(); // start clustering fac.ComputeClustering(Points, Bound); // get index of facilities int[] indexCentre = fac.GetAllFacilities(); // create array for facilities Vertex[] centre = new Vertex[indexCentre.Length]; // insert facilities vertices into array for (int f = 0; f < centre.Length; f++) { centre[f] = Points[indexCentre[f]]; } Facility = fac.Facilities; Analysis.SaveSite(ref Points, ref Facility, Setup.OutPath, Setup.SizeFilter); return(false); }