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())
|
if (!collection.Any())
|
||||||
results = Array.Empty<SortingContainer>();
|
results = Array.Empty<SortingContainer>();
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (_RangeDaysDeltaTolerance[1] > _RangeDaysDeltaTolerance[2])
|
||||||
results = Shared.Models.Stateless.Methods.ISortingContainer.Sort(collection);
|
results = Shared.Models.Stateless.Methods.ISortingContainer.Sort(collection);
|
||||||
|
else
|
||||||
|
results = Shared.Models.Stateless.Methods.ISortingContainer.SortUsingDaysDelta(collection);
|
||||||
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,6 +1093,8 @@ public partial class DlibDotNet
|
|||||||
LookForAbandoned(idToLocationContainers, distinctFilteredIds);
|
LookForAbandoned(idToLocationContainers, distinctFilteredIds);
|
||||||
Mapping[] mappingCollection = MapLogicSupport.GetSelectedMappingCollection(distinctFilteredFaces);
|
Mapping[] mappingCollection = MapLogicSupport.GetSelectedMappingCollection(distinctFilteredFaces);
|
||||||
int totalNotMapped = mapLogic.UpdateMappingFromPerson(mappingCollection);
|
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)
|
if (a2PeopleContentDirectory is not null && false)
|
||||||
mapLogic.CreateTree(ticks, a2PeopleContentDirectory);
|
mapLogic.CreateTree(ticks, a2PeopleContentDirectory);
|
||||||
foreach (string outputResolution in _Configuration.OutputResolutions)
|
foreach (string outputResolution in _Configuration.OutputResolutions)
|
||||||
|
@ -6,6 +6,8 @@ public interface ISortingContainer
|
|||||||
Models.SortingContainer[] TestStatic_Sort(List<Models.SortingContainer> collection) =>
|
Models.SortingContainer[] TestStatic_Sort(List<Models.SortingContainer> collection) =>
|
||||||
Sort(collection);
|
Sort(collection);
|
||||||
static Models.SortingContainer[] Sort(List<Models.SortingContainer> 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();
|
(from l in collection orderby l.Sorting.DistancePermyriad, l.Sorting.DaysDelta select l).ToArray();
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user