Interface Curve

    • Method Detail

      • getFactory

        static Curve getFactory()
      • getXAxis

        static LinearSegment getXAxis()
        Create and return a linear segment that lies on the x axis of the Cartesian coordinate system.
        Returns:
      • removeLatency

        static Curve removeLatency​(Curve curve)
        Returns a copy of this curve with latency removed, i.e. shifted left by the latency.
        Parameters:
        curve - The curve to shift.
        Returns:
        A copy of this curve without latency
      • shiftRight

        static Curve shiftRight​(Curve curve,
                                Num dx)
        Returns a copy of this curve that is shifted to the right by dx, i.e. g(x) = f(x-dx).
        Parameters:
        curve - The curve to shift.
        dx - The offset to shift the curve.
        Returns:
        The shifted curve.
      • beautify

        static void beautify​(Curve c)
      • computeInflectionPointsX

        static java.util.ArrayList<Num> computeInflectionPointsX​(Curve c1,
                                                                 Curve c2)
        Returns an ArrayList instance of those x-coordinates at which either c1 or c2 or both have an inflection point. There will be multiple occurences of an x-coordinate, if at least one curve has a discontinuity at that x-coordinate.
        Parameters:
        c1 - the first curve.
        c2 - the second curve.
        Returns:
        an ArrayList of Double objects containing the x-coordinates of the respective inflection point.
      • getMaxVerticalDeviation

        static Num getMaxVerticalDeviation​(Curve c1,
                                           Curve c2)
        Returns the maximum vertical deviation between the given two curves.
        Parameters:
        c1 - the first curve.
        c2 - the second curve.
        Returns:
        the value of the vertical deviation.
      • getXIntersection

        static Num getXIntersection​(Curve curve1,
                                    Curve curve2)
      • computeInflectionPointsY

        static java.util.ArrayList<Num> computeInflectionPointsY​(Curve c1,
                                                                 Curve c2)
        Returns an ArrayList instance of those y-coordinates at which either c1 or c2 or both have an inflection point.
        Parameters:
        c1 - the first curve.
        c2 - the second curve.
        Returns:
        an ArrayList of Double objects containing the x-coordinates of the respective inflection point.
      • sub

        static Curve sub​(Curve curve1,
                         Curve curve2)
        Returns a curve that is the difference between this curve and the given curve.
        Parameters:
        curve1 - input curve 1.
        curve2 - input curve 2.
        Returns:
        the pointwise difference of the given curves, i.e., curve1 - curve2.
      • computeResultingCurve

        static Curve computeResultingCurve​(Curve curve1,
                                           Curve curve2,
                                           Curve.CurveOperation operator)
        Common helper for computing a new curve.
        Parameters:
        curve1 - Input curve 1.
        curve2 - Input curve 2.
        operator - Operation to be applied to the curves.
        Returns:
        The resulting curve.
      • min

        static Curve min​(Curve curve1,
                         Curve curve2)
        Returns a curve that is the minimum of this curve and the given curve.
        Parameters:
        curve1 - input curve 1.
        curve2 - input curve 2.
        Returns:
        the pointwise minimum of the given curves.
      • boundAtXAxis

        static Curve boundAtXAxis​(Curve curve)
        Returns a copy of curve bounded at the x-axis.
        Parameters:
        curve - the curve to bound.
        Returns:
        the bounded curve.
      • add

        static Curve add​(Curve curve1,
                         Curve curve2)
        Returns a curve that is the sum of this curve and the given curve.
        Parameters:
        curve1 - input curve 1.
        curve2 - input curve 2.
        Returns:
        the pointwise sum of the given curves.
      • max

        static Curve max​(Curve curve1,
                         Curve curve2)
        Returns a curve that is the maximum of this curve and the given curve.
        Parameters:
        curve1 - input curve 1.
        curve2 - input curve 2.
        Returns:
        the pointwise maximum of the given curves.
      • add

        static Curve add​(Curve curve,
                         Num dy)
        Returns a copy of this curve shifted vertically by dy.
        Parameters:
        curve - The curve to shift.
        dy - The offset to shift the curve.
        Returns:
        The shifted curve.
      • shiftLeftClipping

        static Curve shiftLeftClipping​(Curve curve,
                                       Num dx)
        Returns a copy of this curve that is shifted to the left by dx, i.e. g(x) = f(x+dx). Note that the new curve is clipped at the y-axis so that in most cases c.shiftLeftClipping(dx).shiftRight(dx) != c!
        Parameters:
        curve - The curve to shift.
        dx - The offset to shift the curve.
        Returns:
        The shifted curve.
      • createZeroCurve

        Curve createZeroCurve()
      • createHorizontal

        Curve createHorizontal​(Num y)
      • getSegment

        LinearSegment getSegment​(int pos)
        Curves are defined by a numbered sequence of linear segments. This method returns the segment at the given position in curve-defining sequence. The first segment is by definition at position 0.
        Parameters:
        pos - Position of the segment to return.
        Returns:
        The linear segment at position pos.
      • getSegmentCount

        int getSegmentCount()
      • getSegmentDefining

        int getSegmentDefining​(Num x)
      • isConvex

        boolean isConvex()
      • isConcave

        boolean isConcave()
      • fLimitRight

        Num fLimitRight​(Num x)
      • f_inv

        Num f_inv​(Num y,
                  boolean rightmost)
      • getLatency

        Num getLatency()
      • getBurst

        Num getBurst()
      • getUltAffineRate

        Num getUltAffineRate()
      • getGradientLimitRight

        Num getGradientLimitRight​(Num x)
      • copy

        void copy​(Curve curve)
      • createServiceCurve

        ServiceCurve createServiceCurve​(int segment_count)
      • createServiceCurve

        ServiceCurve createServiceCurve​(java.lang.String service_curve_str)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createZeroDelayInfiniteBurst

        ServiceCurve createZeroDelayInfiniteBurst()
      • createDelayedInfiniteBurst

        ServiceCurve createDelayedInfiniteBurst​(double delay)
      • createDelayedInfiniteBurst

        ServiceCurve createDelayedInfiniteBurst​(Num delay)
      • createRateLatency

        ServiceCurve createRateLatency​(double rate,
                                       double latency)
      • createArrivalCurve

        ArrivalCurve createArrivalCurve​(int segment_count)
      • createArrivalCurve

        ArrivalCurve createArrivalCurve​(java.lang.String arrival_curve_str)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createArrivalCurve

        ArrivalCurve createArrivalCurve​(Curve curve,
                                        boolean remove_latency)
      • createInfiniteArrivals

        ArrivalCurve createInfiniteArrivals()
      • createPeakArrivalRate

        ArrivalCurve createPeakArrivalRate​(double rate)
      • createTokenBucket

        ArrivalCurve createTokenBucket​(double rate,
                                       double burst)
      • createMaxServiceCurve

        MaxServiceCurve createMaxServiceCurve​(int segment_count)
      • createMaxServiceCurve

        MaxServiceCurve createMaxServiceCurve​(java.lang.String max_service_curve_str)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createZeroDelayInfiniteBurstMSC

        MaxServiceCurve createZeroDelayInfiniteBurstMSC()
      • createDelayedInfiniteBurstMSC

        MaxServiceCurve createDelayedInfiniteBurstMSC​(double delay)
      • createDelayedInfiniteBurstMSC

        MaxServiceCurve createDelayedInfiniteBurstMSC​(Num delay)
      • createRateLatencyMSC

        MaxServiceCurve createRateLatencyMSC​(double rate,
                                             double latency)
      • setTB_Components

        void setTB_Components​(java.util.List<Curve> token_buckets)
      • setRL_MetaInfo

        void setRL_MetaInfo​(boolean has_rl_meta_info)
      • setRateLateny

        void setRateLateny​(boolean is_rate_latency)
      • setRL_Components

        void setRL_Components​(java.util.List<Curve> rate_latencies)
      • isAlmostConcave

        boolean isAlmostConcave()
      • getRL_ComponentCount

        int getRL_ComponentCount()
      • getTB_ComponentCount

        int getTB_ComponentCount()
      • getRL_Component

        Curve getRL_Component​(int i)
      • getTB_Component

        Curve getTB_Component​(int i)
      • setTokenBucket

        void setTokenBucket​(boolean is_token_bucket)
      • removeSegment

        void removeSegment​(int pos)
      • isDelayedInfiniteBurst

        boolean isDelayedInfiniteBurst()
      • isDiscontinuity

        boolean isDiscontinuity​(int pos)
      • isRealDiscontinuity

        boolean isRealDiscontinuity​(int pos)
      • isUnrealDiscontinuity

        boolean isUnrealDiscontinuity​(int pos)
      • setTB_MetaInfo

        void setTB_MetaInfo​(boolean has_tb_meta_info)
      • isWideSenseIncreasing

        boolean isWideSenseIncreasing()
      • isConcaveIn

        boolean isConcaveIn​(Num a,
                            Num b)
      • isConvexIn

        boolean isConvexIn​(Num a,
                           Num b)
      • 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