类 TraceList


  • public class TraceList
    extends Object
    Sequence of strokes
    作者:
    Chan Chung Kwong
    • 构造器详细资料

      • TraceList

        public TraceList()
        Create a empty sequence of strokes
      • TraceList

        public TraceList​(List<Trace> traces)
        Create a sequence of strokes
        参数:
        traces - underlying list
    • 方法详细资料

      • getTraces

        public List<Trace> getTraces()
        返回:
        list of strokes
      • getBoundBox

        public BoundBox getBoundBox()
        返回:
        bounding box of the strokes
      • rescale

        public TraceList rescale​(BoundBox toBox)
        Rescale the coordinates to fit in a given rectangle
        参数:
        toBox - the rectangle
        返回:
        scaled trace list
      • translate

        public TraceList translate​(int dx,
                                   int dy)
        Translate the traces
        参数:
        dx - offset
        dy - offset
        返回:
        transformed trace list
      • getDistance

        public static int getDistance​(Trace trace0,
                                      Trace trace1)
        参数:
        trace0 - a trace
        trace1 - another trace
        返回:
        the Hausdorff distance between the two traces
      • getSideDistance

        public static int getSideDistance​(Trace trace0,
                                          Trace trace1)
        参数:
        trace0 -
        trace1 -
        返回:
        the minimum radius r such that trace0 is a subset of the r-neighborhood of trace1