コード例 #1
0
ファイル: sign.py プロジェクト: chrisdembia/cvxpy
    def promote(self, rows, cols):
        """Promotes the Sign's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
        """
        neg_mat = bu.promote(self.neg_mat, rows, cols)
        pos_mat = bu.promote(self.pos_mat, rows, cols)
        return Sign(neg_mat, pos_mat)
コード例 #2
0
ファイル: curvature.py プロジェクト: BvanP/cvxpy
    def promote(self, rows, cols):
        """Promotes the Curvature's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
        """
        cvx_mat = bu.promote(self.cvx_mat, rows, cols)
        conc_mat = bu.promote(self.conc_mat, rows, cols)
        nonconst_mat = bu.promote(self.nonconst_mat, rows, cols)
        return Curvature(cvx_mat, conc_mat, nonconst_mat)
コード例 #3
0
ファイル: sign.py プロジェクト: Jarvistonychen/cvxpy
    def promote(self, rows, cols, keep_scalars=True):
        """Promotes the Sign's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
            keep_scalars: Don't convert scalars to matrices.
        """
        neg_mat = bu.promote(self.neg_mat, rows, cols, keep_scalars)
        pos_mat = bu.promote(self.pos_mat, rows, cols, keep_scalars)
        return Sign(neg_mat, pos_mat)
コード例 #4
0
    def promote(self, rows, cols, keep_scalars=True):
        """Promotes the Sign's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
            keep_scalars: Don't convert scalars to matrices.
        """
        neg_mat = bu.promote(self.neg_mat, rows, cols, keep_scalars)
        pos_mat = bu.promote(self.pos_mat, rows, cols, keep_scalars)
        return Sign(neg_mat, pos_mat)
コード例 #5
0
ファイル: curvature.py プロジェクト: r0k3/cvxpy
    def promote(self, rows, cols, keep_scalars=True):
        """Promotes the Curvature's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
            keep_scalars: Don't convert scalars to matrices.
        """
        cvx_mat = bu.promote(self.cvx_mat, rows, cols, keep_scalars)
        conc_mat = bu.promote(self.conc_mat, rows, cols, keep_scalars)
        nonconst_mat = bu.promote(self.nonconst_mat, rows, cols, keep_scalars)
        return Curvature(cvx_mat, conc_mat, nonconst_mat)
コード例 #6
0
ファイル: curvature.py プロジェクト: Jarvistonychen/cvxpy
    def promote(self, rows, cols, keep_scalars=True):
        """Promotes the Curvature's internal matrices to the desired size.

        Args:
            rows: The number of rows in the promoted internal matrices.
            cols: The number of columns in the promoted internal matrices.
            keep_scalars: Don't convert scalars to matrices.
        """
        cvx_mat = bu.promote(self.cvx_mat, rows, cols, keep_scalars)
        conc_mat = bu.promote(self.conc_mat, rows, cols, keep_scalars)
        nonconst_mat = bu.promote(self.nonconst_mat, rows, cols, keep_scalars)
        return Curvature(cvx_mat, conc_mat, nonconst_mat)