43#ifndef _TEUCHOS_SERIALDENSEVECTOR_HPP_
44#define _TEUCHOS_SERIALDENSEVECTOR_HPP_
59 template<
typename OrdinalType,
typename ScalarType>
213 std::ostream&
print(std::ostream& os)
const;
217 template<
typename OrdinalType,
typename ScalarType>
220 template<
typename OrdinalType,
typename ScalarType>
223 template<
typename OrdinalType,
typename ScalarType>
227 template<
typename OrdinalType,
typename ScalarType>
231 template<
typename OrdinalType,
typename ScalarType>
235 template<
typename OrdinalType,
typename ScalarType>
238 template<
typename OrdinalType,
typename ScalarType>
245 template<
typename OrdinalType,
typename ScalarType>
249 if(this->numRows_ !=
Operand.numRows_)
256 for(
i = 0;
i < this->numRows_;
i++) {
266 template<
typename OrdinalType,
typename ScalarType>
272 template<
typename OrdinalType,
typename ScalarType>
276 "SerialDenseVector<T>::dot : " <<
277 "Number of rows " <<
this->numRows_ <<
" not equal to x.numRows_ "<< x.numRows() );
283 template<
typename OrdinalType,
typename ScalarType>
287 if(this->valuesCopied_)
288 os <<
"Values_copied : yes" << std::endl;
290 os <<
"Values_copied : no" << std::endl;
291 os <<
"Length : " << this->numRows_ << std::endl;
292 if(this->numRows_ == 0) {
293 os <<
"(std::vector is empty, no values to display)" << std::endl;
296 os << (*this)(
i) <<
" ";
307 template<
typename OrdinalType,
typename ScalarType>
310#ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
311 this->checkIndex( index );
313 return(this->values_[index]);
316 template<
typename OrdinalType,
typename ScalarType>
319#ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
320 this->checkIndex( index );
322 return(this->values_[index]);
325 template<
typename OrdinalType,
typename ScalarType>
328#ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
329 this->checkIndex( index );
331 return(this->values_[index]);
334 template<
typename OrdinalType,
typename ScalarType>
337#ifdef HAVE_TEUCHOS_ARRAY_BOUNDSCHECK
338 this->checkIndex( index );
340 return(this->values_[index]);
344template<
typename OrdinalType,
typename ScalarType>
354template<
typename OrdinalType,
typename ScalarType>
364template<
typename OrdinalType,
typename ScalarType>
365SerialDenseVectorPrinter<OrdinalType,ScalarType>
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
Templated serial dense matrix class.
ScalarType DOT(const OrdinalType &n, const x_type *x, const OrdinalType &incx, const y_type *y, const OrdinalType &incy) const
Form the dot product of the vectors x and y.
Smart reference counting pointer class for automatic garbage collection.
RCP(ENull null_arg=null)
Initialize RCP<T> to NULL.
This class creates and provides basic support for dense rectangular matrix of templated type.
int putScalar(const ScalarType value=Teuchos::ScalarTraits< ScalarType >::zero())
Set all values in the matrix to a constant value.
SerialDenseMatrix< OrdinalType, ScalarType > & operator=(const SerialDenseMatrix< OrdinalType, ScalarType > &Source)
Copies values from one matrix to another.
ScalarType * values() const
Data array access method.
This class creates and provides basic support for dense vectors of templated type as a specialization...
bool operator==(const SerialDenseVector< OrdinalType, ScalarType > &Operand) const
Equality of two matrices.
OrdinalType length() const
Returns the length of this vector.
bool operator!=(const SerialDenseVector< OrdinalType, ScalarType > &Operand) const
Inequality of two matrices.
SerialDenseVector()
Default Constructor.
ScalarType & operator[](OrdinalType index)
Element access method (non-const).
int resize(OrdinalType length_in)
Resizing method for changing the size of a SerialDenseVector, keeping the entries.
ScalarType dot(const SerialDenseVector< OrdinalType, ScalarType > &x) const
Compute the dot product of this vector and x.
int size(OrdinalType length_in)
Size method for changing the size of a SerialDenseVector, initializing entries to zero.
int sizeUninitialized(OrdinalType length_in)
Same as size() except leaves values uninitialized.
ScalarType & operator()(OrdinalType index)
Element access method (non-const).
virtual ~SerialDenseVector()
Destructor.
std::ostream & print(std::ostream &os) const
Print method. Define the behavior of the std::ostream << operator inherited from the Object class.
SerialDenseVector< OrdinalType, ScalarType > & operator=(const ScalarType value)
Set all values in the matrix to a constant value.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
SerialBandDenseMatrixPrinter< OrdinalType, ScalarType > printMat(const SerialBandDenseMatrix< OrdinalType, ScalarType > &obj)
Return SerialBandDenseMatrix ostream manipulator Use as:
Ostream manipulator for SerialDenseVector.