LibreOffice Module chart2 (master) 1
StatisticsHelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/uno/Reference.h>
22#include <rtl/ustring.hxx>
23#include <rtl/ref.hxx>
24#include "charttoolsdllapi.hxx"
25
26namespace com::sun::star::beans { class XPropertySet; }
27namespace com::sun::star::chart2 { class XDataSeries; }
28namespace com::sun::star::chart2::data { class XDataProvider; }
29namespace com::sun::star::chart2::data { class XDataSequence; }
30namespace com::sun::star::chart2::data { class XDataSource; }
31namespace com::sun::star::chart2::data { class XLabeledDataSequence; }
32namespace com::sun::star::uno { template <typename > class Sequence; }
33namespace chart { class LabeledDataSequence; }
34namespace chart { class DataSeries; }
35
37{
42 OOO_DLLPUBLIC_CHARTTOOLS double getVariance( const css::uno::Sequence< double > & rData );
43
44 // square root of the variance
45 OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation( const css::uno::Sequence< double > & rData );
46
47 // also called "Standard deviation of the mean (SDOM)"
48 OOO_DLLPUBLIC_CHARTTOOLS double getStandardError( const css::uno::Sequence< double > & rData );
49
50 OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence >
52 const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
53 bool bPositiveValue,
54 bool bYError = true );
55
56 OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSequence >
58 const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
59 bool bPositiveValue,
60 bool bYError = true );
61
63 const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
64 sal_Int32 nIndex,
65 bool bPositiveValue,
66 bool bYError = true );
67
69 const css::uno::Reference< css::chart2::data::XDataSource > & xDataSource,
70 const css::uno::Reference< css::chart2::data::XDataProvider > & xDataProvider,
71 const OUString & rNewRange,
72 bool bPositiveValue,
73 bool bYError = true,
74 OUString const * pXMLRange = nullptr );
75
77 OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
79 const rtl::Reference< ::chart::DataSeries > & xDataSeries,
80 sal_Int32 nStyle,
81 bool bYError = true );
82
83 OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet >
85 const rtl::Reference< ::chart::DataSeries > & xDataSeries,
86 bool bYError = true );
87
89 const rtl::Reference< ::chart::DataSeries > & xDataSeries,
90 bool bYError = true );
91
93 const rtl::Reference< ::chart::DataSeries > & xDataSeries,
94 bool bYError = true );
95
97 const rtl::Reference< ::chart::DataSeries > & xDataSeries,
98 bool bYError = true );
99
100} // namespace chart
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
OOO_DLLPUBLIC_CHARTTOOLS void removeErrorBars(const rtl::Reference< ::chart::DataSeries > &xDataSeries, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS double getStandardDeviation(const css::uno::Sequence< double > &rData)
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XDataSequence > getErrorDataSequenceFromDataSource(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource, bool bPositiveValue, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet > getErrorBars(const rtl::Reference< ::chart::DataSeries > &xDataSeries, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS bool usesErrorBarRanges(const rtl::Reference< ::chart::DataSeries > &xDataSeries, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS double getStandardError(const css::uno::Sequence< double > &rData)
OOO_DLLPUBLIC_CHARTTOOLS bool hasErrorBars(const rtl::Reference< ::chart::DataSeries > &xDataSeries, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS double getErrorFromDataSource(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource, sal_Int32 nIndex, bool bPositiveValue, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::beans::XPropertySet > addErrorBars(const rtl::Reference< ::chart::DataSeries > &xDataSeries, sal_Int32 nStyle, bool bYError=true)
OOO_DLLPUBLIC_CHARTTOOLS void setErrorDataSequence(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource, const css::uno::Reference< css::chart2::data::XDataProvider > &xDataProvider, const OUString &rNewRange, bool bPositiveValue, bool bYError=true, OUString const *pXMLRange=nullptr)
OOO_DLLPUBLIC_CHARTTOOLS double getVariance(const css::uno::Sequence< double > &rData)
Calculates 1/n * sum (x_i - x_mean)^2.
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence > getErrorLabeledDataSequenceFromDataSource(const css::uno::Reference< css::chart2::data::XDataSource > &xDataSource, bool bPositiveValue, bool bYError=true)
class SAL_NO_VTABLE XPropertySet