⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 line.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#setLine(double[], double[])">setLine</A></B>(double[]&nbsp;x,        double[]&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given a set of data points , , fit them to a straight line <var>y</var>=<var>b</var>+<var>m</var><var>x</var> in a least-squares senses. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#setLine(double, double)">setLine</A></B>(double&nbsp;slope,        double&nbsp;y0)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the slope and offset for this line. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Line2D)">setLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Line2D.html" title="class or interface in java.awt.geom">Line2D</A>&nbsp;line)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a line colinear with the specified line segment. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)">setLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A>&nbsp;p1,        <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A>&nbsp;p2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a line through the specified point. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of this line. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#translate(double, double)">translate</A></B>(double&nbsp;dx,          double&nbsp;dy)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translate the line. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#x(double)">x</A></B>(double&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute <var>x</var>=<var>f</var><sup>-1</sup>(<var>y</var>). </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/geotools/math/Line.html#y(double)">y</A></B>(double&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute <var>y</var>=<var>f</var>(<var>x</var>). </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Line()"><!-- --></A><H3>Line</H3><PRE>public <B>Line</B>()</PRE><DL><DD>Construct an initially unitialized line. All methods will returns <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Double.html#NaN" title="class or interface in java.lang"><CODE>Double.NaN</CODE></A>.<P></DL><HR><A NAME="Line(double, double)"><!-- --></A><H3>Line</H3><PRE>public <B>Line</B>(double&nbsp;slope,            double&nbsp;y0)</PRE><DL><DD>Construct a line with the specified slope and offset. The linear equation will be <var>y</var>=<var>slope</var>*<var>x</var>+<var>y0</var>.<P><DT><B>Parameters:</B><DD><CODE>slope</CODE> - The slope.<DD><CODE>y0</CODE> - The <var>y</var> value at <var>x</var>==0.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#setLine(double, double)"><CODE>setLine(double, double)</CODE></A></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="setLine(double, double)"><!-- --></A><H3>setLine</H3><PRE>public void <B>setLine</B>(double&nbsp;slope,                    double&nbsp;y0)</PRE><DL><DD>Set the slope and offset for this line. The linear equation will be <var>y</var>=<var>slope</var>*<var>x</var>+<var>y0</var>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>slope</CODE> - The slope.<DD><CODE>y0</CODE> - The <var>y</var> value at <var>x</var>==0.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)"><CODE>setLine(Point2D, Point2D)</CODE></A>, <A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Line2D)"><CODE>setLine(Line2D)</CODE></A>, <A HREF="../../../org/geotools/math/Line.html#setLine(double[], double[])"><CODE>setLine(double[], double[])</CODE></A></DL></DD></DL><HR><A NAME="setLine(java.awt.geom.Line2D)"><!-- --></A><H3>setLine</H3><PRE>public void <B>setLine</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Line2D.html" title="class or interface in java.awt.geom">Line2D</A>&nbsp;line)</PRE><DL><DD>Set a line colinear with the specified line segment. The line will continues toward infinity after the line segment extremities.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>line</CODE> - The line segment.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)"><CODE>setLine(Point2D,Point2D)</CODE></A></DL></DD></DL><HR><A NAME="setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)"><!-- --></A><H3>setLine</H3><PRE>public void <B>setLine</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A>&nbsp;p1,                    <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Point2D.html" title="class or interface in java.awt.geom">Point2D</A>&nbsp;p2)</PRE><DL><DD>Set a line through the specified point. The line will continues toward infinity after the point.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p1</CODE> - Coordinate of the first point.<DD><CODE>p2</CODE> - Coordinate of the second point.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#setLine(java.awt.geom.Line2D)"><CODE>setLine(Line2D)</CODE></A></DL></DD></DL><HR><A NAME="setLine(double[], double[])"><!-- --></A><H3>setLine</H3><PRE>public double <B>setLine</B>(double[]&nbsp;x,                      double[]&nbsp;y)               throws <A HREF="http://java.sun.com/products/java-media/3D/forDevelopers/j3dapi/javax/vecmath/MismatchedSizeException.html" title="class or interface in javax.vecmath">MismatchedSizeException</A></PRE><DL><DD>Given a set of data points , , fit them to a straight line <var>y</var>=<var>b</var>+<var>m</var><var>x</var> in a least-squares senses. This method assume that the <var>x</var> values are precise and all uncertainty is in <var>y</var>. <p>Reference: <a href="http://shakti.cc.trincoll.edu/~palladin/courses/ENGR431/statistics/node9.html">Linear Regression Curve Fitting</a>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - Vector of <var>x</var> values (independant variable).<DD><CODE>y</CODE> - Vector of <var>y</var> values (dependant variable).<DT><B>Returns:</B><DD>Estimation of the correlation coefficient. The closer         this coefficient is to 1, the better the fit.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/products/java-media/3D/forDevelopers/j3dapi/javax/vecmath/MismatchedSizeException.html" title="class or interface in javax.vecmath">MismatchedSizeException</A></CODE> - if <var>x</var> and <var>y</var> don't have the same length.</DL></DD></DL><HR><A NAME="translate(double, double)"><!-- --></A><H3>translate</H3><PRE>public void <B>translate</B>(double&nbsp;dx,                      double&nbsp;dy)</PRE><DL><DD>Translate the line. The slope stay unchanged.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>dx</CODE> - The horizontal translation.<DD><CODE>dy</CODE> - The vertical translation.</DL></DD></DL><HR><A NAME="y(double)"><!-- --></A><H3>y</H3><PRE>public final double <B>y</B>(double&nbsp;x)</PRE><DL><DD>Compute <var>y</var>=<var>f</var>(<var>x</var>). If the line is vertical, then this method returns an infinite value. This method is final for performance reason.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - The <var>x</var> value.<DT><B>Returns:</B><DD>The <var>y</var> value.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#x(double)"><CODE>x(double)</CODE></A></DL></DD></DL><HR><A NAME="x(double)"><!-- --></A><H3>x</H3><PRE>public final double <B>x</B>(double&nbsp;y)</PRE><DL><DD>Compute <var>x</var>=<var>f</var><sup>-1</sup>(<var>y</var>). If the line is horizontal, then this method returns an infinite value. This method is final for performance reason.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>y</CODE> - The <var>y</var> value.<DT><B>Returns:</B><DD>The <var>x</var> value.<DT><B>See Also:</B><DD><A HREF="../../../org/geotools/math/Line.html#y(double)"><CODE>y(double)</CODE></A></DL></DD></DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -