SMICA  1.0
Public Member Functions | List of all members
smica.optim.Parray Class Reference
Inheritance diagram for smica.optim.Parray:

Public Member Functions

def __init__
 
def up
 
def get
 
def get_mask
 
def set_mask
 
def get_free
 
def get_nfree
 
def set_free
 
def is_fixed
 

Detailed Description

A parameter array.

A parameter array is an array of arbitrary shape which might
contain some fixed values.  It contains the array itself plus an
indices array which flags the fixed entries.

Constructor & Destructor Documentation

def smica.optim.Parray.__init__ (   self,
  arr,
  fixed = None 
)
Init values and set fixed indices.

Parameters
----------
arr : array-like, arbitrary shape.
fixed : array-like, same shape than arr.
Entries which are not equal to zero point to
fixed indices.  It is also possible to use keywords 'all' and
'null' to fix (respectively) all parameters or none.

Member Function Documentation

def smica.optim.Parray.get (   self)
Return parameter array.
def smica.optim.Parray.get_free (   self,
  arr = None 
)
Return array as a vector of free parameters.

Parameters
----------
arr : array-like, same shape than self.arr.
      if None, values are read from inner array.

Returns
-------
array, shape (N,1) where N is the number of free entries.
def smica.optim.Parray.get_mask (   self)
Get a mask.

Returns
-------
array of same shape than inner array.
Entries which are equal to zero point to
fixed indices (others are set to one).
def smica.optim.Parray.get_nfree (   self)
Return number of free parameters (ie non fixed entries).
def smica.optim.Parray.is_fixed (   self)
Return true if all parameters are fixed.
def smica.optim.Parray.set_free (   self,
  v 
)
Set free parameters from vector.

Parameters
----------
v : array-like, shape (N,1) where N is the number of free entries.
def smica.optim.Parray.set_mask (   self,
  fixed = 'all' 
)
Set fixed indices.

Parameters
----------
fixed : array-like, same shape than arr.
Entries which are not equal to zero point to
fixed indices.  It is also possible to use keywords 'all' and
'null' to fix (respectively) all parameters or none.
def smica.optim.Parray.up (   self,
  arr,
  rg = None 
)
Set new array values except fixed ones.

Parameters
----------
arr : array-like, arbitrary shape.
rg : range of entries to be updated.

The documentation for this class was generated from the following file: