View Javadoc

1   /*
2    * CircleFit.java
3    *
4    * Created on March 23, 2006, 3:42 PM
5    *
6    *
7    */
8   
9   package org.lcsim.fit.threepointcircle;
10  
11  /**
12   * A class which encapsulates the result of a circle fit.
13   * @author Norman Graf
14   */
15  public class CircleFit
16  {
17      private double _x0;
18      private double _y0;
19      private double _r;
20      /**
21       * Creates a new instance of CircleFit
22       * @param x0 the x coordinate of the center of the circle
23       * @param y0 the y coordinate of the center of the circle
24       * @param r  the radius of the circle
25       */
26      public CircleFit(double x0, double y0, double r)
27      {
28          _x0 = x0;
29          _y0 = y0;
30          _r = r;
31      }
32      
33      /**
34       * The x coordinate of the center of the circle.
35       * @return the x coordinate of the center of the circle
36       */
37      public double x0()
38      {
39          return _x0;
40      }
41      
42      /**
43       * The y coordinate of the center of the circle
44       * @return
45       */
46      public double y0()
47      {
48          return _y0;
49      }
50      
51      /**
52       * The radius of the circle
53       * @return the radius of the circle
54       */
55      public double radius()
56      {
57          return _r;
58      }
59      
60      /**
61       * String representation of this object
62       * @return String representation of this object
63       */
64      public String toString()
65      {
66          return "CircleFit: x0= "+_x0+" y0= "+_y0+" r= "+_r;
67      }
68      
69  }