Set assembled matrix on processor 0.

        The row and column indices (irn & jcn) should be one based.
481961
def set_centralized_assembled(self, irn, jcn, a):
        
        self.set_centralized_assembled_rows_cols(irn, jcn)
        self.set_centralized_assembled_values(a)
619565
public static void swapCol(Matrix A, int j, int k)
    {
        swapCol(A, j, k, 0, A.rows());
    }
778698
def setCols(self, columns):
        
        self._raster[1] = columns
        if self._raster[0] == 0:
            self._raster[0] = 1
1302048
def set_data_matrix(self, X):
        
        X = check_array(X, accept_sparse=sparse_formats)
        self.X = X
1335365
public void set(int row, int col, double val) {
        checkIndices(row, col);

        if (row != col) {
            throw new IllegalArgumentException(
                    "cannot set non-diagonal elements in a DiagonalMatrix");
        }
        values[row] = val;
    }
273375
public static void setCol(final double[][] m1, final int c, final double[] column) {
    assert column.length == m1.length : ERR_DIMENSIONS;
    for(int i = 0; i < m1.length; i++) {
      m1[i][c] = column[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");
        }
    }
1217974
public void setOrtho() {
		matrixMode(MatrixMode.PROJECTION);
		resetMatrix();
		gl.glOrtho(0, this.width, 0, this.height, -1.0e10, 1.0e10);
		matrixMode(MatrixMode.MODELVIEW);
		resetMatrix();
	}
284548
def init1(self, dae):
        """"""
        self.v0 = matrix(dae.y[self.v])
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);
    }
86188
def set_vf0(self, vf):
        """"""
        self.vf0 = vf
        self.system.dae.y[self.vf] = matrix(vf)
798585
public static void setIdentity( ZMatrixRMaj mat )
    {
        int width = mat.numRows < mat.numCols ? mat.numRows : mat.numCols;

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

        int index = 0;
        int stride = mat.getRowStride();

        for( int i = 0; i < width; i++ , index += stride + 2) {
            mat.data[index] = 1;
        }
    }
497390
public static Matrix zero(int rows, int columns) {
        long size = (long) rows * columns;
        return size > 1000 ? SparseMatrix.zero(rows, columns) : DenseMatrix.zero(rows, columns);
    }
1240852
public static void byRow(Matrix m) {
        for (int i = 0; i < m.rows(); ++i) {
            double rowSum = 0;
            for (int j = 0; j < m.columns(); ++j)
                rowSum += m.get(i,j);

            // Skip row whose sume is zero.
            if (rowSum == 0) 
                continue;
            for (int j = 0; j < m.columns(); ++j)
                m.set(i,j, m.get(i,j) / rowSum);
        }
    }
372182
def set_rotation_matrices(self):
        """"""
        for i in range(len(self.vertices)):
            self.vertices[i].meta['C'] = rotation_matrix(self.vertices[i].meta['axis'][0], 
                                                         self.vertices[i].meta['axis'][1], 
                                                         self.vertices[i].meta['axis'][2], 
                                                         self.vertices[i].meta['axis_order'],
                                                         degrees=True)
            # Todo: invert this by applying angle operations in reverse order
            self.vertices[i].meta['Cinv'] = np.linalg.inv(self.vertices[i].meta['C'])
770261
public static void setMatrix(final double[][] m1, final int r0, final int r1, final int c0, final int c1, final double[][] m2) {
    assert r0 <= r1 && c0 <= c1 : ERR_INVALID_RANGE;
    assert r1 <= m1.length && c1 <= m1[0].length : ERR_MATRIX_DIMENSIONS;
    final int coldim = c1 - c0;
    for(int i = r0; i < r1; i++) {
      System.arraycopy(m2[i - r0], 0, m1[i], c0, coldim);
    }
  }
910903
public void set( T a ) {
        if( a.getType() == getType() )
            mat.set(a.getMatrix());
        else {
            setMatrix(a.mat.copy());
        }
    }