PointResamplerBase

StockSharp.Xaml.Charting.Numerics

实现: IPointResampler

方法

ReducePointUnevenImpl
private static void ReducePointUnevenImpl(UncheckedList<double> xValues, UncheckedList<double> yValues, Point2DSeries reducedPoints, int startIndexInclusive, int endIndexInclusive, double minXInclusive, double maxXInclusive, int viewportWidth, bool isCategoryAxis)
PointResamplerBase.ReducePointUnevenImpl(xValues, yValues, reducedPoints, startIndexInclusive, endIndexInclusive, minXInclusive, maxXInclusive, viewportWidth, isCategoryAxis)

这需要针对每对支持的 TX, TY 执行。 也许使用 T4 模板? 为了实现最佳性能, 这种方法应该用 C++/ ASM 执行, 而不仅仅是 GetMinMaxValuesForPixel 方法(这样可以避免每像素无管理调用过渡) 。 然而, 这也需要 reducedPoints 作为预分配缓冲器而不是 Point2DS 处理器通过 。 NaN 处理会使得预分配功能有点困难(因为 NaNs 会导致每像素多行) 。

ReducePointUnevenImpl``2
private static void ReducePointUnevenImpl<TX, TY>(UncheckedList<TX> xValues, UncheckedList<TY> yValues, Point2DSeries reducedPoints, int startIndexInclusive, int endIndexInclusive, double minXInclusive, double maxXInclusive, int viewportWidth, bool isCategoryAxis)
PointResamplerBase.ReducePointUnevenImpl(xValues, yValues, reducedPoints, startIndexInclusive, endIndexInclusive, minXInclusive, maxXInclusive, viewportWidth, isCategoryAxis)

普通执行, 已检索到一个未加限制的 x 和 y 值列表。