Epetra Package Browser (Single Doxygen Collection)
Development
|
Epetra_LongLongSerialDenseVector: A class for constructing and using dense vectors. More...
#include <Epetra_LongLongSerialDenseVector.h>
Public Member Functions | |
Epetra_LongLongSerialDenseVector () | |
Default constructor; defines a zero size object. More... | |
Epetra_LongLongSerialDenseVector (int Length_in) | |
Sized constructor; defines a variable-sized object. More... | |
Epetra_LongLongSerialDenseVector (Epetra_DataAccess CV_in, long long *Values_in, int Length_in) | |
Set object values from one-dimensional array. More... | |
Epetra_LongLongSerialDenseVector (const Epetra_LongLongSerialDenseVector &Source) | |
Epetra_LongLongSerialDenseVector copy constructor. More... | |
int | Size (int Length_in) |
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero. More... | |
int | Resize (int Length_in) |
Resize a Epetra_LongLongSerialDenseVector object. More... | |
virtual | ~Epetra_LongLongSerialDenseVector () |
Epetra_LongLongSerialDenseVector destructor. More... | |
long long & | operator() (int Index) |
Element access function. More... | |
const long long & | operator() (int Index) const |
Element access function. More... | |
long long & | operator[] (int Index) |
Element access function. More... | |
const long long & | operator[] (int Index) const |
Element access function. More... | |
int | Random () |
Set vector values to random numbers. More... | |
int | Length () const |
Returns length of vector. More... | |
long long * | Values () |
Returns pointer to the values in vector. More... | |
const long long * | Values () const |
Returns const pointer to the values in vector. More... | |
Epetra_DataAccess | CV () const |
Returns the data access mode of the this vector. More... | |
Epetra_LongLongSerialDenseVector & | operator= (const Epetra_LongLongSerialDenseVector &Source) |
Copy from one vector to another. More... | |
Public Member Functions inherited from Epetra_LongLongSerialDenseMatrix | |
Epetra_LongLongSerialDenseMatrix () | |
Default constructor; defines a zero size object. More... | |
Epetra_LongLongSerialDenseMatrix (int NumRows, int NumCols) | |
Shaped constructor; defines a variable-sized object. More... | |
Epetra_LongLongSerialDenseMatrix (Epetra_DataAccess CV, long long *A, int LDA, int NumRows, int NumCols) | |
Set object values from two-dimensional array. More... | |
Epetra_LongLongSerialDenseMatrix (const Epetra_LongLongSerialDenseMatrix &Source) | |
Epetra_LongLongSerialDenseMatrix copy constructor. More... | |
virtual | ~Epetra_LongLongSerialDenseMatrix () |
Epetra_LongLongSerialDenseMatrix destructor. More... | |
int | Shape (int NumRows, int NumCols) |
Set dimensions of a Epetra_LongLongSerialDenseMatrix object; init values to zero. More... | |
int | Reshape (int NumRows, int NumCols) |
Reshape a Epetra_LongLongSerialDenseMatrix object. More... | |
virtual long long | OneNorm () |
Computes the 1-Norm of the this matrix. More... | |
virtual long long | InfNorm () |
Computes the Infinity-Norm of the this matrix. More... | |
Epetra_LongLongSerialDenseMatrix & | operator= (const Epetra_LongLongSerialDenseMatrix &Source) |
Copy from one matrix to another. More... | |
bool | operator== (const Epetra_LongLongSerialDenseMatrix &rhs) const |
Comparison operator. More... | |
bool | operator!= (const Epetra_LongLongSerialDenseMatrix &rhs) const |
Inequality operator. More... | |
long long & | operator() (int RowIndex, int ColIndex) |
Element access function. More... | |
const long long & | operator() (int RowIndex, int ColIndex) const |
Element access function. More... | |
long long * | operator[] (int ColIndex) |
Column access function. More... | |
const long long * | operator[] (int ColIndex) const |
Column access function. More... | |
int | Random () |
Set matrix values to random numbers. More... | |
int | M () const |
Returns row dimension of system. More... | |
int | N () const |
Returns column dimension of system. More... | |
const long long * | A () const |
Returns const pointer to the this matrix. More... | |
long long * | A () |
Returns pointer to the this matrix. More... | |
int | LDA () const |
Returns the leading dimension of the this matrix. More... | |
Epetra_DataAccess | CV () const |
Returns the data access mode of the this matrix. More... | |
int | MakeViewOf (const Epetra_LongLongSerialDenseMatrix &Source) |
Reset an existing LongLongSerialDenseMatrix to point to another Matrix. More... | |
Public Member Functions inherited from Epetra_Object | |
Epetra_Object (int TracebackModeIn=-1, bool set_label=true) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const char *const Label, int TracebackModeIn=-1) | |
Epetra_Object Constructor. More... | |
Epetra_Object (const Epetra_Object &Object) | |
Epetra_Object Copy Constructor. More... | |
virtual | ~Epetra_Object () |
Epetra_Object Destructor. More... | |
virtual void | SetLabel (const char *const Label) |
Epetra_Object Label definition using char *. More... | |
virtual const char * | Label () const |
Epetra_Object Label access funtion. More... | |
virtual int | ReportError (const std::string Message, int ErrorCode) const |
Error reporting method. More... | |
I/O methods | |
virtual void | Print (std::ostream &os) const |
Print service methods; defines behavior of ostream << operator. More... | |
Expert-only unsupported methods | |
int | MakeViewOf (const Epetra_LongLongSerialDenseVector &Source) |
Reset an existing LongLongSerialDenseVector to point to another Vector. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Epetra_Object | |
static void | SetTracebackMode (int TracebackModeValue) |
Set the value of the Epetra_Object error traceback report mode. More... | |
static int | GetTracebackMode () |
Get the value of the Epetra_Object error report mode. More... | |
static std::ostream & | GetTracebackStream () |
Get the output stream for error reporting. More... | |
Static Public Attributes inherited from Epetra_Object | |
static int | TracebackMode |
Protected Member Functions inherited from Epetra_LongLongSerialDenseMatrix | |
void | CopyMat (long long *Source, int Source_LDA, int NumRows, int NumCols, long long *Target, int Target_LDA) |
void | CleanupData () |
Protected Member Functions inherited from Epetra_Object | |
std::string | toString (const int &x) const |
std::string | toString (const long long &x) const |
std::string | toString (const double &x) const |
Protected Attributes inherited from Epetra_LongLongSerialDenseMatrix | |
Epetra_DataAccess | CV_ |
bool | A_Copied_ |
int | M_ |
int | N_ |
int | LDA_ |
long long * | A_ |
Epetra_LongLongSerialDenseVector: A class for constructing and using dense vectors.
The Epetra_LongLongSerialDenseVector class enables the construction and use of integer-valued, dense vectors. It derives from the Epetra_LongLongSerialDenseMatrix class.
The Epetra_LongLongSerialDenseVector class is intended to provide convenient vector notation but derives all signficant functionality from Epetra_LongLongSerialDenseMatrix.
Constructing Epetra_LongLongSerialDenseVector Objects
There are three Epetra_LongLongSerialDenseVector constructors. The first constructs a zero-length object which should be made to appropriate length using the Size() or Resize() functions and then filled with the [] or () operators. The second constructs an object sized to the dimension specified, which should be filled with the [] or () operators. The third is a constructor that accepts user data as a 1D array, and the fourth is a copy constructor. The third constructor has two data access modes (specified by the Epetra_DataAccess argument):
Extracting Data from Epetra_LongLongSerialDenseVector Objects
Once a Epetra_LongLongSerialDenseVector is constructed, it is possible to view the data via access functions.
Definition at line 98 of file Epetra_LongLongSerialDenseVector.h.
Epetra_LongLongSerialDenseVector::Epetra_LongLongSerialDenseVector | ( | ) |
Default constructor; defines a zero size object.
Epetra_LongLongSerialDenseVector objects defined by the default constructor should be sized with the Size() or Resize functions. Values should be defined by using the [] or () operators.
Definition at line 49 of file Epetra_LongLongSerialDenseVector.cpp.
Epetra_LongLongSerialDenseVector::Epetra_LongLongSerialDenseVector | ( | int | Length_in | ) |
Sized constructor; defines a variable-sized object.
In | Length - Length of vector. |
Epetra_LongLongSerialDenseVector objects defined by the sized constructor are already sized to the dimension given as a parameter. All values are initialized to 0. Calling this constructor is equivalent to using the default constructor, and then calling the Size function on it. Values should be defined by using the [] or () operators.
Definition at line 56 of file Epetra_LongLongSerialDenseVector.cpp.
Epetra_LongLongSerialDenseVector::Epetra_LongLongSerialDenseVector | ( | Epetra_DataAccess | CV_in, |
long long * | Values_in, | ||
int | Length_in | ||
) |
Set object values from one-dimensional array.
In | Epetra_DataAccess - Enumerated type set to Copy or View. |
In | Values - Pointer to an array of integer numbers containing the values. |
In | Length - Length of vector. |
See Detailed Description section for further discussion.
Definition at line 63 of file Epetra_LongLongSerialDenseVector.cpp.
Epetra_LongLongSerialDenseVector::Epetra_LongLongSerialDenseVector | ( | const Epetra_LongLongSerialDenseVector & | Source | ) |
Epetra_LongLongSerialDenseVector copy constructor.
Definition at line 70 of file Epetra_LongLongSerialDenseVector.cpp.
|
virtual |
Epetra_LongLongSerialDenseVector destructor.
Definition at line 75 of file Epetra_LongLongSerialDenseVector.cpp.
|
inline |
Set length of a Epetra_LongLongSerialDenseVector object; init values to zero.
In | Length - Length of vector object. |
Allows user to define the dimension of a Epetra_LongLongSerialDenseVector. This function can be called at any point after construction. Any values that were previously in this object are destroyed and the resized vector starts off with all zero values.
Definition at line 150 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Resize a Epetra_LongLongSerialDenseVector object.
In | Length - Length of vector object. |
Allows user to define the dimension of a Epetra_LongLongSerialDenseVector. This function can be called at any point after construction. Any values that were previously in this object are copied into the new size. If the new shape is smaller than the original, the first Length values are copied to the new vector.
Definition at line 164 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Element access function.
Returns the specified element of the vector.
Definition at line 275 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Element access function.
Returns the specified element of the vector.
Definition at line 284 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Element access function.
Returns the specified element of the vector.
Definition at line 293 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Element access function.
Returns the specified element of the vector.
Definition at line 302 of file Epetra_LongLongSerialDenseVector.h.
int Epetra_LongLongSerialDenseVector::Random | ( | ) |
Set vector values to random numbers.
LongLongSerialDenseVector uses the random number generator provided by Epetra_Util. The vector values will be set to random values on the interval (0, 2^31 - 1).
Definition at line 110 of file Epetra_LongLongSerialDenseVector.cpp.
|
inline |
Returns length of vector.
Definition at line 219 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Returns pointer to the values in vector.
Definition at line 222 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Returns const pointer to the values in vector.
Definition at line 225 of file Epetra_LongLongSerialDenseVector.h.
|
inline |
Returns the data access mode of the this vector.
Definition at line 228 of file Epetra_LongLongSerialDenseVector.h.
Epetra_LongLongSerialDenseVector & Epetra_LongLongSerialDenseVector::operator= | ( | const Epetra_LongLongSerialDenseVector & | Source | ) |
Copy from one vector to another.
The operator= allows one to copy the values from one existing LongLongSerialDenseVector to another. The left hand side vector will take on the data access mode of the right hand side vector.
Definition at line 79 of file Epetra_LongLongSerialDenseVector.cpp.
|
virtual |
Print service methods; defines behavior of ostream << operator.
Reimplemented from Epetra_LongLongSerialDenseMatrix.
Definition at line 91 of file Epetra_LongLongSerialDenseVector.cpp.
int Epetra_LongLongSerialDenseVector::MakeViewOf | ( | const Epetra_LongLongSerialDenseVector & | Source | ) |
Reset an existing LongLongSerialDenseVector to point to another Vector.
Allows an existing LongLongSerialDenseVector to become a View of another vector's data, regardless of the DataAccess mode of the Source vector. It is assumed that the Source vector is an independent vector, and no checking is done to verify this.
This is used by Epetra_CrsGraph in the OptimizeStorage method. It is used so that an existing (Copy) vector can be converted to a View. This frees up memory that CrsGraph no longer needs.
Source | The LongLongSerialDenseVector this will become a view of. |
Definition at line 85 of file Epetra_LongLongSerialDenseVector.cpp.