Exchange the values of <code>this</code> matrix with the given <code>other</code> matrix.

@param other
the other matrix to exchange the values with
@return this
341857
public Matrix4x3d swap(Matrix4x3d other) {
        double tmp;
        tmp = m00; m00 = other.m00; other.m00 = tmp;
        tmp = m01; m01 = other.m01; other.m01 = tmp;
        tmp = m02; m02 = other.m02; other.m02 = tmp;
        tmp = m10; m10 = other.m10; other.m10 = tmp;
        tmp = m11; m11 = other.m11; other.m11 = tmp;
        tmp = m12; m12 = other.m12; other.m12 = tmp;
        tmp = m20; m20 = other.m20; other.m20 = tmp;
        tmp = m21; m21 = other.m21; other.m21 = tmp;
        tmp = m22; m22 = other.m22; other.m22 = tmp;
        tmp = m30; m30 = other.m30; other.m30 = tmp;
        tmp = m31; m31 = other.m31; other.m31 = tmp;
        tmp = m32; m32 = other.m32; other.m32 = tmp;
        int props = properties;
        this.properties = other.properties;
        other.properties = props;
        return this;
    }
116071
public Matrix3f mulComponentWise(Matrix3fc other, Matrix3f dest) {
        dest.m00 = m00 * other.m00();
        dest.m01 = m01 * other.m01();
        dest.m02 = m02 * other.m02();
        dest.m10 = m10 * other.m10();
        dest.m11 = m11 * other.m11();
        dest.m12 = m12 * other.m12();
        dest.m20 = m20 * other.m20();
        dest.m21 = m21 * other.m21();
        dest.m22 = m22 * other.m22();
        return dest;
    }
357953
public void set(LongDoubleSortedVector other) {
        this.used = other.used;
        this.indices = LongArrays.copyOf(other.indices);
        this.values = DoubleArrays.copyOf(other.values);
    }
814078
public Matrix3f set(Matrix3fc m) {
        if (m instanceof Matrix3f) {
            MemUtil.INSTANCE.copy((Matrix3f) m, this);
        } else {
            setMatrix3fc(m);
        }
        return this;
    }
1139071
public Matrix4 set (IMatrix4 other) {
        return set(other.m00(), other.m10(), other.m20(), other.m30(),
                   other.m01(), other.m11(), other.m21(), other.m31(),
                   other.m02(), other.m12(), other.m22(), other.m32(),
                   other.m03(), other.m13(), other.m23(), other.m33());
    }
263940
public void copyTo(Matrix other)
    {
        if (this.rows() != other.rows() || this.cols() != other.cols())
            throw new ArithmeticException("Matrices are not of the same dimension");
        for(int i = 0; i < rows(); i++)
            this.getRowView(i).copyTo(other.getRowView(i));
    }
528426
public LongIntSortedVector getSum(LongIntVector other) {
        LongIntSortedVector sum = new LongIntSortedVector(this);
        sum.add(other);
        return sum;
    }
32812
public synchronized void add(ConfusionMatrix<T> other) {
        for (T actual : other.matrix.keySet()) {
            Multiset<T> counts = other.matrix.get(actual);
            for (T predicted : counts.elementSet()) {
                int count = counts.count(predicted);
                this.add(actual, predicted, count);
            }
        }
    }
80469
public void elemAdd(VTensor other) {
        checkEqualSize(this, other);
        for (int c = 0; c < this.size(); c++) {
            addValue(c, other.getValue(c));
        }
    }
590116
static <T> void crossover(
		final MSeq<T> that,
		final MSeq<T> other,
		final int[] indexes
	) {

		for (int i = 0; i < indexes.length - 1; i += 2) {
			final int start = indexes[i];
			final int end = indexes[i + 1];
			that.swap(start, end, other, start);
		}
		if (indexes.length%2 == 1) {
			final int index = indexes[indexes.length - 1];
			that.swap(index, min(that.length(), other.length()), other, index);
		}
	}
