PIPS-NLP
Public Member Functions | List of all members
StochGenDummyMatrix Class Reference

#include <StochGenMatrix.h>

Inheritance diagram for StochGenDummyMatrix:
StochGenMatrix GenMatrix DoubleMatrix IotrRefCount

Public Member Functions

 StochGenDummyMatrix (int id)
 
virtual ~StochGenDummyMatrix ()
 
virtual void AddChild (StochGenMatrix *child)
 
virtual void getSize (int &m, int &n)
 
virtual void getSize (long long &m, long long &n)
 
virtual int numberOfNonZeros ()
 
virtual int isKindOf (int matType)
 
virtual void atPutDense (int row, int col, double *A, int lda, int rowExtent, int colExtent)
 
virtual void fromGetDense (int row, int col, double *A, int lda, int rowExtent, int colExtent)
 
virtual void ColumnScale (OoqpVector &vec)
 
virtual void RowScale (OoqpVector &vec)
 
virtual void SymmetricScale (OoqpVector &vec)
 
virtual void scalarMult (double num)
 
virtual void fromGetSpRow (int row, int col, double A[], int lenA, int jcolA[], int &nnz, int colExtent, int &info)
 
virtual void atPutSubmatrix (int destRow, int destCol, DoubleMatrix &M, int srcRow, int srcCol, int rowExtent, int colExtent)
 
virtual void atPutSpRow (int col, double A[], int lenA, int jcolA[], int &info)
 
virtual void putSparseTriple (int irow[], int len, int jcol[], double A[], int &info)
 
virtual void getDiagonal (OoqpVector &vec)
 
virtual void setToDiagonal (OoqpVector &vec)
 
virtual void mult (double beta, OoqpVector &y, double alpha, OoqpVector &x)
 
virtual void mult (double beta, OoqpVector &y, double alpha, OoqpVector &x, OoqpVector &yvecParent)
 
virtual void transMult (double beta, OoqpVector &y, double alpha, OoqpVector &x)
 
virtual void transMult2 (double beta, StochVector &y, double alpha, StochVector &x, OoqpVector &yvecParent)
 
virtual void transMult2 (double beta, StochVector &y, double alpha, StochVector &x, OoqpVector &yvecParent, OoqpVector &xCvecParent)
 
virtual double abmaxnorm ()
 
virtual void writeToStream (std::ostream &out) const
 
virtual void symmetrize (int &info)
 
virtual void randomize (double alpha, double beta, double *seed)
 
virtual void atPutDiagonal (int idiag, OoqpVector &v)
 
virtual void fromGetDiagonal (int idiag, OoqpVector &v)
 
virtual void copyMtxFromDouble (int copyLength, double *values)
 
virtual void setAdditiveDiagonal (OoqpVector &v)
 
- Public Member Functions inherited from StochGenMatrix
 StochGenMatrix ()
 
 StochGenMatrix (int id, long long global_m, long long global_n, int A_m, int A_n, int A_nnz, int B_m, int B_n, int B_nnz, MPI_Comm mpiComm_, int C_m=0, int C_n=0, int C_nnz=0)
 
virtual ~StochGenMatrix ()
 
void matTransDMultMat (OoqpVector &d, SymMatrix **res)
 
void matTransDinvMultMat (OoqpVector &d, SymMatrix **res)
 
- Public Member Functions inherited from DoubleMatrix
 DoubleMatrix ()
 
virtual void fromAddDense (int row, int col, double *A, int lda, int rowExtent, int colExtent)
 
virtual ~DoubleMatrix ()
 
virtual void copyDiagonalVal_From (int idiag, OoqpVector &x, bool firstCall, std::map< int, int > &ValIdxMap)
 
virtual void fromGetSpRow_WithRowStart (int row, int col, double A[], int lenA, int jcolA[], int &nnz, int colExtent, int &info, int &rowStart)
 
virtual void fromGetDense_withMap (int row, int col, double *A, int lda, int rowExtent, int colExtent, int const FirstCall, std::map< int, int > &ValIdxMap)
 
virtual double * getMatVal ()
 
virtual int * krowM ()
 
virtual int * jcolM ()
 
virtual double * M ()
 
- Public Member Functions inherited from IotrRefCount
int refs ()
 
 IotrRefCount ()
 

Additional Inherited Members

- Static Public Member Functions inherited from IotrRefCount
static void release (IotrRefCount **obj)
 
static void addRef (IotrRefCount *const *obj)
 
- Public Attributes inherited from StochGenMatrix
std::vector< StochGenMatrix * > children
 
SparseGenMatrixAmat
 
SparseGenMatrixBmat
 
SparseGenMatrixCmat
 
int id
 
long long m
 
long long n
 
MPI_Comm mpiComm
 
int iAmDistrib
 
- Static Public Attributes inherited from IotrRefCount
static int instances = 0
 
- Protected Member Functions inherited from IotrRefCount
virtual ~IotrRefCount ()
 

Detailed Description

Dummy Class

Constructor & Destructor Documentation

StochGenDummyMatrix::StochGenDummyMatrix ( int  id)
inline
virtual StochGenDummyMatrix::~StochGenDummyMatrix ( )
inlinevirtual

Member Function Documentation

virtual double StochGenDummyMatrix::abmaxnorm ( )
inlinevirtual

the magnitude of the element in this matrix with largest absolute value.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::AddChild ( StochGenMatrix child)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::atPutDense ( int  row,
int  col,
double *  A,
int  lda,
int  rowExtent,
int  colExtent 
)
inlinevirtual

Set the value of some of the elements of this matrix.

See also
DoubleMatrix::fromGetDense

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::atPutDiagonal ( int  idiag,
OoqpVector x 
)
inlinevirtual

Set some of the diagonal elements of this matrix.

Parameters
idiagthe index of the first diagonal element to be modified.
xthe new values for the diagonal elements.

The length of x is the number of diagonal elements to be modified. Typically x will have length less than the length of the diagonal.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::atPutSpRow ( int  col,
double  A[],
int  lenA,
int  jcolA[],
int &  info 
)
inlinevirtual

Put a sparse row into this matrix.

The meaning of the parmameters is the same as in fromGetSpRow.

See also
DoubleMatrix::fromGetSpRow

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::atPutSubmatrix ( int  destRow,
int  destCol,
DoubleMatrix M,
int  srcRow,
int  srcCol,
int  rowExtent,
int  colExtent 
)
inlinevirtual

Put a submatrix of M into this matrix.

Parameters
destRowThe top row of the submatrix of M is placed at destRow.
destColThe leftmost column of the submatrix of M is placed at destCol.
srcRowThe first row of the submatrix of M is srcRow.
srcColThe first column of the submatrix of M is srcCol.
rowExtentrowExtent rows are copied from M.
colExtentcolExtent columns are copied from M.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::ColumnScale ( OoqpVector vec)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::copyMtxFromDouble ( int  copyLength,
double *  values 
)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::fromGetDense ( int  row,
int  col,
double *  A,
int  lda,
int  rowExtent,
int  colExtent 
)
inlinevirtual

Get the value of some of the elements of this matrix.

Parameters
rowstart reading the elements of this matrix from row number "row".
colstart reading the elements of this matrix from column number "col".
AAny array to hold the values from this matrix.
ldAthe leading dimension of A.
rowExtentget rowExtent rows from this matrix.
colExtentget colExtent columns from this matrix.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::fromGetDiagonal ( int  idiag,
OoqpVector x 
)
inlinevirtual

Get some of the diagonal elements of this matrix.

Parameters
idiagthe index of the first diagonal element to be read.
xa vector to hold the diagonal elements

The length of x is the number of diagonal elements to be gotten. Typically x will have length less than the length of the diagonal.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::fromGetSpRow ( int  row,
int  col,
double  A[],
int  lenA,
int  jcolA[],
int &  nnz,
int  colExtent,
int &  info 
)
inlinevirtual

Get one sparse row from this matrix.

Parameters
rowget row number "row"
colignore all elements of the row before column "col"
Astore the values of the sparse row in A
lenAthe length of A
jcolAan array of length lenA containing the column index of each element in the sparse row
colExtentignore all elements of the row that have column indices greater than or equal to col + colExtent
infoinfo is 0 if and only if the sparse row can fit into A.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::getDiagonal ( OoqpVector vec)
inlinevirtual

Place the diagonal elements of this matrix in the vector vec

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::getSize ( int &  m,
int &  n 
)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::getSize ( long long &  m,
long long &  n 
)
inlinevirtual

Reimplemented from StochGenMatrix.

int StochGenDummyMatrix::isKindOf ( int  matrixType)
virtual

True if this matrix identifies itself to be of type matrixType.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::mult ( double  beta,
OoqpVector y,
double  alpha,
OoqpVector x 
)
inlinevirtual

y = beta * y + alpha * this * x

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::mult ( double  beta,
OoqpVector y,
double  alpha,
OoqpVector x,
OoqpVector yvecParent 
)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual int StochGenDummyMatrix::numberOfNonZeros ( )
inlinevirtual

The actual number of structural non-zero elements in this sparse matrix. This includes so-called "accidental" zeros, elements that are treated as non-zero even though their value happens to be zero.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::putSparseTriple ( int  irow[],
int  len,
int  jcol[],
double  A[],
int &  info 
)
inlinevirtual

Copy elements from sparse triple format into this matrix

Parameters
lenthe number of elements
irowan array containing the row number of the elements
jcolan array containing the column number of the elements
Aan array containing the values for the elements.
infoon return, info will be zero if and only if the insertion was successful.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::randomize ( double  alpha,
double  beta,
double *  seed 
)
inlinevirtual

Fill this matrix with random elements.

Parameters
alphathe elements will be no smaller than alpha.
betathe elements will be no larger than beta.
seeda arbitrary number used to seed the random number generator.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::RowScale ( OoqpVector vec)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::scalarMult ( double  num)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::setAdditiveDiagonal ( OoqpVector v)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::setToDiagonal ( OoqpVector vec)
inlinevirtual

Set the matrix to the diagoanl matrix whose diagonal is vec

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::SymmetricScale ( OoqpVector vec)
inlinevirtual

Get the number of rows and columns in the matrix

Parameters
mthe number of rows
nthe number of columns

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::symmetrize ( int &  info)
inlinevirtual

Make the elements in this matrix symmetric. The elements of interest must be in the lower triangle, and the upper triangle must be empty.

Parameters
infozero if the operation succeeded. Otherwise, insufficient space was allocated to symmetrize the matrix.

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::transMult ( double  beta,
OoqpVector y,
double  alpha,
OoqpVector x 
)
inlinevirtual

y = beta * y + alpha * this^T * x

opt alloc buffer here and send it through the tree to be used by children when MPI_Allreduce

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::transMult2 ( double  beta,
StochVector y,
double  alpha,
StochVector x,
OoqpVector yvecParent 
)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::transMult2 ( double  beta,
StochVector y,
double  alpha,
StochVector x,
OoqpVector yvecParent,
OoqpVector xCvecParent 
)
inlinevirtual

Reimplemented from StochGenMatrix.

virtual void StochGenDummyMatrix::writeToStream ( std::ostream &  out) const
inlinevirtual

Write this element to a C++ stream

Reimplemented from StochGenMatrix.


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