Package parsimony :: Package functions :: Module penalties :: Class LinearVariableConstraint
[hide private]
[frames] | no frames]

Class LinearVariableConstraint

source code

               object --+        
                        |        
      properties.Function --+    
                            |    
 properties.IndicatorFunction --+
                                |
                   object --+   |
                            |   |
        properties.Constraint --+
                                |
                   object --+   |
                            |   |
properties.ProjectionOperator --+
                                |
                               LinearVariableConstraint

Represents a linear constraint

    r = Ax,

where both x and r are variables.

Parameters
----------
A : Numpy or sparse scipy array. The linear map between x and r.

Instance Methods [hide private]
 
__init__(self, A, penalty_start=0, solver=linalgs.SparseSolver())
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
reset(self)
Free any cached computations from previous use of this Function.
source code
 
f(self, xr)
The function value of this indicator function.
source code
 
feasible(self, xr)
Feasibility of the constraint at points x and r.
source code
 
proj(self, xr)
The projection operator corresponding to the function.
source code

Inherited from properties.Function: get_params, set_params

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __abstractmethods__ = frozenset([])

Inherited from properties.IndicatorFunction: __metaclass__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, A, penalty_start=0, solver=linalgs.SparseSolver())
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

reset(self)

source code 

Free any cached computations from previous use of this Function.

Overrides: properties.Function.reset
(inherited documentation)

f(self, xr)

source code 
The function value of this indicator function. The function value is
0 if the constraint is feasible and infinite otherwise.

Parameters
----------
xr : List or tuple with two elements, numpy arrays. The first element
        is x and the second is r.

Overrides: properties.Function.f

feasible(self, xr)

source code 
Feasibility of the constraint at points x and r.

From the interface Constraint.

Parameters
----------
xr : List or tuple with two elements, numpy arrays. The first element
        is x and the second is r.

Overrides: properties.Constraint.feasible

proj(self, xr)

source code 
The projection operator corresponding to the function.

From the interface ProjectionOperator.

Parameters
----------
xr : List or tuple with two elements, numpy arrays. The first element
        is x and the second is r.

Overrides: properties.ProjectionOperator.proj