tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / offapi / com / sun / star / chart2 / XRegressionCurveCalculator.idl
blob1011a3015d5b9f0438f5e61478d4e956438569c2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
22 module sun
24 module star
26 module chart2
29 interface XRegressionCurveCalculator : com::sun::star::uno::XInterface
31 /** set calculation properties for curve calculation.
33 @param degree
34 Degree of polynomial regression curve, value should be greater than zero
35 If the curve is not polynomial, this property has no effect.
37 @param period
38 Period of a moving average regression curve, value should be greater or equal to 2
39 If the curve is not moving average regression curve, this property has no effect.
41 @param forceIntercept
42 Should force the intercept value.
44 @param interceptValue
45 Intercept value.
47 @param movingType
48 Only if regression type is "Moving Average"
49 @see ::com::sun::star::chart2::MovingAverageType
52 void setRegressionProperties( [in] long degree,
53 [in] boolean forceIntercept,
54 [in] double interceptValue,
55 [in] long period,
56 [in] long movingType);
58 /** recalculates the parameters of the internal regression curve according to
59 the <i>x</i>- and <i>y</i>-values given.
61 @param aXValues
62 All x-values that represent the measurement points on
63 which the regression is based
65 @param aYValues
66 All y-values that represent the measurement points on
67 which the regression is based
69 void recalculateRegression( [in] sequence< double > aXValues,
70 [in] sequence< double > aYValues);
73 /** calculates the value of the regression curve for <i>x</i>.
75 @param x
76 The abscissa value for which the value of the regression
77 curve should be calculated. All numbers that are part of
78 the domain of the regression function are valid.
80 @return
81 If <i>x</i> is element of the domain of the regression
82 curve function, the result is its value.
84 @throws com::sun::star::lang::IllegalArgumentException
85 If <i>x</i> is not part of the domain of the regression
86 function.
88 double getCurveValue( [in] double x )
89 raises( com::sun::star::lang::IllegalArgumentException );
91 /** calculate multiple points of a regression curve at once. Note
92 that this method may optimize the output by returning less
93 points, e.g. for a line you may get only two resulting points
94 instead of nPointCount() points. This is only
95 allowed if the parameter
96 bMaySkipPointsInCalculation() is set to
97 `TRUE`.
99 <p>It is important that a renderer takes the scalings into
100 account. When one of these parameters is unknown, no
101 optimization must be done.</p>
103 @param min the abscissa value for the starting point.
104 @param max the abscissa value for the ending point.
106 @param nPointCount the number of points to calculate.
108 @param bMaySkipPointsInCalculation determines whether it is
109 allowed to skip points in the calculation. When this
110 parameter is `TRUE` it is assumed that the underlying
111 coordinate system is Cartesian.
113 @param xScalingX a scaling that is used for the values in
114 x-direction
116 @param xScalingY a scaling that is used for the values in
117 y-direction
119 sequence< com::sun::star::geometry::RealPoint2D > getCurveValues(
120 [in] double min,
121 [in] double max,
122 [in] long nPointCount,
123 [in] XScaling xScalingX,
124 [in] XScaling xScalingY,
125 [in] boolean bMaySkipPointsInCalculation )
126 raises( com::sun::star::lang::IllegalArgumentException );
128 /** Returns the value of the correlation coefficient for the given
129 regression. This value is often denoted as <i>r</i> or
130 <i>R</i>.
132 <p>The value of <i>r</i> is signed. Often
133 <i>r</i><sup>2</sup> is used instead of <i>r</i> to denote
134 a regression curve's accuracy.</p>
136 @return
137 The return value is the fraction of the variance in the
138 data that is explained by the regression.
140 double getCorrelationCoefficient();
142 /** Retrieve a string showing the regression curve's function with
143 calculated parameters.
145 @return
146 The string returned contains the regression curve's
147 formula in a form <pre>"f(x) = ..."</pre>, where the
148 calculated parts are filled out. For a linear regression
149 you might get <pre>"f(x) = 0.341 x + 1.45"</pre>.
151 string getRepresentation();
153 /** Returns a representation using the given number format for formatting all numbers
154 contained in the formula. Wrap equation to fit in nFormulaLength characters
156 @see getRepresentation
158 string getFormattedRepresentation( [in] com::sun::star::util::XNumberFormatsSupplier xNumFmtSupplier,
159 [in] long nNumberFormatKey,
160 [in] long nFormulaLength );
162 /** Set the names of X and Y variables of the equation to replace "x" and "f(x)" in representation
164 @param aXName string of the name of X variable
165 @param aYName string of the name of Y variable
167 void setXYNames( [in] string aXName,
168 [in] string aYName );
172 } ; // chart2
173 } ; // com
174 } ; // sun
175 } ; // star
177 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */