using System.Collections.Generic; using System.Collections.ObjectModel; namespace MultiWheelC.TrajectoryPlanning.PathSmoothing.Output.Comparison; /// Immutable request for comparing a coarse-path baseline with Local G2 output. public sealed class PathSmoothingComparisonRequest { private static readonly IReadOnlyList LocalG2OnlyMethods = new ReadOnlyCollection(new[] { SmoothingMethod.LocalG2Quintic }); public PathSmoothingComparisonRequest(PathSmoothingRequest smoothingRequest) { SmoothingRequest = CopyRequest(smoothingRequest); Methods = LocalG2OnlyMethods; } public PathSmoothingRequest SmoothingRequest { get; } /// The report always contains the sole supported method, Local G2 quintic. public IReadOnlyList Methods { get; } private static PathSmoothingRequest CopyRequest(PathSmoothingRequest source) { if (source == null) return null; return new PathSmoothingRequest( source.CoarsePath, source.Segments, source.Map, source.Vehicle, source.Configuration); } }