Sets the matrix element at the specified row and column.
171685
public void setElement (int row, int col, float value) {
        switch (col) {
        case 0:
            switch (row) {
            case 0: m00 = value; return;
            case 1: m01 = value; return;
            case 2: m02 = value; return;
            }
            break;
        case 1:
            switch (row) {
            case 0: m10 = value; return;
            case 1: m11 = value; return;
            case 2: m12 = value; return;
            }
            break;
        case 2:
            switch (row) {
            case 0: m20 = value; return;
            case 1: m21 = value; return;
            case 2: m22 = value; return;
            }
            break;
        }
        throw new ArrayIndexOutOfBoundsException();
    }
802870
public void setMatrix(int[] r, int j0, int j1, Matrix X)
    {
        try
        {
            for (int i = 0; i < r.length; i++)
            {
                for (int j = j0; j <= j1; j++)
                {
                    A[r[i]][j] = X.get(i, j - j0);
                }
            }
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            throw new ArrayIndexOutOfBoundsException("Submatrix indices");
        }
    }
716087
public void setMatrix(int[] matrix) {
		this.matrix = matrix;
		sum = 0;
		for (int i = 0; i < matrix.length; i++)
			sum += matrix[i];
	}
1368873
public void setMatrix(int i0, int i1, int j0, int j1, Matrix X)
    {
        try
        {
            for (int i = i0; i <= i1; i++)
            {
                for (int j = j0; j <= j1; j++)
                {
                    A[i][j] = X.get(i - i0, j - j0);
                }
            }
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            throw new ArrayIndexOutOfBoundsException("Submatrix indices");
        }
    }
1116825
public void set(int r, int c, double value) throws MatrixException
    {
        if ((r < 0) || (r >= nRows) || (c < 0) || (c >= nCols)) {
            throw new MatrixException(MatrixException.INVALID_INDEX);
        }

        values[r][c] = value;
    }
933781
public static void divideRowBy(double[][] matrix, int aRow, int fromCol, double value) {
		int cols = matrix[0].length;
		double[] r = matrix[aRow];
		for (int col = fromCol; col < cols; col++) {
			r[col] /= value;
		}
	}
422648
public void setRow(int row, DoubleVector data) {
        checkIndices(row, data.length() -1);

        if (cols <= data.length())
            cols = data.length();

        Vectors.copy(updateRow(row), data);
    }
790394
def set_row(self, index, values):
        
        if self._sort:
            exists, i = sorted_exists(self._index, index)
            if not exists:
                self._insert_row(i, index)
        else:
            try:
                i = self._index.index(index)
            except ValueError:  # new row
                i = len(self._index)
                self._add_row(index)
        if isinstance(values, dict):
            if not (set(values.keys()).issubset(self._columns)):
                raise ValueError('keys of values are not all in existing columns')
            for c, column in enumerate(self._columns):
                self._data[c][i] = values.get(column, self._data[c][i])
        else:
            raise TypeError('cannot handle values of this type.')
163446
public void apply(Matrix H, int column, int i1, int i2) {
        double temp = c * H.get(i1, column) + s * H.get(i2, column);
        H.set(i2, column, -s * H.get(i1, column) + c * H.get(i2, column));
        H.set(i1, column, temp);
    }
776138
public static void setIdentity( DMatrix1Row mat )
    {
        int width = mat.numRows < mat.numCols ? mat.numRows : mat.numCols;

        Arrays.fill(mat.data,0,mat.getNumElements(),0);

        int index = 0;
        for( int i = 0; i < width; i++ , index += mat.numCols + 1) {
            mat.data[index] = 1;
        }
    }
493007
public void setValueAt( int col, int row, double value ) {
        if (makeNew) {
            if (isInRaster(col, row)) {
                ((WritableRandomIter) iter).setSample(col, row, 0, value);
            } else {
                throw new RuntimeException("Setting value outside of raster.");
            }
        } else {
            throw new RuntimeException("Writing not allowed.");
        }
    }
1145792
public static void multRow(Matrix A, int i, double c)
    {
        multRow(A, i, 0, A.cols(), c);
    }
632848
public static void swapRow(Matrix A, int j, int k)
    {
        swapCol(A, j, k, 0, A.cols());
    }
741450
public Matrix4x3f set(Vector3fc col0, Vector3fc col1, Vector3fc col2, Vector3fc col3) {
        if (col0 instanceof Vector3f &&
            col1 instanceof Vector3f &&
            col2 instanceof Vector3f &&
            col3 instanceof Vector3f) {
            MemUtil.INSTANCE.set(this, (Vector3f) col0, (Vector3f) col1, (Vector3f) col2, (Vector3f) col3);
        } else {
            setVector3fc(col0, col1, col2, col3);
        }
        this.properties = 0;
        return this;
    }
30244
public Matrix insertRow(int i, Vector row) {
        if (i > rows || i < 0) {
            throw new IndexOutOfBoundsException("Illegal row number, must be 0.." + rows);
        }

        Matrix result;
        if (columns == 0) {
            result = blankOfShape(rows + 1, row.length());
        } else {
            result = blankOfShape(rows + 1, columns);
        }

        for (int ii = 0; ii < i; ii++) {
            result.setRow(ii, getRow(ii));
        }

        result.setRow(i, row);

        for (int ii = i; ii < rows; ii++) {
            result.setRow(ii + 1, getRow(ii));
        }

        return result;
    }
384499
def set_row(row, val)
      # Setter
      if !row.is_a?(String) || (!val.is_a?(Hash) && !val.is_a?(Array))
        raise ArgumentError, 'Illegal argument type'
      elsif val.is_a?(Array) && val.size != col_keys.size
        raise ArgumentError, 'Column size not match'
      end

      case val
      when Array
        if @row_keys[row]
          row = @row_keys[row]
          @content[row] = val
        else
          @row_keys[row] = @row_keys.size
          @content << val
        end
      when Hash
        unless @row_keys[row]
          @row_keys[row] = @row_keys.size
          @content << ([''] * @col_keys.size)
        end

        row = @row_keys[row]
        val.each do |k, v|
          col = @col_keys[k]
          @content[row][col] = v if col
        end
      end

      self
    end
31294
public void setRow (int row, Vector3 v) {
        setRow(row, v.x(), v.y(), v.z());
    }