1179487
public void merge(final Vector other) {
	for(int i =0; i<other.size(); i++) {
	    this.merge((ByteRange)other.elementAt(i));
	}
    }
1039241
public Matrix3 set (
        double m00, double m10, double m20,
        double m01, double m11, double m21,
        double m02, double m12, double m22) {
        this.m00 = m00; this.m01 = m01; this.m02 = m02;
        this.m10 = m10; this.m11 = m11; this.m12 = m12;
        this.m20 = m20; this.m21 = m21; this.m22 = m22;
        return this;
    }
201353
public Matrix plus(final Matrix B)
    {
        final Matrix A = this;

        if ((B.m_rows != A.m_rows) || (B.m_columns != A.m_columns))
        {
            throw new GeometryException("Illegal matrix dimensions");
        }
        final Matrix C = new Matrix(m_rows, m_columns);

        for (int i = 0; i < m_rows; i++)
        {
            for (int j = 0; j < m_columns; j++)
            {
                C.m_data[i][j] = A.m_data[i][j] + B.m_data[i][j];
            }
        }
        return C;
    }
565677
public AffineTransform set (AffineTransform other) {
        return setTransform(other.m00, other.m01, other.m10, other.m11, other.tx, other.ty);
    }
1077901
public void product(IntDoubleVector other) {
        // TODO: Add special case for IntDoubleDenseVector.
        for (int i=0; i<size; i++) {
            elements[i + start] *= other.get(i);
        }
    }
468702
public Bbox intersection(Bbox other) {
		if (!this.intersects(other)) {
			return null;
		} else {
			double minx = other.getX() > this.getX() ? other.getX() : this.getX();
			double maxx = other.getEndPoint().getX() < this.getEndPoint().getX() ? other.getEndPoint().getX() : this
					.getEndPoint().getX();
			double miny = other.getY() > this.getY() ? other.getY() : this.getY();
			double maxy = other.getEndPoint().getY() < this.getEndPoint().getY() ? other.getEndPoint().getY() : this
					.getEndPoint().getY();
			return new Bbox(minx, miny, (maxx - minx), (maxy - miny));
		}
	}
624185
public final Assignment union(Assignment other) {
    Preconditions.checkNotNull(other);
    if (other.size() == 0) {
      return this;
    } if (vars.length == 0) {
      return other;
    }

    // Merge varnums / values
    int[] otherNums = other.getVariableNumsArray();
    int[] myNums = getVariableNumsArray();
    Object[] otherVals = other.getValuesArray();
    Object[] myVals = getValuesArray();

    int[] mergedNums = new int[otherNums.length + myNums.length];
    Object[] mergedVals = new Object[otherNums.length + myNums.length];

    int i = 0;
    int j = 0;
    int numFilled = 0;
    while (i < otherNums.length && j < myNums.length) {
      if (otherNums[i] < myNums[j]) {
        mergedNums[numFilled] = otherNums[i];
        mergedVals[numFilled] = otherVals[i];
        i++;
        numFilled++;
      } else if (otherNums[i] > myNums[j]) {
        mergedNums[numFilled] = myNums[j];
        mergedVals[numFilled] = myVals[j];
        j++;
        numFilled++;
      } else {
        Preconditions.checkState(false, "Cannot combine non-disjoint assignments: %s with %s", this, other);
      }
    }
    // One list might still have elements in it.
    while (i < otherNums.length) {
      mergedNums[numFilled] = otherNums[i];
      mergedVals[numFilled] = otherVals[i];
      i++;
      numFilled++;
    }
    while (j < myNums.length) {
      mergedNums[numFilled] = myNums[j];
      mergedVals[numFilled] = myVals[j];
      j++;
      numFilled++;
    }
    Preconditions.checkState(numFilled == mergedNums.length);
    return Assignment.fromSortedArrays(mergedNums, mergedVals);
  }