44 #ifndef EPETRA_SERIALDENSEMATRIX_H
45 #define EPETRA_SERIALDENSEMATRIX_H
152 bool set_object_label=
true);
177 int Shape(
int NumRows,
int NumCols);
193 int Reshape(
int NumRows,
int NumCols);
219 int Multiply(
char TransA,
char TransB,
double ScalarAB,
230 int Multiply(
bool transA,
256 int Multiply(
char SideA,
double ScalarAB,
270 int Scale(
double ScalarA);
276 virtual double NormOne()
const;
279 virtual double NormInf()
const;
305 {
return !(*
this == rhs); }
327 double& operator () (
int RowIndex,
int ColIndex);
339 const double& operator () (
int RowIndex,
int ColIndex)
const;
352 double* operator [] (
int ColIndex);
365 const double* operator [] (
int ColIndex)
const;
377 int M()
const {
return(M_);};
380 int N()
const {
return(N_);};
383 double*
A()
const {
return(A_);};
386 double*
A() {
return(A_);};
389 int LDA()
const {
return(LDA_);};
397 virtual void Print(std::ostream& os)
const;
408 virtual double OneNorm()
const {
return(NormOne());};
427 virtual int SetUseTranspose(
bool UseTranspose_in) { UseTranspose_ = UseTranspose_in;
return (0); }
467 virtual int RowDim()
const {
return M(); }
470 virtual int ColDim()
const {
return N(); }
475 void CopyMat(
const double* Source,
int Source_LDA,
int NumRows,
int NumCols,
476 double* Target,
int Target_LDA,
bool add=
false);
500 #ifdef HAVE_EPETRA_ARRAY_BOUNDS_CHECK
501 if (RowIndex >=
M_ || RowIndex < 0)
504 if (ColIndex >=
N_ || ColIndex < 0)
508 return(
A_[ColIndex*
LDA_ + RowIndex]);
512 #ifdef HAVE_EPETRA_ARRAY_BOUNDS_CHECK
513 if (RowIndex >=
M_ || RowIndex < 0)
516 if (ColIndex >=
N_ || ColIndex < 0)
520 return(
A_[ColIndex*
LDA_ + RowIndex]);
524 #ifdef HAVE_EPETRA_ARRAY_BOUNDS_CHECK
525 if (ColIndex >=
N_ || ColIndex < 0)
529 return(
A_ + ColIndex*
LDA_);
533 #ifdef HAVE_EPETRA_ARRAY_BOUNDS_CHECK
534 if (ColIndex >=
N_ || ColIndex < 0)
538 return(
A_+ ColIndex*
LDA_);
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
double * operator[](int ColIndex)
Column access function.
virtual int ColDim() const
Returns the column dimension of operator.
virtual int RowDim() const
Returns the row dimension of operator.
Epetra_DataAccess CV() const
Returns the data access mode of the this matrix.
Epetra_VbrMatrix: A class for the construction and use of real-valued double-precision variable block...
virtual int ApplyInverse(const Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &Y)
Returns the result of a Epetra_SerialDenseOperator inverse applied to an Epetra_SerialDenseMatrix X i...
Epetra_CompObject & operator=(const Epetra_CompObject &src)
virtual int Apply(const Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &Y)=0
Returns the result of a Epetra_SerialDenseOperator applied to a Epetra_SerialDenseMatrix X in Y...
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
Epetra_SerialSymDenseMatrix: A class for constructing and using symmetric positive definite dense mat...
double * A() const
Returns pointer to the this matrix.
Epetra_BLAS: The Epetra BLAS Wrapper Class.
virtual const char * Label() const
Epetra_Object Label access funtion.
std::string toString(const int &x) const
double & operator()(int RowIndex, int ColIndex)
Element access function.
virtual double OneNorm() const
Computes the 1-Norm of the this matrix (identical to NormOne() method).
Epetra_Object: The base Epetra class.
virtual int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
Epetra_CompObject: Functionality and data that is common to all computational classes.
virtual double InfNorm() const
Computes the Infinity-Norm of the this matrix (identical to NormInf() method).
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Epetra_SerialDenseOperator: A pure virtual class for using real-valued double-precision operators...
virtual double NormInf() const =0
Returns the infinity norm of the global matrix.
int LDA() const
Returns the leading dimension of the this matrix.
bool operator!=(const Epetra_SerialDenseMatrix &rhs) const
Inequality operator.
virtual const char * Label() const
Returns a character string describing the operator.
double * A()
Returns pointer to the this matrix.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
virtual int ReportError(const std::string Message, int ErrorCode) const
Error reporting method.
int N() const
Returns column dimension of system.
bool operator==(BigUInt< n > const &a, BigUInt< n > const &b)
int M() const
Returns row dimension of system.