|
-
3.42.2
|
This class represents an integer constraint on a matrix. More...
Public Member Functions | |
| def | __init__ (self, name, num_rows, num_cols, cons_value, normalized=True, pos=False) |
| def | project (self, M) |
| See: ConstraintGeneric.project More... | |
Public Member Functions inherited from pyfaust.factparams.ConstraintGeneric | |
| def | is_int_constraint (self) |
| Returns True if this constraint is a ConstraintInt, False otherwise. More... | |
| def | is_real_constraint (self) |
| Returns True if this constraint is a ConstraintReal, False otherwise. More... | |
| def | is_mat_constraint (self) |
| Returns True if this constraint is a ConstraintMat, False otherwise. More... | |
| def | __repr__ (self) |
Additional Inherited Members | |
Public Attributes inherited from pyfaust.factparams.ConstraintGeneric | |
| normalized | |
| pos | |
Properties inherited from pyfaust.factparams.ConstraintGeneric | |
| name = property | |
| Property to access the ConstraintName of the constraint. More... | |
| shape = property | |
This class represents an integer constraint on a matrix.
It constrains a matrix by its column/row-vectors sparsity or also called ConstraintName.SPLIN, ConstraintName.SPCOL, ConstraintName.SPLINCOL. The other constraint names of this type are: ConstraintName.SP, ConstraintName.SP_POS, which both designate the 0-norm based constraint of the matrix with besides for SP_POS the zero replacement of all negative values. \see ConstraintInt.__init__
| def pyfaust.factparams.ConstraintInt.__init__ | ( | self, | |
| name, | |||
| num_rows, | |||
| num_cols, | |||
| cons_value, | |||
normalized = True, |
|||
pos = False |
|||
| ) |
| name | (ConstraintName or str) it must be a ConstraintName instance set with a value among SP_POS, SP, SPLIN, SPCOL, SPLINCOL, SPTRIU, SPTRIL, SPSYMM (cf. ConstraintName)
|
| num_rows | (int) the number of rows of the constrained matrix. |
| num_cols | (int) the number of columns of the constrained matrix. |
| cons_value | (int) the integer value of the constraint (the 0-norm as sparsity). |
Examples
Reimplemented from pyfaust.factparams.ConstraintGeneric.
| def pyfaust.factparams.ConstraintInt.project | ( | self, | |
| M | |||
| ) |
See: ConstraintGeneric.project
Reimplemented from pyfaust.factparams.ConstraintGeneric.