-  3.41.0
pyfaust.poly.FaustPoly Class Reference

Subclass of Faust specialized for orthogonal polynomial basis. More...

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def __next__ (self)
 
- Public Member Functions inherited from pyfaust.Faust
def __init__ (F, factors=None, filepath=None, **kwargs)
 Creates a Faust from a list of factors or alternatively from a file. More...
 
def transpose (F)
 Returns the transpose of F. More...
 
def conj (F)
 Returns the complex conjugate of F. More...
 
def conjugate (F)
 Returns the complex conjugate of F. More...
 
def getH (F)
 Returns the conjugate transpose of F. More...
 
def pruneout (F, thres=0, **kwargs)
 Returns a Faust optimized by removing useless zero rows and columns as many times as needed. More...
 
def __repr__ (F)
 Returns a str object representing the Faust object. More...
 
def __str__ (F)
 Converts F to its str representation. More...
 
def display (F)
 Displays information about F. More...
 
def __pos__ (F)
 Returns + F (unary operator). More...
 
def __neg__ (F)
 Returns F (unary operator). More...
 
def __add__ (F, *args, **kwargs)
 Sums F to one or a sequence of variables (Faust objects, arrays or scalars). More...
 
def __radd__ (F, lhs_op)
 Returns lhs_op+F. More...
 
def __sub__ (F, *args)
 Subtracts from F one or a sequence of variables. More...
 
def __rsub__ (F, lhs_op)
 Returns lhs_op-F. More...
 
def __truediv__ (F, s)
 Divides F by the scalar s. More...
 
def __itruediv__ (F, s)
 Divides F by the scalar s inplace. More...
 
def __floordiv__ (F, s)
 F // s. More...
 
def __imatmul__ (F, A)
 Inplace F = F @ A. More...
 
def __imul__ (F, A)
 Inplace F = F * A. More...
 
def __iadd__ (F, A)
 Inplace F = F + A. More...
 
def __isub__ (F, A)
 Inplace F = F - A. More...
 
def __matmul__ (F, A)
 Multiplies F by A which is a dense numpy.matrix/numpy.ndarray or a Faust object. More...
 
def dot (F, A, *args, **kwargs)
 Performs equivalent operation of numpy.dot() between the Faust F and A. More...
 
def matvec (F, x)
 This function implements the scipy.sparse.linalg.LinearOperator.matvec function such that scipy.sparse.linalg.aslinearoperator function works on a Faust object. More...
 
def __mul__ (F, A)
 Multiplies the Faust F by A. More...
 
def __rmul__ (F, lhs_op)
 lhs_op*F More...
 
def __rmatmul__ (F, lhs_op)
 Returns lhs_op.__matmul__(F). More...
 
def concatenate (F, *args, **kwargs)
 Concatenates F with len(args) Faust objects, numpy arrays or scipy sparse matrices. More...
 
def toarray (F)
 Returns a numpy array for the full matrix implemented by F. More...
 
def todense (F)
 Returns a numpy matrix for the full matrix implemented by F. More...
 
def __getitem__ (F, indices)
 Indexes or slices a Faust. More...
 
def nnz_sum (F)
 Gives the total number of non-zero elements in the factors of F. More...
 
def density (F)
 Calculates the density of F such that F.nnz_sum() == F.density() * F.size. More...
 
def rcg (F)
 Computes the Relative Complexity Gain. More...
 
def norm (F, ord='fro', **kwargs)
 Computes the norm of F. More...
 
def power_iteration (self, threshold=1e-3, maxiter=100)
 Performs the power iteration algorithm to compute the greatest eigenvalue of the Faust. More...
 
def normalize (F, ord='fro', axis=1)
 Normalizes F along the axis dimension using the ord-norm. More...
 
def numfactors (F)
 Returns the number of factors of F. More...
 
def __len__ (F)
 Returns the number of factors of F. More...
 
def factors (F, indices, as_faust=False)
 Returns the i-th factor of F or a new Faust composed of F factors whose indices are listed in indices. More...
 
