Interface LinearSegment

    • Method Detail

      • createLinearSegment

        static LinearSegment createLinearSegment​(Num x,
                                                 Num y,
                                                 Num grad,
                                                 boolean leftopen)
      • createHorizontalLine

        static LinearSegment createHorizontalLine​(double y)
      • add

        static LinearSegment add​(LinearSegment s1,
                                 LinearSegment s2,
                                 Num x,
                                 boolean leftopen)
        Helper creating a new segment starting at x that is the sum of the given getSegment.
        Parameters:
        s1 - Segment 1.
        s2 - Segment 2.
        x - New x-coordinate the start at.
        leftopen - Set the segment to be left-open.
        Returns:
        The new linear segment, pointwise sum of the given ones, starting in x.
      • sub

        static LinearSegment sub​(LinearSegment s1,
                                 LinearSegment s2,
                                 Num x,
                                 boolean leftopen)
        Helper creating a new segment starting at x that is the difference between the given getSegment.
        Parameters:
        s1 - Segment 1.
        s2 - Segment 2.
        x - New x-coordinate the start at.
        leftopen - Set the segment to be left-open.
        Returns:
        The new linear segment, pointwise difference of the given ones, i.e., s1 - s2, starting in x.
      • min

        static LinearSegment min​(LinearSegment s1,
                                 LinearSegment s2,
                                 Num x,
                                 boolean leftopen,
                                 boolean crossed)
        Helper creating a new segment starting at x that is the minimum of the given getSegment. Note: Only valid if s1 and s2 do not intersect before the next IP.
        Parameters:
        s1 - Segment 1.
        s2 - Segment 2.
        x - New x-coordinate the start at.
        leftopen - Set the segment to be left-open.
        crossed - Provides information if the segments intersect.
        Returns:
        The new linear segment, pointwise minimum of the given ones, starting in x.
      • max

        static LinearSegment max​(LinearSegment s1,
                                 LinearSegment s2,
                                 Num x,
                                 boolean leftopen,
                                 boolean crossed)
        Helper creating a new segment starting at x that is the maximum of the given segments. Note: Only valid if s1 and s2 do not intersect before the next IP.
        Parameters:
        s1 - Segment 1.
        s2 - Segment 2.
        x - New x-coordinate the start at.
        leftopen - Set the segment to be left-open.
        crossed - Provides information if the segments intersect.
        Returns:
        The new linear segment, pointwise maximum of the given ones, starting in x.
      • getX

        Num getX()
      • setX

        void setX​(Num x)
      • getY

        Num getY()
      • setY

        void setY​(Num y)
      • getGrad

        Num getGrad()
      • setGrad

        void setGrad​(Num grad)
      • isLeftopen

        boolean isLeftopen()
      • setLeftopen

        void setLeftopen​(boolean leftopen)
      • equals

        boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        java.lang.String toString()
        Overrides:
        toString in class java.lang.Object