#include <Epetra_IntSerialDenseVector.h>
Inheritance diagram for Epetra_IntSerialDenseVector:


Public Member Functions | |
| Epetra_IntSerialDenseVector () | |
| Default constructor; defines a zero size object. | |
| Epetra_IntSerialDenseVector (int Length) | |
| Sized constructor; defines a variable-sized object. | |
| Epetra_IntSerialDenseVector (Epetra_DataAccess CV, int *Values, int Length) | |
| Set object values from one-dimensional array. | |
| Epetra_IntSerialDenseVector (const Epetra_IntSerialDenseVector &Source) | |
| Epetra_IntSerialDenseVector copy constructor. | |
| int | Size (int Length) |
| Set length of a Epetra_IntSerialDenseVector object; init values to zero. | |
| int | Resize (int Length) |
| Resize a Epetra_IntSerialDenseVector object. | |
| virtual | ~Epetra_IntSerialDenseVector () |
| Epetra_IntSerialDenseVector destructor. | |
| int & | operator() (int Index) |
| Element access function. | |
| const int & | operator() (int Index) const |
| Element access function. | |
| int & | operator[] (int Index) |
| Element access function. | |
| const int & | operator[] (int Index) const |
| Element access function. | |
| int | Random () |
| Set vector values to random numbers. | |
| int | Length () const |
| Returns length of vector. | |
| int * | Values () |
| Returns pointer to the values in vector. | |
| const int * | Values () const |
| Returns const pointer to the values in vector. | |
| Epetra_DataAccess | CV () const |
| Returns the data access mode of the this vector. | |
| Epetra_IntSerialDenseVector & | operator= (const Epetra_IntSerialDenseVector &Source) |
| Copy from one vector to another. | |
I/O methods | |
| virtual void | Print (ostream &os) const |
| Print service methods; defines behavior of ostream << operator. | |
Expert-only unsupported methods | |
| int | MakeViewOf (const Epetra_IntSerialDenseVector &Source) |
| Reset an existing IntSerialDenseVector to point to another Vector. | |
The Epetra_IntSerialDenseVector class enables the construction and use of integer-valued, dense vectors. It derives from the Epetra_IntSerialDenseMatrix class.
The Epetra_IntSerialDenseVector class is intended to provide convenient vector notation but derives all signficant functionality from Epetra_IntSerialDenseMatrix.
Constructing Epetra_IntSerialDenseVector Objects
There are three Epetra_IntSerialDenseVector 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):
Once a Epetra_IntSerialDenseVector is constructed, it is possible to view the data via access functions.
| Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector | ( | ) |
Default constructor; defines a zero size object.
Epetra_IntSerialDenseVector objects defined by the default constructor should be sized with the Size() or Resize functions. Values should be defined by using the [] or () operators.
| Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector | ( | int | Length | ) |
Sized constructor; defines a variable-sized object.
| In | Length - Length of vector. |
| Epetra_IntSerialDenseVector::Epetra_IntSerialDenseVector | ( | Epetra_DataAccess | CV, | |
| int * | Values, | |||
| int | Length | |||
| ) |
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. |
| int Epetra_IntSerialDenseVector::MakeViewOf | ( | const Epetra_IntSerialDenseVector & | Source | ) |
Reset an existing IntSerialDenseVector to point to another Vector.
Allows an existing IntSerialDenseVector 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 IntSerialDenseVector this will become a view of. |
| const int & Epetra_IntSerialDenseVector::operator() | ( | int | Index | ) | const [inline] |
Element access function.
Returns the specified element of the vector.
| int & Epetra_IntSerialDenseVector::operator() | ( | int | Index | ) | [inline] |
Element access function.
Returns the specified element of the vector.
| Epetra_IntSerialDenseVector& Epetra_IntSerialDenseVector::operator= | ( | const Epetra_IntSerialDenseVector & | Source | ) |
Copy from one vector to another.
The operator= allows one to copy the values from one existing IntSerialDenseVector to another. The left hand side vector will take on the data access mode of the right hand side vector.
| const int & Epetra_IntSerialDenseVector::operator[] | ( | int | Index | ) | const [inline] |
Element access function.
Returns the specified element of the vector.
Reimplemented from Epetra_IntSerialDenseMatrix.
| int & Epetra_IntSerialDenseVector::operator[] | ( | int | Index | ) | [inline] |
Element access function.
Returns the specified element of the vector.
Reimplemented from Epetra_IntSerialDenseMatrix.
| int Epetra_IntSerialDenseVector::Random | ( | ) |
Set vector values to random numbers.
IntSerialDenseVector 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).
Reimplemented from Epetra_IntSerialDenseMatrix.
| int Epetra_IntSerialDenseVector::Resize | ( | int | Length | ) | [inline] |
Resize a Epetra_IntSerialDenseVector object.
| In | Length - Length of vector object. |
| int Epetra_IntSerialDenseVector::Size | ( | int | Length | ) | [inline] |
Set length of a Epetra_IntSerialDenseVector object; init values to zero.
| In | Length - Length of vector object. |
1.4.7