|
-
3.42.2
|
This class represents a real constraint on a matrix. More...
Public Member Functions | |
| def | __init__ (self, name, num_rows, num_cols, cons_value, normalized=False, pos=False) |
| Constructs a real type constraint. More... | |
| def | project (self, M) |
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 a real constraint on a matrix.
It constrains a matrix by a column/row-vector 2-norm (ConstraintName.NORMCOL, ConstraintName.NORMLIN). \see ConstraintReal.__init__
| def pyfaust.factparams.ConstraintReal.__init__ | ( | self, | |
| name, | |||
| num_rows, | |||
| num_cols, | |||
| cons_value, | |||
normalized = False, |
|||
pos = False |
|||
| ) |
Constructs a real type constraint.
| name | (ConstraintName or str) must be a ConstraintName instance set with a value among NORMCOL, NORMLIN (cf. ConstraintName) or it can also be one of the more handy str aliases which are respectively: 'normcol', 'normlin'. |
| num_rows | (int) the number of columns of the constrained matrix. |
| num_cols | (int) the number of columns of the constrained matrix. |
| cons_value | (float) the parameter value of the constraint, it must be a float number that designates the 2-norm imposed to all columns (if name is ConstraintName.NORMCOL) or rows (if name is ConstraintName.NORMLIN). |
Examples
Reimplemented from pyfaust.factparams.ConstraintGeneric.
| def pyfaust.factparams.ConstraintReal.project | ( | self, | |
| M | |||
| ) |
Reimplemented from pyfaust.factparams.ConstraintGeneric.