Adds sample and grows if necessary.
@param x
@param y
494796
public void add(double x, double y)
    {
        if (count >= xarr.length)
        {
            grow();
        }
        xarr[count] = x;
        yarr[count++] = y;
        minX = Math.min(minX, x);
        minY = Math.min(minY, y);
        maxX = Math.max(maxX, x);
        maxY = Math.max(maxY, y);
    }
369386
public double addPoint( double x, double y ) {
        pts.add(new Coordinate(x, y));
        return selection = pts.size() - 1;
    }
1071603
public void addSample(int[] sample, SP lastProperty) {
        S target = getOrCreateState(sample);
        if (!target.tryMergeStateProperty(lastProperty)) {
            throw new IllegalStateException();
        }
    }
8657
public void addAndSimplify(double x, double y) {
    // simplify curve when possible:
    final int len = data.size();
    if (len >= 4) {
      // Look at the previous 2 points
      final double l1x = data.get(len - 4);
      final double l1y = data.get(len - 3);
      final double l2x = data.get(len - 2);
      final double l2y = data.get(len - 1);
      // Differences:
      final double ldx = l2x - l1x;
      final double ldy = l2y - l1y;
      final double cdx = x - l2x;
      final double cdy = y - l2y;
      // X simplification
      if ((ldx == 0) && (cdx == 0)) {
        data.remove(len - 2, 2);
      }
      // horizontal simplification
      else if ((ldy == 0) && (cdy == 0)) {
        data.remove(len - 2, 2);
      }
      // diagonal simplification
      else if (ldy > 0 && cdy > 0) {
        if (Math.abs((ldx / ldy) - (cdx / cdy)) < THRESHOLD) {
          data.remove(len - 2, 2);
        }
      }
    }
    add(x, y);
  }
1358467
public void addNode (int x, int y, int dir)
    {
        _nodes.add(new PathNode(x, y, dir));
    }
908732
public static UnsignedInteger64 add(UnsignedInteger64 x, UnsignedInteger64 y) {
		return new UnsignedInteger64(x.bigInt.add(y.bigInt));
	}
521157
public function resizeXorY($x, $y)
    {
        if ($x > $y) {
            $this->resizeX($x);
        } else {
            $this->resizeY($y);
        }
    }
1018226
public final void addEdge(double x1, double y1, double x2, double y2) {
		if (y1 == y2)
			return;
			
		int dir = 1;
		if (y1 > y2) {
			double temp;
			temp = x1; x1 = x2; x2 = temp;
			temp = y1; y1 = y2; y2 = temp;
			dir = -1;
		}
		
		if (y2 < 0 || y1 >= height_)
			return;

		if (x1 < 0 && x2 < 0)
		{
			x1 = -1; x2 = -1;
		}
		else if (x1 >= width_ && x2 >= width_)
		{
			x1 = width_; x2 = width_;
		}
		
		//clip to extent
		double dxdy = (x2 - x1) / (y2 - y1);

		if (y2 > height_) {
			y2 = height_;
			x2 = dxdy * (y2 - y1) + x1;
		}
		
		if (y1 < 0) {
			x1 = dxdy * (0 - y1) + x1;
			y1 = 0;
		}

		//do not clip x unless it is too small or too big
		int bigX = Math.max(width_ + 1, 0x7fffff);
		if (x1 < -0x7fffff) {
		    //from earlier logic, x2 >= -1, therefore dxdy is not 0
			y1 = (0 - x1) / dxdy + y1;
			x1 = 0;
		}
		else if (x1 > bigX) {
			//from earlier logic, x2 <= width_, therefore dxdy is not 0
			y1 = (width_ - x1) / dxdy + y1;
			x1 = width_;
		}

		if (x2 < -0x7fffff) {
			//from earlier logic, x1 >= -1, therefore dxdy is not 0
			y2 = (0 - x1) / dxdy + y1;
			x2 = 0;
		}
		else if (x2 > bigX) {
			//from earlier logic, x1 <= width_, therefore dxdy is not 0
			y2 = (width_ - x1) / dxdy + y1;
			x2 = width_;
		}
		
		int ystart = (int)y1;
		int yend = (int)y2;
		if (ystart == yend)
			return;
		
		Edge e = new Edge();
		
		e.x = (long)(x1 * 4294967296.0);
		e.y = ystart;
		e.ymax = yend;
		e.dxdy = (long)(dxdy * 4294967296.0);
		e.dir = dir;
		
		if (ySortedEdges_ == null) {
			ySortedEdges_ = new Edge[height_];
		}

		e.next = ySortedEdges_[e.y];
		ySortedEdges_[e.y] = e;
		
		if (e.y < minY_)
			minY_ = e.y;
		
		if (e.ymax > maxY_)
			maxY_ = e.ymax;
		
		numEdges_++;
	}
1358952
static public double xy(double[] x, double[] y) {
    double result = 0.0;
    for (int i = 0; i < x.length; i++) {
      result += (x[i] * y[i]);
    }

    return (result);
  }
868017
public static double[] mergeCoords(double[] x, double[] y) {
        if (x.length != y.length)
            throw new IllegalArgumentException(
                            "Sample sizes must be the same for each data applyTransformToDestination.");
        double[] ret = new double[x.length + y.length];

        for (int i = 0; i < x.length; i++) {
            ret[i] = x[i];
            ret[i + 1] = y[i];
        }
        return ret;
    }
852116
public void add(final float x) {
        if(isInitializing) {
            q[ni++] = x;

            if(ni == 2*m+3+1) {
                Arrays.sort(q);
                isInitializing=false;
            }
        } else {
            addMeasurement(x);
        }
    }
1128122
def add_xy(self, x, y):
        
        self.imodel.add_xy(self._pre_x(x), self._pre_y(y))
450702
public void addPointToTail( int x , int y ) {
		int index = tail.start + tail.length*2;

		int block[];
		int blockIndex = tail.block + index/blockLength;
		if( blockIndex == blocks.size ) {
			tailBlockSize = 0;
			block = blocks.grow();
		} else {
			block = blocks.get( blockIndex );
		}
		tailBlockSize += 2;
		index %= blockLength;

		block[index ] = x;
		block[index+1 ] = y;
		tail.length += 1;
	}
1354286
public void addSample( double[] sampleData ) {
        if( A.getNumCols() != sampleData.length )
            throw new IllegalArgumentException("Unexpected sample size");
        if( sampleIndex >= A.getNumRows() )
            throw new IllegalArgumentException("Too many samples");

        for( int i = 0; i < sampleData.length; i++ ) {
            A.set(sampleIndex,i,sampleData[i]);
        }
        sampleIndex++;
    }
521861
public void addPoint(double x, double y) {
        numItems++;
        double xMinusMeanX = x - meanx;
        double yMinusMeanY = y - meany;
        sumsq += xMinusMeanX * yMinusMeanY * (numItems - 1) / numItems;
        meanx += xMinusMeanX / numItems;
        meany += yMinusMeanY / numItems;
    }
863066
public void learn(double[][] x, double y[]) {
        if (x.length != y.length) {
            throw new IllegalArgumentException(String.format("Input vector x of size %d not equal to length %d of y", x.length, y.length));
        }

        for (int i = 0; i < x.length; i++){
            learn(x[i], y[i]);
        }
    }
726154
public void set(double x, double y, double width, double height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
    }