📄 statistics.html
字号:
<PRE>public <B>Statistics</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="calculateMean(java.lang.Number[])"><!-- --></A><H3>calculateMean</H3><PRE>public static double <B>calculateMean</B>(java.lang.Number[] values)</PRE><DL><DD>Returns the mean of an array of numbers.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values (<code>null</code> permitted, returns <code>Double.NaN</code>).<DT><B>Returns:</B><DD>The mean.</DL></DD></DL><HR><A NAME="calculateMean(java.util.Collection)"><!-- --></A><H3>calculateMean</H3><PRE>public static double <B>calculateMean</B>(java.util.Collection values)</PRE><DL><DD>Returns the mean of a collection of <code>Number</code> objects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values (<code>null</code> permitted, returns <code>Double.NaN</code>).<DT><B>Returns:</B><DD>The mean.</DL></DD></DL><HR><A NAME="calculateMedian(java.util.List)"><!-- --></A><H3>calculateMedian</H3><PRE>public static double <B>calculateMedian</B>(java.util.List values)</PRE><DL><DD>Calculates the median for a list of values (<code>Number</code> objects). The list of values will be sorted first.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values.<DT><B>Returns:</B><DD>The median.</DL></DD></DL><HR><A NAME="calculateMedian(java.util.List, boolean)"><!-- --></A><H3>calculateMedian</H3><PRE>public static double <B>calculateMedian</B>(java.util.List values, boolean copyAndSort)</PRE><DL><DD>Calculates the median for a list of values (<code>Number</code> objects) that are assumed to be in ascending order.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values.<DD><CODE>copyAndSort</CODE> - a flag that controls whether the list of values is copied and sorted.<DT><B>Returns:</B><DD>The median.</DL></DD></DL><HR><A NAME="calculateMedian(java.util.List, int, int)"><!-- --></A><H3>calculateMedian</H3><PRE>public static double <B>calculateMedian</B>(java.util.List values, int start, int end)</PRE><DL><DD>Calculates the median for a sublist within a list of values (<code>Number</code> objects).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values (in any order).<DD><CODE>start</CODE> - the start index.<DD><CODE>end</CODE> - the end index.<DT><B>Returns:</B><DD>The median.</DL></DD></DL><HR><A NAME="calculateMedian(java.util.List, int, int, boolean)"><!-- --></A><H3>calculateMedian</H3><PRE>public static double <B>calculateMedian</B>(java.util.List values, int start, int end, boolean copyAndSort)</PRE><DL><DD>Calculates the median for a sublist within a list of values (<code>Number</code> objects). The entire list will be sorted if the <code>ascending</code< argument is <code>false</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the values.<DD><CODE>start</CODE> - the start index.<DD><CODE>end</CODE> - the end index.<DD><CODE>copyAndSort</CODE> - a flag that that controls whether the list of values is copied and sorted.<DT><B>Returns:</B><DD>The median.</DL></DD></DL><HR><A NAME="getStdDev(java.lang.Number[])"><!-- --></A><H3>getStdDev</H3><PRE>public static double <B>getStdDev</B>(java.lang.Number[] data)</PRE><DL><DD>Returns the standard deviation of a set of numbers.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DT><B>Returns:</B><DD>the standard deviation of a set of numbers.</DL></DD></DL><HR><A NAME="getLinearFit(java.lang.Number[], java.lang.Number[])"><!-- --></A><H3>getLinearFit</H3><PRE>public static double[] <B>getLinearFit</B>(java.lang.Number[] xData, java.lang.Number[] yData)</PRE><DL><DD>Fits a straight line to a set of (x, y) data, returning the slope and intercept.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xData</CODE> - the x-data.<DD><CODE>yData</CODE> - the y-data.<DT><B>Returns:</B><DD>a double array with the intercept in [0] and the slope in [1].</DL></DD></DL><HR><A NAME="getSlope(java.lang.Number[], java.lang.Number[])"><!-- --></A><H3>getSlope</H3><PRE>public static double <B>getSlope</B>(java.lang.Number[] xData, java.lang.Number[] yData)</PRE><DL><DD>Finds the slope of a regression line using least squares.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xData</CODE> - an array of Numbers (the x values).<DD><CODE>yData</CODE> - an array of Numbers (the y values).<DT><B>Returns:</B><DD>the slope.</DL></DD></DL><HR><A NAME="getCorrelation(java.lang.Number[], java.lang.Number[])"><!-- --></A><H3>getCorrelation</H3><PRE>public static double <B>getCorrelation</B>(java.lang.Number[] data1, java.lang.Number[] data2)</PRE><DL><DD>Calculates the correlation between two datasets. Both arrays should contain the same number of items. Null values are treated as zero. <P> Information about the correlation calculation was obtained from: http://trochim.human.cornell.edu/kb/statcorr.htm<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data1</CODE> - the first dataset.<DD><CODE>data2</CODE> - the second dataset.<DT><B>Returns:</B><DD>The correlation.</DL></DD></DL><HR><A NAME="getMovingAverage(java.lang.Number[], java.lang.Number[], int)"><!-- --></A><H3>getMovingAverage</H3><PRE>public static double[][] <B>getMovingAverage</B>(java.lang.Number[] xData, java.lang.Number[] yData, int period)</PRE><DL><DD>Returns a data set for a moving average on the data set passed in.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xData</CODE> - an array of the x data.<DD><CODE>yData</CODE> - an array of the y data.<DD><CODE>period</CODE> - the number of data points to average<DT><B>Returns:</B><DD>a double[][] the length of the data set in the first dimension, with two doubles for x and y in the second dimension</DL></DD></DL><HR><A NAME="getAverage(java.lang.Number[])"><!-- --></A><H3>getAverage</H3><PRE>public static double <B>getAverage</B>(java.lang.Number[] data)</PRE><DL><DD><B>Deprecated.</B> <I>Renamed calculateMean().</I><P><DD>Returns the average of a set of numbers.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data.<DT><B>Returns:</B><DD>The average of a set of numbers.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/jfree/data/statistics/HistogramType.html" title="class in org.jfree.data.statistics"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Statistics.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -