Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
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)
Exemple #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)
Exemple #5
0
    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)
Exemple #6
0
    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)