def right (F, i, as_faust=False)
 Returns the right hand side factors of F from index i to F.numfactors()-1. More...
 
def left (F, i, as_faust=False)
 Returns the left hand side factors of F from index 0 to i included. More...
 
def replace (F, i, new_factor)
 Replaces the factor of index i by new_factor in a new Faust copy of F. More...
 
def insert (F, i, new_factor)
 Inserts new_factor at index i in a new Faust copy of F. More...
 
def save (F, filepath, format="Matlab")
 Saves the Faust F into a file. More...
 
def load_native (filepath)
 The format is Matlab format version 5 and the filepath should end with a .mat extension (native C++ version). More...
 
def astype (F, dtype)
 Converts F to the dtype passed as argument in a new Faust. More...
 
def imshow (F, name='F')
 Displays image of F's full matrix and its factors. More...
 
def pinv (F)
 Computes the (Moore-Penrose) pseudo-inverse of F.toarray(). More...
 
def issparse (F, csr=True, bsr=False)
 Returns True if all F factors are sparse False otherwise. More...
 
def isdense (F)
 Returns True if all factors are dense arrays (as np.ndarray-s) False otherwise. More...
 
def swap_cols (F, id1, id2, permutation=False, inplace=False)
 Swaps F columns of indices id1 and id2. More...
 
def swap_rows (F, id1, id2, permutation=True, inplace=False)
 Swaps F rows of indices id1 and id2. More...
 
def optimize_memory (F)
 Optimizes a Faust by changing the storage format of each factor in order to optimize the memory size. More...
 
def optimize (F, transp=False)
 Returns a Faust, optimized with Faust.pruneout, Faust.optimize_memory, and Faust.optimize_time. More...
 
def optimize_time (F, transp=False, inplace=False, nsamples=1, mat=None)
 Returns a Faust configured with the quickest Faust-matrix multiplication mode (benchmark ran on the fly). More...
 
def copy (F, dev='cpu')
 Clone alias function (here just to mimic numpy API). More...
 
def clone (F, dev=None)
 Clones the Faust (in a new memory space). More...
 
def sum (F, axis=None, **kwargs)
 Sums Faust elements over a given axis. More...
 
def average (F, axis=None, weights=None, sw_returned=False)
 Computes the weighted average of F along the specified axis. More...
 

Public Attributes

 gen
 

Additional Inherited Members

- Static Public Member Functions inherited from pyfaust.Faust
def load (filepath)
 Loads a Faust from a MAT file. More...
 
def isFaust (obj)
 Returns True if obj is a Faust object, False otherwise. More...
 
- Properties inherited from pyfaust.Faust
 nbytes = property
 Gives the memory size of the Faust in bytes. More...
 
 shape = property
 Gives the shape of the Faust F. More...
 
 ndim = property
 Number of Faust dimensions (always 2). More...
 
 size = property
 Gives the size of the Faust F (that is F.shape[0]*F.shape[1]) . More...
 
 device = property
 Returns the device on which the Faust is located ('cpu' or 'gpu'). More...
 
 T = property
 Returns the transpose of F. More...
 
 H = property
 Returns the conjugate transpose of F. More...
 
 real = property
 Returns the real part of F as a Faust. More...
 
 imag = property
 Returns the imaginary part of F as a Faust. More...
 
 dtype = property
 Returns the dtype of the Faust. More...
 

Detailed Description

Subclass of Faust specialized for orthogonal polynomial basis.

This class is used only for the native implementation of the poly functions.

Note
it is not advisable to use this class directly.

Constructor & Destructor Documentation

◆ __init__()

def pyfaust.poly.FaustPoly.__init__ (   self,
args,
**  kwargs 
)

Member Function Documentation

◆ __next__()

def pyfaust.poly.FaustPoly.__next__ (   self)

Member Data Documentation

◆ gen

pyfaust.poly.FaustPoly.gen

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