Creates a new Matrix that stores <i>A*c</i>
@param c the scalar constant to multiply by
@return a new vector <i>A*c</i>
513538
public Matrix multiply(double c)
    {
        Matrix toReturn = getThisSideMatrix(null);
        toReturn.mutableMultiply(c);
        return toReturn;
    }
151337
public Color multiply(Color c) {
		return new Color(r * c.r, g * c.g, b * c.b, a * c.a);
	}
1275837
def copy(self):
        
        c = matrix()
        c.tt = self.tt.copy()
        c.n = self.n.copy()
        c.m = self.m.copy()
        return c
912904
public static void multRow(Matrix A, int i, double[] c)
    {
        if(A.cols() != c.length)
            throw new ArithmeticException("Can not perform row update, length miss match " + A.cols() + " and " + c.length);
        multRow(A, i, 0, c.length, c);
    }
569420
function() {
            var m = this.m,
                a = m.a,
                b = m.b,
                c = m.c,
                d = m.d,
                e = m.e,
                f = m.f,
                k, aa, bb, cc, dd, ee, ff;
            k = a * d - b * c;
            aa = d / k;
            bb = -b / k;
            cc = -c / k;
            dd = a / k;
            ee = (c * f - e * d) / k;
            ff = (b * e - a * f) / k;
            return new Matrix(aa, bb, cc, dd, ee, ff);
        }
1059044
public static DMatrixRMaj concatColumnsMulti(DMatrixRMaj ...m ) {
        int rows = 0;
        int cols = 0;

        for (int i = 0; i < m.length; i++) {
            rows = Math.max(rows,m[i].numRows);
            cols += m[i].numCols;
        }
        DMatrixRMaj R = new DMatrixRMaj(rows,cols);

        int col = 0;
        for (int i = 0; i < m.length; i++) {
            insert(m[i],R,0,col);
            col += m[i].numCols;
        }

        return R;
    }
1305358
public static SVD factorize(Matrix A) throws NotConvergedException {
        return new SVD(A.numRows(), A.numColumns()).factor(new DenseMatrix(A));
    }
109927
public static void multCol(Matrix A, int j, double c)
    {
        multCol(A, j, 0, A.rows(), c);
    }
1157354
public static DenseMatrix matrix(double[] A) {
        if (nlmatrixZeros != null) {
            try {
                return (DenseMatrix) nlmatrixArray.newInstance(A);
            } catch (Exception e) {
                logger.error("Failed to call NLMatrix(double[]): {}", e);
            }
        }

        return new JMatrix(A);
    }
1203410
public static ImmutableVector4 createVector(final double x, final double y, final double z, final double h) {
		return new ImmutableVector4(new ImmutableData(4, 1) {
			@Override
			public double getQuick(int row, int col) {
				switch (row) {
					case 0:
						return x;
					case 1:
						return y;
					case 2:
						return z;
					default:
						return h;
				}
			}
		});
	}
1293528
public Matrix transposeMultiply(Matrix B)
    {
        Matrix C = new DenseMatrix(this.cols(), B.cols());
        transposeMultiply(B, C);
        return C;
    }
939324
public Matrix multiply(Matrix B)
    {
        Matrix C = new DenseMatrix(this.rows(), B.cols());
        multiply(B, C);
        return C;
    }
732700
private static Vector newVector(final int size) {
		final Vector v = new Vector(size);
		v.setSize(size);
		return v;
	}
289465
public static float sum(float[] c) {
		float s = 0;
		for (int i = 0; i < c.length; i++) {
			s+=c[i];
		}
		return s;
	}
1182884
public static LQ factorize(Matrix A) {
        return new LQ(A.numRows(), A.numColumns()).factor(new DenseMatrix(A));
    }
1077707
public Matrix multiplyTranspose(final Matrix B)
    {
        Matrix C = new DenseMatrix(this.rows(), B.rows());
        multiplyTranspose(B, C);
        return C;
    }
389838
@SuppressWarnings("unchecked")
  private void createVector() {
    fpVector = new List[vectorSize];
    keyVector = new List[vectorSize];
    ratio = new double[vectorSize];

    for (int i = 0; i < vectorSize; i++) {
      fpVector[i] = Collections.synchronizedList(new ArrayList<Key>());
      keyVector[i] = Collections.synchronizedList(new ArrayList<Key>());
      ratio[i] = 0.0;
    }
  }