PyPedal::pyp_newclasses::NewAMatrix Class Reference

NewAMatrix provides an instance of a numerator relationship matrix as a Numarray array of floats with some convenience methods. More...

List of all members.

Public Member Functions

def __init__
 __init__() initializes a NewAMatrix object.
def form_a_matrix
 form_a_matrix() calls pyp_nrm/fast_a_matrix() or pyp_nrm/fast_a_matrix_r() to form a NRM from a pedigree.
def load
 load() uses the Numarray Array Function "fromfile()" to load an array from a binary file.
def save
 save() uses the Numarray method "tofile()" to save an array to a binary file.
def printme
 printme() prints the NRM to the screen.

Public Attributes

 kw
 nrm


Detailed Description

NewAMatrix provides an instance of a numerator relationship matrix as a Numarray array of floats with some convenience methods.

The idea here is to provide a wrapper around a NRM so that it is easier to work with. For large pedigrees it can take a long time to compute the elements of A, so there is real value in providing an easy way to save and retrieve a NRM once it has been formed.

Definition at line 2496 of file pyp_newclasses.py.


Member Function Documentation

def PyPedal::pyp_newclasses::NewAMatrix::__init__ (   self,
  kw 
)

__init__() initializes a NewAMatrix object.

Parameters:
self Reference to the current NewAMatrix() object
kw A dictionary of options.
Returns:
An instance of a NewAMatrix() object object
Initialize a new numerator relationship matrix.

Definition at line 2503 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::NewAMatrix::form_a_matrix (   self,
  pedigree 
)

form_a_matrix() calls pyp_nrm/fast_a_matrix() or pyp_nrm/fast_a_matrix_r() to form a NRM from a pedigree.

Parameters:
pedigree The pedigree used to form the NRM.
Returns:
A NRM on success, 0 on failure. integer
form_a_matrix() calls pyp_nrm/fast_a_matrix() or pyp_nrm/fast_a_matrix_r()
to form a NRM from a pedigree.

Definition at line 2519 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::NewAMatrix::load (   self,
  nrm_filename 
)

load() uses the Numarray Array Function "fromfile()" to load an array from a binary file.

If the load is successful, self.nrm contains the matrix.

Parameters:
nrm_filename The file from which the matrix should be read.
Returns:
A load status indicator (0: failed, 1: success). integer
load() uses the Numarray Array Function "fromfile()" to load an array from a
binary file.  If the load is successful, self.nrm contains the matrix.

Definition at line 2562 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::NewAMatrix::save (   self,
  nrm_filename,
  nrm_format = '' 
)

save() uses the Numarray method "tofile()" to save an array to a binary file.

Parameters:
nrm_filename The file to which the matrix should be written.
Returns:
A save status indicator (0: failed, 1: success). integer
save() uses the NumPy method "tofile()" to save an array to a binary file.

Definition at line 2589 of file pyp_newclasses.py.

def PyPedal::pyp_newclasses::NewAMatrix::printme (   self  ) 

printme() prints the NRM to the screen.

Parameters:
None 
Returns:
None None
printme() prints the NRM to the screen.

Definition at line 2622 of file pyp_newclasses.py.


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

Generated on Thu May 1 12:33:45 2008 for PyPedal by  doxygen 1.5.5