Sorting and save
This commit is contained in:
parent
9def988f9d
commit
e9d2c6374e
@ -245,7 +245,12 @@ public class MapLogicSupport : Shared.Models.Methods.IMapLogicSupport
|
||||
if (!collection.Any())
|
||||
results = Array.Empty<SortingContainer>();
|
||||
else
|
||||
results = Shared.Models.Stateless.Methods.ISortingContainer.Sort(collection);
|
||||
{
|
||||
if (_RangeDaysDeltaTolerance[1] > _RangeDaysDeltaTolerance[2])
|
||||
results = Shared.Models.Stateless.Methods.ISortingContainer.Sort(collection);
|
||||
else
|
||||
results = Shared.Models.Stateless.Methods.ISortingContainer.SortUsingDaysDelta(collection);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
@ -1093,6 +1093,8 @@ public partial class DlibDotNet
|
||||
LookForAbandoned(idToLocationContainers, distinctFilteredIds);
|
||||
Mapping[] mappingCollection = MapLogicSupport.GetSelectedMappingCollection(distinctFilteredFaces);
|
||||
int totalNotMapped = mapLogic.UpdateMappingFromPerson(mappingCollection);
|
||||
string json = System.Text.Json.JsonSerializer.Serialize(mappingCollection);
|
||||
File.WriteAllText(Path.Combine(eDistanceContentDirectory, $"{ticks}.json"), json);
|
||||
if (a2PeopleContentDirectory is not null && false)
|
||||
mapLogic.CreateTree(ticks, a2PeopleContentDirectory);
|
||||
foreach (string outputResolution in _Configuration.OutputResolutions)
|
||||
|
@ -6,6 +6,8 @@ public interface ISortingContainer
|
||||
Models.SortingContainer[] TestStatic_Sort(List<Models.SortingContainer> collection) =>
|
||||
Sort(collection);
|
||||
static Models.SortingContainer[] Sort(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad select l).ToArray();
|
||||
static Models.SortingContainer[] SortUsingDaysDelta(List<Models.SortingContainer> collection) =>
|
||||
(from l in collection orderby l.Sorting.DistancePermyriad, l.Sorting.DaysDelta select l).ToArray();
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user